0

Well I know about the guidelines of android design but sometimes that wont help you in designing.

Specifically if your given design in no way near to android native design but it is more near to web design .

Well here is my picture which can give you the idea of my problem.

enter image description here

Now this is a layout of the Dialog , which looks good in the LandScape mode , but it screwd up in portrait mode some times some views gets chopped off or out of screen .

Question:? How can this can be handle in best way my not manipulating the design guide lines?

How can it looks same for each mode?

what is best way of designing to look same on each mode and on all devices ? in sense that it gets wider in wider screen and come near in small screens?

Final Question ?

Isnt it good to not to use the TextView to show labes i.e in my case it is displaying please select amount and each radio button has text which shows amount , is there any way to show the text label on the block level ? just look in the picture below? enter image description here

A.s.ALI
  • 1,992
  • 3
  • 22
  • 54

1 Answers1

0

in this case you should use linear layout with weights. It automatically adjusts to available dimensions. Here is a sample

<LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        android:weightSum="100">

        <RelativeLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="20"></RelativeLayout>

        <RelativeLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="20"></RelativeLayout>

        <RelativeLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="20"></RelativeLayout>

        <RelativeLayout
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="20"></RelativeLayout>

    </LinearLayout>

You can see more details here