我刚刚为 Gallary 做了一些代码,现在它工作正常。我已经按照这个链接访问了http://developer.android.com/resources/tutorials/views/hello-gallery.html。但是我的概念仍然不清楚。我在那里使用了样式,这是什么?还有一件事,是否可以更改画廊显示模式(我的意思是它的默认模式是 LR 或 RL 我们可以将其更改为 Top-Bottom 或 Bottom -最佳)。
TypedArray attr = mContext
.obtainStyledAttributes(R.styleable.HelloGallery);
mGalleryItemBackground = attr.getResourceId(
R.styleable.HelloGallery_android_galleryItemBackground, 0);
attr.recycle();