use of com.shizhefei.view.indicator.Indicator in project ViewPagerIndicator by LuckyJayce.
the class GuideActivity method onCreate.
@Override
protected void onCreate(Bundle arg0) {
super.onCreate(arg0);
setContentView(R.layout.activity_guide);
//ViewPager,Indicator
ViewPager viewPager = (ViewPager) findViewById(R.id.guide_viewPager);
Indicator indicator = (Indicator) findViewById(R.id.guide_indicator);
indicatorViewPager = new IndicatorViewPager(indicator, viewPager);
inflate = LayoutInflater.from(getApplicationContext());
indicatorViewPager.setAdapter(adapter);
Toast.makeText(getApplicationContext(), "6秒后更新界面适配器", Toast.LENGTH_SHORT).show();
new Thread() {
@Override
public void run() {
super.run();
try {
Thread.sleep(6000);
} catch (InterruptedException e) {
e.printStackTrace();
}
runOnUiThread(new Runnable() {
@Override
public void run() {
images = new int[] { R.drawable.p3, R.drawable.p4 };
adapter.notifyDataSetChanged();
}
});
}
}.start();
}
Aggregations