私は動的にlinearlayoutを作成し、それにいくつかのimageviewsとtextviewsを追加しています。
コード
ScrollView sv = new ScrollView(this);
LinearLayout llay = new LinearLayout(this);
for(int i =0;i<ns;i++){
TextView tv = new TextView(this);
ImageView iv = new ImageView(this);
iv.setLayoutParams(new LinearLayout.LayoutParams(100,100,50));
llay.addView(tv);
llay.addView(iv);
}
アプリケーションの実行時
1番目のデバイス:imageviewsは適切なサイズです。
2番目のデバイス:imageviewsが小さすぎます。
デバイスに依存しないように、imageviewのサイズを明示的に設定する方法はありますか?