Wednesday, June 19, 2013

[android help] Menu design not uniform for all resolutions


Menu design not uniform for all resolutions


android - Menu design not uniform for all resolutions - Stack Overflow







Tell me more ×

Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

















i am trying to implemnt a app in i wrote code to draw APP Menu .In my application Menu is drawing at top_center of the layout for all resolution as shown in below images.


For Low resolutionFor 10For 10


But i need Buttons at horizontal&vertical center of layout for all resolutions and screens.


Currently i am using below code.



xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/myLinear"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#2E9AFE"
android:orientation="vertical"
tools:context=".MainActivity" >

android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:text="Choose an Option"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@android:color/white"
android:textSize="25dp"
android:textStyle="bold"
android:typeface="sans" />

"

android:id="@+id/bDefSms"
android:layout_width="256dp"
android:layout_height="64dp"
android:layout_gravity="center"
android:layout_marginBottom="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/blackbutton"
android:drawableLeft="@drawable/sms"
android:paddingBottom="20dp"
android:text="AAA"
android:textColor="@android:color/white"
android:textSize="32dp"
android:textStyle="bold" />

android:id="@+id/bSMS"
android:layout_width="256dp"
android:layout_height="64dp"
android:layout_gravity="center"
android:layout_marginBottom="10dp"
android:background="@drawable/blackbutton"
android:drawableLeft="@drawable/defsms"
android:text="BBB"
android:textColor="@android:color/white"
android:textSize="32dp"
android:textStyle="bold" />

android:id="@+id/bMMS"
android:layout_width="256dp"
android:layout_height="64dp"
android:layout_gravity="center"
android:layout_marginBottom="10dp"
android:background="@drawable/blackbutton"
android:drawableLeft="@drawable/mms"
android:text="CCC"
android:textColor="@android:color/white"
android:textSize="32dp"
android:textStyle="bold" />

android:id="@+id/bMail"
android:layout_width="256dp"
android:layout_height="64dp"
android:layout_gravity="center"
android:background="@drawable/blackbutton"
android:drawableLeft="@drawable/email"
android:text="DDD"
android:textColor="@android:color/white"
android:textSize="32dp"
android:textStyle="bold" />




Please help me.
















Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.










default






.

stackoverflow.comm

No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...