开发者

App Screen Scaling

开发者 https://www.devze.com 2023-03-01 00:49 出处:网络
I am working on my first app which contains no graphics at all just text and standard button views. It looks great on my Droid but I tested it on a Droid2 and it is tiny. I read the document.

I am working on my first app which contains no graphics at all just text and standard button views. It looks great on my Droid but I tested it on a Droid2 and it is tiny. I read the document.

Supporting Multiple Screens

and I have added to the manifest

            <supports-screens 
            android:resizeable="true"
            android:largeScreens="false" 
            android:normalScreens="true" 
            android:smallScreens="false"
            android:anyDensity="false" />

Still no worky!

What am I doing wrong?

Here is the XML of the layout.

<TextView 
android:text="" 
android:textSize="8pt"
android:layout_gravity="center_horizontal"
android:textColor="#FCFCFC" 
android:id="@+id/textView1" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content"
></TextView>

<TextView 
android:text="Every time this" 
android:textSize="8pt"
android:layout_gravity="center_horizontal"
android:textColor="#FCFCFC" 
android:id="@+id/textView2" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content"
></TextView>

<TextView 
android:text="X"
android:id="@+id/textView3" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content"
android:layout_gravity="center"
android:textSize="90pt"
android:textColor="#FCFCFC"
></TextView>

<TextView 
android:text="appears" 
android:textSize="8pt"
android:layout_gravity="center_horizontal"
android:textColor="#FCFCFC" 
android:id="@+id/textView4" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content"
></TextView>

<TextView 
android:text="" 
android:textSize="6pt"
android:layout_gravity="center_horizontal"
android:textColor="#FCFCFC" 
android:id="@+id/textView5" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content"
></TextView>

<TextView 
android:text="Press the button" 
android:textSize="8pt"
android:layout_gravity="center_horizontal"
android:textColor="#FCFCFC" 
android:id="@+id/textView6" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content"
></TextView>


<Button 
android:text="Begin"
android:textSize="8pt"
android:layout_gravity="center_horizontal"
android:id="@+id/Bbegin" 
andr开发者_如何转开发oid:layout_width="80pt" 
android:layout_height="30pt"
android:layout_alignParentBottom="true"
></Button>

Thanks in advance


instead of setting your text size / layout widths ect. with pt use the density independent dp. cheers

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号