Android ScrollTextView. You can use it in advisement player,TV news show or airport metro information public system App. 🇨🇳Android 滚动字幕跑马灯,可是使用在广告机设备,电视广告位或其他在机场,地铁使用的信息发布系统App使用
Caused by: java.lang.ClassCastException: android.app.Presentation$3 cannot be cast to android.app.Activity
at anylife.scrolltextview.ScrollTextView.(ScrollTextView.java:103)
at java.lang.reflect.Constructor.newInstance0(Native Method)
原因分析:可能我用的是AppCompatActivity,而此库写死为Activity强制转换,出现错误
DisplayMetrics metric = new DisplayMetrics();
((Activity) context).getWindowManager().getDefaultDisplay().getMetrics(metric);
density = metric.density;
Caused by: java.lang.ClassCastException: android.app.Presentation$3 cannot be cast to android.app.Activity at anylife.scrolltextview.ScrollTextView.(ScrollTextView.java:103)
at java.lang.reflect.Constructor.newInstance0(Native Method)
原因分析:可能我用的是AppCompatActivity,而此库写死为Activity强制转换,出现错误 DisplayMetrics metric = new DisplayMetrics(); ((Activity) context).getWindowManager().getDefaultDisplay().getMetrics(metric); density = metric.density;