我需要建立類似的東西,有8個的ImageView Container,並能夠得到每個然後使用代碼的LinearLayout多的ImageView裏,我已經有了代碼,以圖像在畫廊,但是我卡上,我當前的代碼我有這樣的:
<LinearLayout
android:orientation="vertical"
android:focusable="true"
android:focusableInTouchMode="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<HorizontalScrollView
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:orientation="horizontal"
android:id="@+id/linearImages"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
</LinearLayout>
</HorizontalScrollView>
活動:
linearImages = (LinearLayout)findViewById(R.id.linearImages);
Test = new ImageView(this);
galleryIntent(){.......
Test.setImageBitmap(bitmap);
linearImages.addView(Test);
但只有兩個圖像的作品!
maibe在佈局中只有更多圖像沒有空間? –
我該如何工作?起初我增加了8個圖像瀏覽器,但它不是正確的方法 –
如果只有其中2個圖像適合它,你想如何在圖像中放置圖像?你必須自己決定。 –