Skip to content

A simple Android library compatible from API 14, which builds a material dialog with version info for the app; using the same style as Google's version info dialogs.

License

Notifications You must be signed in to change notification settings

hassie-dash/version-info-material-dialog

Repository files navigation

Version Info Material Dialog

Build Status Codacy Badge Download codecov

A simple Android library compatible all the way down to API 14, which builds a material dialog with version info for the app, including app icon, app name, app version and copyright notice; using the same style as Google's version info dialogs.

Screenshots

Dependencies

To use the library, add the dependency to your app module's build.grade file:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    
    // Add this dependency.
    compile 'uk.co.hassie:version-info-material-dialog:0.1.0'
}

Example usage

HomeActivity.java

new VersionInfoMDialog.Builder(HomeActivity.this)
    .setCopyrightText(R.string.app_copyright)
    .setVersionPrefix(R.string.version_prefix)
    .show();

strings.xml

<string name="app_copyright">&#169;2017 Hassie.</string>
<string name="version_prefix">Version</string>

Example usage 2

You can also build the dialog and call the show method at a later point in your code.

HomeActivity.java

VersionInfoMDialog versionInfoMDialog = new VersionInfoMDialog.Builder(HomeActivity.this)
    .setCopyrightText(R.string.app_copyright)
    .setVersionPrefix(R.string.version_prefix)
    .build();
    
versionInfoMDialog.show();

Support for API 9 - API 13

Due to incompatible API changes in the Android Support Library, these APIs are no longer supported. Use version 0.0.9 which uses the old support library to support these APIs.

License

Copyright ©2017 Hassie.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

A simple Android library compatible from API 14, which builds a material dialog with version info for the app; using the same style as Google's version info dialogs.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages