0

I am designing an application for TV. When I load my application to TV screen, I see it still has the sizes of a smartphone. I have been playing with different dpi's but not working. Spent a day on this.

What are the steps to design the layout so that it will fit the TV screen?

This is my xml file:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/RelativeLayout1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    android:background="#FFFFFF"
    android:gravity="center" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:contentDescription="@string/logimgdesc"
        android:src="@drawable/logo" />

    <Button
        android:id="@+id/btnStart"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_marginRight="36dp"
        android:text="@string/start" />

    <Button
        android:id="@+id/btnDownload"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_marginRight="36dp"
        android:text="@string/download" />

    <Button
        android:id="@+id/btnStop"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBaseline="@+id/spyonme"
        android:layout_alignBottom="@+id/spyonme"
        android:layout_alignLeft="@+id/btnLoadFP"
        android:text="@string/stop" />


</RelativeLayout>
Erol
  • 6,478
  • 5
  • 41
  • 55
  • 1
    What is it doing? What do you want it to do? Did you read this? http://developer.android.com/guide/practices/screens_support.html – twaddington Jun 22 '12 at 01:51
  • 1
    How are you communicating between the tv and the mobile? wifi,uart? – user1092042 Jun 22 '12 at 01:51
  • @twaddington, it looks like that document will be useful. I will have a look. Thank you. user1092042, I have an intermediate device that runs android and connects to TV via HDMI. I am doing WIFI debugging. – Erol Jun 22 '12 at 15:23
  • @twaddington, I can accept your answer if you add it below. It solves my problem. – Erol Jun 22 '12 at 17:41

1 Answers1

0

There are many different ways to implement support for multiple-screen sizes. I'd suggest you read the Supporting Multiple Screens guide on the Android developer site.

twaddington
  • 11,607
  • 5
  • 35
  • 46