Hi

  I have been working on my first app in Android and have study
various beginners books on the subject. At the moment the first app is
purely for my use to make sure that I understand the language before I
step into the realms of uploading to the market.

  My current issue that I have is that my landscape main.xml behaves
differently when run through the emulator to when I run it on my phone
(samsung Galaxy S2). Now I know that the screen on my phone is larger
that the emulator but I would have thought that the settings in my
main.xml would stop the edittext from stretching too much.

Here is my main.xml from my layout-land folder and it is my
Player2_name edit text object that stretches :

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="#006400"
    >

<EditText
    android:id="@+id/Player1_name"
    android:layout_width="150dp"

    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:text="Player 1"
/>

<EditText
    android:id="@+id/Player2_name"

    android:layout_alignParentRight="true"
    android:layout_alignParentTop="true"

    android:layout_height="wrap_content"
    android:layout_width="200dp"
    android:text="Player 2"

/>
<RadioButton
     android:id="@+id/Players1_turn"
     android:layout_below="@+id/Player1_name"

     android:layout_width="150dp"
     android:layout_height="35dp"
     android:text="turn?"
     android:textSize="15px"

 />
<RadioButton
     android:id="@+id/Players2_turn"
     android:layout_below="@+id/Player2_name"
     android:layout_toRightOf="@+id/Players1_turn"
     android:layout_alignLeft="@+id/Player2_name"
     android:layout_alignTop="@+id/Players1_turn"
     android:layout_width="150dp"
     android:layout_height="35dp"
     android:text="turn?"
     android:textSize="15px"

     />
     <TextView
     android:id="@+id/Player1_score"
     android:layout_below="@+id/Players1_turn"
     android:layout_alignLeft="@+id/Player1_score"
     android:text="Score :"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
/>
<TextView
     android:id="@+id/Player2_score"
     android:layout_below="@+id/Players2_turn"
     android:layout_alignLeft="@+id/Players2_turn"
     android:layout_alignTop="@+id/Player1_score"
     android:text="Score :"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
/>
<ImageButton
  android:background="@drawable/red_ball"
  android:id="@+id/redball"
  android:layout_width="65dp"
  android:layout_height="65dp"
  android:layout_below="@+id/Player1_score"

/>

<ImageButton
  android:background="@drawable/black_ball"
  android:id="@+id/blackball"
  android:layout_width="65dp"
  android:layout_height="65dp"
  android:layout_toRightOf="@+id/redball"
  android:layout_alignTop="@+id/redball"

/>

<ImageButton
  android:background="@drawable/green_ball"
  android:id="@+id/greenball"
  android:layout_width="65dp"
  android:layout_height="65dp"
  android:layout_toRightOf="@+id/blackball"
  android:layout_alignTop="@+id/blackball"
/>

<ImageButton
  android:background="@drawable/cue_ball"
  android:id="@+id/cueball"
  android:layout_width="65dp"
  android:layout_height="65dp"
  android:layout_toRightOf="@+id/greenball"
  android:layout_alignTop="@+id/greenball"
/>
<ImageButton
  android:background="@drawable/blue_ball"
  android:id="@+id/blueball"
  android:layout_width="65dp"
  android:layout_height="65dp"
  android:layout_below="@+id/redball"
  android:layout_alignLeft="@+id/redball"
/>
<ImageButton
  android:background="@drawable/pink_ball"
  android:id="@+id/pinkball"
  android:layout_width="65dp"
  android:layout_height="65dp"
  android:layout_toRightOf="@+id/blueball"
  android:layout_alignTop="@+id/blueball"
/>
<ImageButton
  android:background="@drawable/yellow_ball"
  android:id="@+id/yellowball"
  android:layout_width="65dp"
  android:layout_height="65dp"
  android:layout_toRightOf="@+id/pinkball"
  android:layout_alignTop="@+id/pinkball"
/>
<ImageButton
  android:background="@drawable/brown_ball"
  android:id="@+id/brownball"
  android:layout_width="65dp"
  android:layout_height="65dp"
  android:layout_toRightOf="@+id/yellowball"
  android:layout_alignTop="@+id/yellowball"
/>
<CheckBox
     android:id="@+id/Foul"
     android:layout_below="@+id/blueball"
     android:layout_width="100dp"
     android:layout_height="wrap_content"
     android:text="Foul"
/>
<CheckBox
     android:id="@+id/Sound_on_off"
     android:layout_toRightOf="@+id/Foul"
     android:layout_width="fill_parent"
     android:layout_alignTop="@+id/Foul"
     android:layout_height="50dp"
     android:text="Sound Effect"
/>


</RelativeLayout>

Any ideas?

Cheers

TCS

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to