Sei sulla pagina 1di 8

BannerTime (/details/1/2527)

 145 (https://github.com/jcmore2/BannerTime/stargazers?utm_source=android-

arsenal.com&utm_medium=referral&utm_campaign=2527) 8

(https://github.com/jcmore2/BannerTime/watchers?utm_source=android-

arsenal.com&utm_medium=referral&utm_campaign=2527)  31

(https://github.com/jcmore2/BannerTime/network?utm_source=android-

arsenal.com&utm_medium=referral&utm_campaign=2527)  0

(https://github.com/jcmore2/BannerTime/issues?utm_source=android-

arsenal.com&utm_medium=referral&utm_campaign=2527)

 (https://facebook.com/sharer.php?
General u=https://android-
Category
arsenal.com/details/1/2527)
Free (/free)

Tag
 (https://twitter.com/intent/twe
arsenal.com/details/1/2527&text=The%20An
Dialogs (/tag/30)

License %20Dialogs%20-%20BannerTime
Apache License, Version 2.0 (http://opensource.org/licenses/Apache-2.0?utm_source=android-arsenal.co

 (http://news.ycombinator.com/submitlink
m&utm_medium=referral&utm_campaign=2527)

arsenal.com/details/1/2527&t=The%20Andro
Min SDK
14 (Android 4.0–4.0.2 Ice Cream Sandwich) (/api?level=14)

Registered
%20Dialogs%2
Sep 21, 2015

Favorites
 (https://plus.google.com/share?
6 url=https://android-
Link arsenal.com/details/1/2527)
https://github.com/jcmore2/BannerTime (https://github.com/jcmore2/BannerTime?utm_source=android-ar

 (https://reddit.com/subm
senal.com&utm_medium=referral&utm_campaign=2527)

arsenal.com/details/1/2527&title=The%20An
See also
AndroidTabbedDialog (/details/1/3318)
Pop (/details/1/3400) %20Dialogs%
Selection Dialogs (/details/1/3651)
DialogAlchemy (/details/1/3741)
DistilledViewPrefs (/details/1/2567)

Additional

Language
Java

Version
N/A (https://github.com/jcmore2/BannerTime/releases?utm_source=android-arsenal.com&utm_medium=r
eferral&utm_campaign=2527)

Created
Sep 15, 2015

Updated
Nov 23, 2015 (Retired)

Owner
Juan Carlos Moreno (jcmore2) (/user/jcmore2)

Contributor
1 (https://github.com/jcmore2/BannerTime/graphs/contributors?utm_source=android-arsenal.com&utm_m
edium=referral&utm_campaign=2527)

Activity

Badge
 Generate

Download
 Source code
 APK file

Promotion
     

65% of Traders Lose


eToro™- No.1 in Money. Join 9M Users
Worldwide & Learn to
Social Trading Invest Better. Start Today!

BannerTime

BannerTime create a scheduled popup to show your personal message

(https://github.com/jcmore2/BannerTime/raw/master/raw/sample.png?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=2527)
(https://github.com/jcmore2/BannerTime/raw/master/raw/bannertime.gif?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=2527)

Usage

Add library to your build.gradle:

compile 'com.jcmore2.bannertime:bannertime:1.1.1'

If you don´t want to use Picasso Library (You may notice that you are not be able to use
"imageBanner()" and "imageBannerPlaceholder()" methods):

compile ('com.jcmore2.bannertime:bannertime:1.1.1') {
exclude module: 'picasso'
}

Init BannerTime in your onResume() Activity:

@Override
protected void onResume() {
super.onResume();
BannerTime.init(this)
.shownTime(4000)
.hiddenTime(3000)
.imageBanner("http://pre03.deviantart.net/2aa0/th/pre/f/2012/321/d/1/af
.withKOButton()
.withKOButton()
.show();
}
(https://github.com/jcmore2/BannerTime/raw/master/raw/default.gif?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=2527)

You can also use a callback:


BannerTime.init(this)
.shownTime(4000)
.hiddenTime(3000)
.imageBanner("http://pre03.deviantart.net/2aa0/th/pre/f/2012/321/d/1/africa
.withKOButton()
.withKOButton()
.show(new BannerTime.BannerTimeListener() {
@Override
public void onShow() {
Toast.makeText(mContext, "onShow", Toast.LENGTH_SHORT).show();
}

@Override
public void onDismiss() {
Toast.makeText(mContext, "onDismiss", Toast.LENGTH_SHORT).show();

@Override
public void onClickOk() {
Toast.makeText(mContext, "onClickOk", Toast.LENGTH_SHORT).show();

@Override
public void onClickKO() {
Toast.makeText(mContext, "onClickKO", Toast.LENGTH_SHORT).show();

@Override
public void onClickImage() {
Toast.makeText(mContext, "onClickImage", Toast.LENGTH_SHORT).show()

}
});

Init BannerTime with your custom view:

LayoutInflater layoutInflater = (LayoutInflater) mContext.


getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View contentView = layoutInflater.inflate(R.layout.custom_banner, null);

BannerTime.init(this)
.shownTime(4000)
.hiddenTime(3000)
.withView(contentView)
.setGravity(BannerTime.TOP)
.show();
(https://github.com/jcmore2/BannerTime/raw/master/raw/custom.gif?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=2527)

Pause BannerTime using:

@Override
protected void onPause() {
super.onPause();
BannerTime.onPause();
}

You can check the sample App!

Libraries Used

Picasso by Square (http://square.github.io/picasso/?utm_source=android-


arsenal.com&utm_medium=referral&utm_campaign=2527)

Credits & Contact

FreeView was created by jcmore2@gmail.com (mailto:jcmore2@gmail.com)

License

BannerTime is available under the Apache License, Version 2.0.


65% of Traders Lose
eToro™- No.1 in Money. Join 9M Users
Worldwide & Learn to
Social Trading Invest Better. Start Today!

Follow us on Twitter (https://twitter.com/Android_Arsenal?utm_source=android-


arsenal.com&utm_medium=referral&utm_campaign=2527)

Read us in Telegram (https://telegram.me/AndroidArsenal?utm_source=android-


arsenal.com&utm_medium=referral&utm_campaign=2527)

Get Android app on Google Play (https://play.google.com/store/apps/details?


id=com.android_arsenal.androidarsenal&utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=2527)

Stay informed with Pushbullet (https://www.pushbullet.com/channel?tag=android_arsenal&utm_source=android-


arsenal.com&utm_medium=referral&utm_campaign=2527)

Created by Vladislav Bauer (https://github.com/vbauer?utm_source=android-


arsenal.com&utm_medium=referral&utm_campaign=2527)
 (https://twitter.com/BauerVlad?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=2527)
 (https://www.linkedin.com/in/vladislavbauer?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=2527)
 (https://www.paypal.me/VladislavBauer?utm_source=android-
arsenal.com&utm_medium=referral&utm_campaign=2527)
© 2014-2018 - Android Arsenal (/) | Privacy (/privacy)

Potrebbero piacerti anche