Android 图像不会显示在HTC desire中,但可以在其他设备中使用
我正在使用布局,它可以在emulator和其他设备中工作,但不能在HTC图像中显示微调器和背景。请帮帮我。谢谢 我的问题就是这样Android 图像不会显示在HTC desire中,但可以在其他设备中使用,android,Android,我正在使用布局,它可以在emulator和其他设备中工作,但不能在HTC图像中显示微调器和背景。请帮帮我。谢谢 我的问题就是这样 几天前我遇到了类似的问题,背景在Nexus上不可见,但在模拟器上可见。我用的是高分辨率的图像。我把它缩小了,它成功了。看,这可能对你有帮助 编辑 有两种方法: 打开Adobe Photoshop(或任何其他类似工具),打开图像,按ALT+CTRL+I并定义新图像大小。并替换您的图像。这是一种更简单的方法。注意:我将图像大小更改为1280 x 800,这对我来说最初
几天前我遇到了类似的问题,背景在Nexus上不可见,但在模拟器上可见。我用的是高分辨率的图像。我把它缩小了,它成功了。看,这可能对你有帮助 编辑 有两种方法:
请参见发布您的布局XML我正在使用drawable中的图像,我将其放在所有四个文件夹中…因此我认为这不是问题。如果您的问题回答正确,请将其标记为已解决,以便它不会出现在未回答的问题中
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white"
android:orientation="vertical" >
<TextView
android:id="@+id/title"
android:layout_width="fill_parent"
android:layout_height="40dp"
android:background="@color/header_bg"
android:gravity="center"
android:text="@string/title_activity"
android:textColor="@color/white"
android:textSize="25dp"
android:textStyle="bold" />
<TextView
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_marginTop="1dp"
android:background="@color/header_bg" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background"
android:orientation="vertical" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="21dp"
android:text="@string/duration"
android:textColor="@color/header_bg"
android:textSize="15dp"
android:textStyle="bold" />
<Spinner
android:id="@+id/spinner_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:layout_toLeftOf="@+id/Ptxt_duration"
android:background="@drawable/spin_small"
android:entries="@array/array_duration" />
<TextView
android:id="@+id/Ptxt_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="26dp"
android:text="@string/minutes"
android:textColor="@color/minute_txt"
android:textSize="15dp"
android:textStyle="bold" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="21dp"
android:text="@string/endbell"
android:textColor="@color/header_bg"
android:textSize="15dp"
android:textStyle="bold" />
<Spinner
android:id="@+id/spinner_dEndbell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="8dp"
android:layout_toLeftOf="@+id/btn_duration_preview"
android:background="@drawable/spin_big"
android:entries="@array/array_endbell" />
<Button
android:id="@+id/btn_duration_preview"
android:layout_width="wrap_content"
android:layout_height="25dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="16dp"
android:background="@drawable/btn_preview"
android:text="@string/preview"
android:textColor="@color/white"
android:textSize="15dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="21dp"
android:text="@string/preparationTime"
android:textColor="@color/header_bg"
android:textSize="15dp"
android:textStyle="bold" />
<Spinner
android:id="@+id/spinner_preparation"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="15dp"
android:layout_toLeftOf="@+id/Ptxt_pre"
android:background="@drawable/spin_small"
android:entries="@array/array_pretime"
android:gravity="center" />
<TextView
android:id="@+id/Ptxt_pre"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="26dp"
android:text="@string/minutes"
android:textColor="@color/minute_txt"
android:textSize="15dp"
android:textStyle="bold" />
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="21dp"
android:text="@string/endbell"
android:textColor="@color/header_bg"
android:textSize="15dp"
android:textStyle="bold" />
<Spinner
android:id="@+id/spinner_pEndbell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="8dp"
android:layout_toLeftOf="@+id/btn_pre_preview"
android:background="@drawable/spin_big"
android:entries="@array/array_endbell" />
<Button
android:id="@+id/btn_pre_preview"
android:layout_width="wrap_content"
android:layout_height="25dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="16dp"
android:background="@drawable/btn_preview"
android:text="@string/preview"
android:textColor="@color/white"
android:textSize="15dp" />
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:background="@drawable/layout_bg" >
<CheckBox
android:id="@+id/check_interval"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:button="@drawable/selector_checkbox"
android:paddingLeft="21dp"
android:text="@string/setintervalbell"
android:textColor="@color/color_checkbox_txt"
android:textStyle="bold" />
</LinearLayout>
<RelativeLayout
android:id="@+id/relative_bell"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp" >
<TextView
android:id="@+id/txt_playevery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="21dp"
android:text="@string/playevery"
android:textColor="@color/header_bg"
android:textSize="15dp"
android:textStyle="bold" />
<Spinner
android:id="@+id/spinner_intervalTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginRight="13dp"
android:layout_toLeftOf="@+id/Ptxt_interval"
android:background="@drawable/spin_small"
android:entries="@array/array_belltime" />
<TextView
android:id="@+id/Ptxt_interval"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="26dp"
android:text="@string/minutes"
android:textColor="@color/minute_txt"
android:textSize="15dp"
android:textStyle="bold" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/relative_time"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" >
<TextView
android:id="@+id/txt_intervalBell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="21dp"
android:text="@string/intervalbell"
android:textColor="@color/header_bg"
android:textSize="15dp"
android:textStyle="bold" />
<Spinner
android:id="@+id/spinner_intervalBell"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="2dp"
android:layout_marginRight="8dp"
android:layout_toLeftOf="@+id/btn_interval_preview"
android:layout_toRightOf="@+id/txt_intervalBell"
android:background="@drawable/spin_big"
android:entries="@array/array_endbell" />
<Button
android:id="@+id/btn_interval_preview"
android:layout_width="wrap_content"
android:layout_height="25dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="16dp"
android:background="@drawable/btn_preview"
android:text="@string/preview"
android:textColor="@color/white"
android:textSize="15dp" />
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:background="@drawable/layout_bg" >
<CheckBox
android:id="@+id/check_disturb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:button="@drawable/selector_checkbox"
android:paddingLeft="20dp"
android:text="@string/donotdisturb"
android:textColor="@color/color_checkbox_txt"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:background="@drawable/layout_bg" >
<CheckBox
android:id="@+id/check_whitenoise"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:button="@drawable/selector_checkbox"
android:paddingLeft="20dp"
android:text="@string/whitenoise"
android:textColor="@color/color_checkbox_txt"
android:textStyle="bold" />
</LinearLayout>
<Button
android:id="@+id/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="8dp"
android:layout_marginTop="34dp"
android:background="@drawable/selector_btn_start"
android:gravity="center"
android:text="@string/save"
android:textColor="@color/white"
android:textStyle="bold" />
</LinearLayout>
</ScrollView>
</LinearLayout>