an simple CountView for advertisement
allprojects { repositories { ... maven { url 'https://jitpack.io' } } }
dependencies { compile 'com.github.flyou:AdCountView:1.0.3' }
<com.flyou.AdCountView android:id="@+id/ad_count_view1" android:layout_width="80dp" android:layout_height="80dp" />
<com.flyou.AdCountView android:id="@+id/ad_count_view1" app:text="enter app" app:textColor="@color/base_white_50" app:textSize="16dp" app:backgroundColor="@color/base_black_50" app:outRingColor="@color/colorAccent" android:layout_width="80dp" android:layout_height="80dp" />
adCountView1 = (AdCountView) findViewById(R.id.ad_count_view1); adCountView1.start();
adcountview1 = (AdCountView) findViewById(R.id.ad_count_view2); adcountview1.setbackgroundColor(getResources().getColor(R.color.base_white_80)); adcountview1.setOutRingColor(getResources().getColor(R.color.colorAccent)); adcountview1.setTextClor(getResources().getColor(R.color.base_black_100)); adcountview1.setText("进入应用"); adcountview1.start();
adcountview3 = (AdCountView) findViewById(R.id.ad_count_view3); adcountview3.setbackgroundColor(getResources().getColor(R.color.base_black_30)); adcountview3.setOnClickListener(this); adcountview3.setOnStatusChangeListener(this); adcountview3.setOutRingColor(getResources().getColor(R.color.lightseagreen)); adcountview3.setTextClor(getResources().getColor(R.color.base_white_100)); adcountview3.setText("跳过广告"); adcountview3.setTextSize(15); adcountview3.start();
blog: flyou.ren
email: email me
AdCountView is under the Apache2.0 license. See the LICENSE file for details.