Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.
/ Dogscreen Public archive

Dogscreen is a simple library to implement Google-style dogfood and beta notices.

License

Notifications You must be signed in to change notification settings

ZeevoX/Dogscreen

Repository files navigation

Dogscreen

Download Github license

Table of Contents

  1. Sample Project
  2. Gradle Dependency
  3. What's New
  4. Information
  5. Basic Dogscreen
  6. Custom Dogscreen
    1. Setting a Title
    2. Customizing content
  7. Confirmation button
    1. Default confirmation bar
    2. FAB confirmation
  8. Fullscreen

Sample Project

You can download the latest sample APK from the releases page.

It's also on Google Play:

Get it on Google Play

Having the sample project installed is a good way to be notified of new releases.


Gradle Dependency

Repository

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'
}

What's New

See the project's Releases page for a list of versions with their changelogs.


Information

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.


Basic Dogscreen

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.


Custom Dogscreen

This project is just starting out, but new customizability features will be added soon!

Setting a title

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);

Customizing content

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.


Confirmation button

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.

Default confirmation bar

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.

FAB Confirmation

You can replace the bottom action bar with a FAB. To achieve this, use

dogscreen.setType(Dogscreen.DOGSCREEN_FAB);

Fullscreen

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!