Note that there are some explanatory texts on larger screens.

plurals
  1. POOne game layout
    primarykey
    data
    text
    <p>I want to make a match game layout in android. I'm having problem with making my layout compitable to all screen resolutions. What I want, is an image icon of the home team on the left, a strechable home team image name, home team score text, seperator, away team score text, a strechable away team image name, an image icon of the away team on the right. The score should be in the middle. I just can't get it right. before this try, I've tried to divide the main layout to 3 layouts: home team layout, score layout and away layout - with no success of getting the expected result.</p> <p>Can someone please help ?</p> <p>Here is my piece of code:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:background="@color/GamesBGColor" &gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center" android:orientation="horizontal" &gt; &lt;ImageView android:id="@+id/homeTeamIcon" android:layout_width="50dip" android:layout_height="wrap_content" android:layout_gravity="center" android:src="@drawable/holonlogo" /&gt; &lt;ImageView android:id="@+id/homeTeamText" android:layout_height="wrap_content" android:layout_gravity="center" android:src="@drawable/holontext" android:layout_width="115dip" android:layout_marginLeft="3dip" /&gt; &lt;TextView android:id="@+id/homeTeamScore" android:layout_width="25dip" android:layout_height="wrap_content" android:text="123" android:textColor = "@color/purple" android:layout_gravity="center" android:textStyle="bold" android:layout_marginLeft="5dip" /&gt; &lt;TextView android:id="@+id/seperator" android:layout_width="10dip" android:layout_height="wrap_content" android:text="-" android:layout_gravity="center" android:layout_marginLeft="7dip" /&gt; &lt;TextView android:id="@+id/awayTeamScore" android:layout_width="25dip" android:layout_height="wrap_content" android:text="122" android:textColor = "@color/red" android:layout_gravity="center" android:textStyle="bold" android:layout_marginLeft="7dip" /&gt; &lt;ImageView android:id="@+id/awayTeamText" android:layout_height="wrap_content" android:layout_gravity="center" android:src="@drawable/jerusalemtext" android:layout_width="115dip" android:layout_marginLeft="3dip"/&gt; &lt;ImageView android:id="@+id/awayTeamIcon" android:layout_width="50dip" android:layout_height="wrap_content" android:layout_gravity="center" android:src="@drawable/jerusalemlogo" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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