1

私は長い間これを修正しようとしてきましたが、有用なものが見つかりませんでした。

次のような単純な xml レイアウト ファイルがあります。

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="@drawable/bg_with_shadow"
    android:orientation="horizontal"
    android:padding="5dip" >

    <LinearLayout
        android:id="@+id/llThumbnail"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_marginRight="5dip"
        android:background="@drawable/list_image_bg"
        android:padding="3dip" >

        <ImageView
            android:id="@+id/imageViewAppIcon"
            android:layout_width="50dip"
            android:layout_height="50dip" />
    </LinearLayout>

    <TextView
        android:id="@+id/textViewAppName"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@+id/llThumbnail"
        android:layout_toRightOf="@+id/llThumbnail"
        android:text="App Name Here"
        android:textColor="#000000"
        android:textSize="15dip"
        android:textStyle="bold"
        android:typeface="sans" />

    <RatingBar
        android:id="@+id/ratingBar"
        style="?android:attr/ratingBarStyleSmall"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:layout_below="@+id/llThumbnail"
        android:isIndicator="true"
        android:numStars="5"
        android:stepSize="0.5"
        android:rating="4" />


</RelativeLayout>

問題は、評価バーが 1 つのデバイスでは期待どおりに完全によく見えますが、別のデバイス (HTC One、Android バージョン: 4.2.2) では完全に乱れているように見えることです。上記の xml は、listView 内に (行) 表示されます。

スナップショットは次のとおりです。

ここに画像の説明を入力

4

0 に答える 0