- Sample Project
- Gradle Dependency
- What's New
- Information
- Basic Dogscreen
- Custom Dogscreen
- Confirmation button
- Fullscreen
You can download the latest sample APK from the releases page.
It's also on Google Play:
Having the sample project installed is a good way to be notified of new releases.
The Gradle dependency is available via jCenter. jCenter is the default Maven repository used by Android Studio.
The minimum API level supported by this library is API 14 (Ice Cream Sandwich).
Add the Dogscreen dependency in your build.gradle like so:
dependencies {
// ... other dependencies here
implementation 'com.zeevox:dogscreen:2.1.2'
}
See the project's Releases page for a list of versions with their changelogs.
First of all, note that DogscreenActivity
extends AppCompatActivity
, so Android Studio will show an error that multiple revisions of the Support Libraries are being used at one time if you have any other than 26.0.1 in use.
Currently, Dogscreen uses the Android Support Libraries v26.0.1, released August 2017. I will try to update Dogscreen with the latest Support Libraries as soon as possible after new revisions are released.
Note that you can always substitute literal strings and string resources for methods that take strings.
Dogscreen dogscreen = new Dogscreen(this);
dogscreen.show();
This will use the default values and display the default Google dogfooding notice, found in the leaked Google Duo APK.
This project is just starting out, but new customizability features will be added soon!
To change the title, use setTitle()
dogscreen.setTitle("Hello world!");
You can also pass a String ID, as such:
dogscreen.setTitle(R.string.hello_world);
To change the further information given (the "description"), use setContent()
dogscreen.setContent("Further information given in the description of the Dogscreen")
You can also pass a String ID, as above.
You can change the look of the "OK" button too, pick between the default bottom action bar with "GOT IT" text, or a FloatingActionButton (FAB) in the bottom right corner.
To achieve the default confirmation bar, you can either not apply this function at all, or use
dogscreen.setType(Dogscreen.DOGSCREEN_DEFAULT);
The default may be changed in the future.
You can replace the bottom action bar with a FAB. To achieve this, use
dogscreen.setType(Dogscreen.DOGSCREEN_FAB);
You can set the dogscreen to be display full screen, too.
dogscreen.setFullscreen(true);
Note that this requires API Level 19 (Android KitKat) or above. Although I could technically support API Level 16, that results in a serious bug on API Levels 21 and above.
More functions coming soon!