Sony XPERIA U (ST25i とも呼ばれます) の配色に問題があります。私のAndroidアプリでは、2と:layout.xml
のbg colorを設定しました(これはのフラグメントです)Buttons
ImageView
layout.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/update_app_group_start"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_gravity="center_vertical|center_horizontal"
android:layout_height="wrap_content">
<Button
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_weight="1"
android:layout_marginLeft="30dp"
android:layout_marginRight="10dp"
android:text="@string/update_button_update"
android:textColor="@color/my_white"
android:id="@+id/update_app_button_download"
android:textSize="20dp"
android:background="@color/my_light_blue"/>
<ImageView android:layout_width="2dp"
android:layout_height="48dp"
android:background="@color/my_light_blue"
android:id="@+id/update_app_buttons_delimiter"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"/>
<Button
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="30dp"
android:layout_weight="1"
android:text="@string/update_button_cancel"
android:textSize="20dp"
android:textColor="@color/my_white"
android:id="@+id/update_app_button_cancel"
android:background="@color/my_light_blue"/>
</LinearLayout>
とcolors.xml
:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="my_white">#ffffff</color>
<color name="my_light_blue">#33b5e5</color>
</resources>
ただし、activity
これらの要素の背景色では、予測できない色が設定されています。黄色、赤、または緑の色が時々あります。このような方法でコードに直接設定した場合:
final ImageView delimiter = (ImageView) findViewById(R.id.update_app_buttons_delimiter);
delimiter.setBackgroundColor(context.getResources().getColor(R.color.my_light_blue));
そしてそれはうまくいきます。
誰かがこの問題を発行しましたか? また、私は と を使用ActionBarSherlock
してViewPagerIndicator
います。
回答ありがとうございます。