Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid - Layout for both Galaxy S4 and Nexus 5
    primarykey
    data
    text
    <p>Is there a specific qualifier I can use in order to make different Layouts specifically for Nexus 5? </p> <p>I'm using <strong>layout-xhdpi</strong> for devices such as Galaxy S4 (I've checked on S4 Active which has physical keys) and Note 2, and I don't want to change anything there.</p> <p><strong>EDIT #2</strong> The cause of difference between S4 and Nexus 5, not considering the fact that the Layout is not optimal, is that the effective screen size is not as Galaxy S4 (1920) but smaller - 1776, because of the soft keys.</p> <p><strong>EDIT #3</strong> This is the new layout with only one Relative Layout: (the problem is that <strong>android:id="@+id/nextlevel"</strong> is located behind <strong>android:id="@+id/banner_adview"</strong>)</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/bg" android:gravity="center_horizontal" android:orientation="vertical" &gt; &lt;TextView android:id="@+id/endlevel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_centerVertical="true" android:layout_marginBottom="13dp" android:background="@drawable/header" android:gravity="center" android:paddingBottom="1dp" android:paddingLeft="15dp" android:paddingRight="15dp" android:paddingTop="1dp" android:textColor="#ecf0f1" android:textSize="20sp" android:textStyle="normal" &gt; &lt;/TextView&gt; &lt;TextView android:id="@+id/congratulations" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/endlevel" android:layout_centerHorizontal="true" android:layout_marginBottom="7dp" android:gravity="center" android:text="@string/congratulations" android:textColor="#ecf0f1" android:textSize="19sp" android:textStyle="bold" &gt; &lt;/TextView&gt; &lt;ImageView android:id="@+id/summary" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/congratulations" android:layout_centerHorizontal="true" android:layout_marginBottom="10dp" android:layout_marginTop="7dp" android:background="@drawable/levelendresultbg" /&gt; &lt;TextView android:id="@+id/pointstext" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/congratulations" android:layout_marginTop="11dp" android:gravity="center" android:textColor="#ecf0f1" android:textSize="17sp" android:textStyle="bold" &gt; &lt;/TextView&gt; &lt;ImageView android:id="@+id/divider" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/pointstext" android:layout_centerHorizontal="true" android:layout_marginBottom="5dp" android:layout_marginTop="5dp" android:src="@drawable/divider" /&gt; &lt;TextView android:id="@+id/totalpointstext" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/divider" android:layout_marginBottom="4dp" android:gravity="center" android:textColor="#e1c736" android:textSize="17sp" android:textStyle="bold" /&gt; &lt;ImageView android:id="@+id/award" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/endlevel" android:layout_centerHorizontal="true" android:layout_marginLeft="10dp" android:layout_toRightOf="@id/congratulations" android:src="@drawable/award" /&gt; &lt;TextView android:id="@+id/topborder" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/totalpointstext" android:layout_marginTop="13dp" android:background="@drawable/border" android:gravity="left" android:paddingLeft="10dp" android:textColor="#ecf0f1" android:textSize="17sp" android:textStyle="bold" /&gt; &lt;ListView android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="280dp" android:layout_below="@id/topborder" android:background="@color/transparent" android:cacheColorHint="#00000000" android:fadeScrollbars="false" /&gt; &lt;TextView android:id="@+id/bottomborder" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@android:id/list" android:background="@drawable/border" android:gravity="center" /&gt; &lt;ImageButton android:id="@+id/nextlevel" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/bottomborder" android:layout_centerHorizontal="true" android:layout_gravity="center" android:layout_marginTop="30dp" android:background="@drawable/nextlevelbutton" android:textSize="20sp" /&gt; &lt;com.google.ads.AdView xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" android:id="@+id/banner_adview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" ads:adSize="BANNER" ads:adUnitId="XXXXXXXXXXXX" ads:loadAdOnCreate="true" android:background="@drawable/adback" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload