好的我正在学习更多关于滑动手势的知识,我有这个signleviewactivity.java 它的perfeclty显示图像,但如何制作幻灯片图像而不使用碎片? 我阅读并测试了dev.android,但是他们正在使用片段,我可以不使用片段吗?
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.singleview);
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
// list = (ListView) findViewById(R.id.ListView);
toolbar = (Toolbar) findViewById(R.id.toolbar);
// setSupportActionBar(toolbar);
// getSupportActionBar().setDisplayHomeAsUpEnabled(true);
imageView = (ImageView) findViewById(R.id.funnyimage);
Bundle bundle = getIntent().getExtras();
ArrayList<Listitem> personArrayList = bundle.getParcelableArrayList("Person_List");
if (personArrayList != null && !personArrayList.isEmpty()) {
for (Listitem person : personArrayList) {
Picasso.
with(this).
load(person.url)
.placeholder(R.drawable.logo)
.fit()
.noFade()
.into(imageView);
Log.i("PersonsActivity",String.valueOf(person.url));
}
}
// GridViewAdaptersingle adapter = new GridViewAdaptersingle (getApplicationContext(), R.layout.singleviewadapter, personArrayList);
}