私は理解できないように見える問題を抱えているようです。私のアプリには、800x2200 (Photoshop で作成) の画像があります。samsung gs2 でアプリをテストすると、画像は完全に表示され、問題なく上下にスクロールできます。小さな画面サイズでテストするとうまくいきますが、10.1インチの画面でテストすると、空白の画面が表示されますが、スクロールできるようです(左側にスクロールバーが表示されているように)画像がありますが、表示されません) すべての描画可能なフォルダーに画像を配置しましたが、運がありません.誰かが問題が何であるか、または私が何か間違ったことをしているという考えを持っていますか?ありがとう
申し訳ありませんが、コードは次のとおりです。
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.sample);
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
final SlidingDrawer slider = (SlidingDrawer) findViewById(R.id.slidingD1);
Display d = getWindowManager().getDefaultDisplay();
DisplayMetrics dm = new DisplayMetrics();
d.getMetrics(dm);
Log.d("DISPLAYINFO", "Classified density: " + dm.densityDpi + ", scaled density: " + dm.scaledDensity + ", actual densities: x: " + dm.xdpi + ", y: " + dm.ydpi);
slider.animateOpen();
Button next = (Button) findViewById(R.id.img1);
.....
next.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
((ImageView) findViewById(R.id.imageV1)).setImageResource(0);
((ImageView) findViewById(R.id.imageV1)).setImageResource(R.drawable.image1);
slider.animateClose();
}
});
......
}
}
および xml ファイル:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/imageV1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="fitStart"/>
</RelativeLayout>
</ScrollView>
<SlidingDrawer
android:id="@+id/slidingD1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:content="@+id/content"
android:handle="@+id/handle">
<Button
android:id="@+id/handle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Select Sample"/>
<RelativeLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_image">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<Button
android:id="@+id/samp1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:background="@drawable/samplethumb1"
android:text="Sample1"
android:textColor="#FFFFFF"
android:textSize="20dp"
android:textStyle="bold"
android:typeface="serif" />