There seems to be some rendering problems when using phone Moto G3 with Marshmallow 6.0. With Lollipop it works fine.
I'm using these setting in the manifest
android:minSdkVersion="14"
android:targetSdkVersion="21"
When debugging with Android studio preview screens set to API 23 I cant find any rendering issues.
Any ideas how to solve this?
Here is the layout that has issues
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:minWidth="330dp"
android:minHeight="300dp"
android:background="@color/agrey"
android:gravity="center" >
<EditText
android:id="@+id/etNameny"
android:layout_width="180dp"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:layout_marginTop="45dp"
android:background="@drawable/myborderlist"
android:ems="5"
android:maxLength="10"
android:paddingLeft="5dp"
android:singleLine="true"
android:textColor="@color/black"
android:textSize="25dp" />
<Button
android:id="@+id/etDate1ny"
android:layout_width="180dp"
android:layout_height="40dp"
android:background="@drawable/myborderlist"
android:editable="false"
android:ems="5"
android:inputType="date|none"
android:maxLength="10"
android:onClick="setDate"
android:paddingLeft="5dp"
android:singleLine="true"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="25dp"
android:layout_above="@+id/trName"
android:layout_toRightOf="@+id/trName"
android:layout_toEndOf="@+id/trName">
</Button>
<EditText
android:id="@+id/inkl1ny"
android:layout_width="180dp"
android:layout_height="40dp"
android:background="@drawable/myborderlist"
android:ems="5"
android:maxLength="10"
android:paddingLeft="5dp"
android:singleLine="true"
android:textColor="@color/black"
android:textSize="25dp"
android:layout_below="@+id/momsprocent11ny"
android:layout_alignLeft="@+id/momsprocent11ny"
android:layout_alignStart="@+id/momsprocent11ny"
android:inputType="numberDecimal" />
<EditText
android:id="@+id/momsprocent11ny"
android:layout_width="180dp"
android:layout_height="40dp"
android:layout_alignLeft="@+id/etNameny"
android:layout_below="@+id/etNameny"
android:background="@drawable/myborderlist"
android:ems="5"
android:inputType="numberDecimal"
android:paddingLeft="5dp"
android:singleLine="true"
android:textColor="@color/black"
android:textSize="25dp" />
<TextView
android:id="@+id/trName"
android:layout_width="170dp"
android:layout_height="40dp"
android:layout_alignLeft="@+id/bClear1"
android:layout_toLeftOf="@+id/etNameny"
android:maxLength="10"
android:singleLine="false"
android:text="@string/tbName"
android:textColor="@color/black"
android:textSize="15dp"
android:layout_above="@+id/momsprocent11ny" />
<TextView
android:id="@+id/trDateCopy"
android:layout_width="170dp"
android:layout_height="40dp"
android:layout_alignBottom="@+id/momsprocent11ny"
android:layout_alignLeft="@+id/trName"
android:layout_toLeftOf="@+id/etDate1ny"
android:maxLength="10"
android:singleLine="true"
android:text="@string/tbVatProcent"
android:textColor="@color/black"
android:textSize="14dp" />
<TextView
android:id="@+id/tvAlv141"
android:layout_width="150dp"
android:layout_height="40dp"
android:layout_above="@+id/bClear1"
android:layout_toLeftOf="@+id/etDate1ny"
android:maxLength="6"
android:singleLine="true"
android:text="@string/tbSum"
android:textColor="@color/black"
android:textSize="14dp"
android:layout_alignLeft="@+id/trDateCopy" />
<Button
android:id="@+id/bClear1"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/inkl1ny"
android:layout_marginBottom="5dp"
android:layout_marginTop="36dp"
android:background="@drawable/myborderlist"
android:maxLength="6"
android:text="@string/akCancel" />
<Button
android:id="@+id/buttonMain"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/bAdd1"
android:layout_alignBottom="@+id/bAdd1"
android:layout_marginBottom="5dp"
android:layout_toRightOf="@+id/bClear1"
android:background="@drawable/myborderlist"
android:maxLength="6"
android:text="@string/akClear" />
<Button
android:id="@+id/bAdd1"
android:layout_width="90dp"
android:layout_height="wrap_content"
android:background="@drawable/myborderlist"
android:maxLength="6"
android:text="@string/akAdd"
android:layout_alignTop="@+id/bClear1"
android:layout_toRightOf="@+id/buttonMain"
android:layout_toEndOf="@+id/buttonMain" />
</RelativeLayout>
Here follows the difference between Lollipop and Marshmallow
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…