我有一个图像视图和一个textView。使图像视图看起来在每个设备相同
当我在更大的设备上测试它时,图像改变了他的位置。
布局的xml:
<TextView
android:id="@+id/monedas_pow"
android:text="300"
android:textSize="29sp"
android:layout_marginLeft="10dp"
android:textColor="@color/titlecolor"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<ImageView
android:id="@+id/summary_btn"
android:src="@drawable/coin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="525dp"
android:layout_toRightOf="@id/monedas_pow"
android:layout_marginTop="8dp"
android:layout_marginLeft="5dp"
android:layout_marginRight="280dp" />
的[我如何使用复合绘制的,而不是一个包含的ImageView和一个TextView一个的LinearLayout(HTTP可能重复:// stackoverflow.com/questions/8318765/how-do-i-use-a-compound-drawable-instead-of-a-linearlayout-that-contains-an-imag) –
您必须为不同的设备创建不同的文件夹,其中包含设备样式,尺寸等。 – HaroldSer
marginBottom是你有的问题。 –