Q:

optimizing screen from phone size to tablet size android development

I am fairly new to java and android.  at the moment i am studying java at school.  i just started working in this calculator just to get my hand in android developing.  my problem at the moment is that when i deploy the app to the emulator (phone size 480x800) looks like Pic 001, but when i deploy it to my Kindle fire 1st gen (1024x600 i believe) looks like Pic 002.  how can i make it so it look the same in every phone. 

XML File

A:

In order to have your buttons fill the entire width of your screen, put this in your tags Button:
android:layout_width="0dp" android:layout_weight="1"

instead of :
android:layout_width="80dp"

If you want the buttons to be higher :
- In your tags Button change android:layout_height="80dp" to android:layout_height="match_parent". 
- In your tags LinearLayout which contain your buttons change android:layout_height="wrap_content" to android:layout_height="0dp" android:layout_weight="1". 
- In your tag TextView change android:layout_height="wrap_content" to android:layout_height="0dp" android:layout_weight="X" where X is the value that gives you the right proportions. You will have a warning telling your that nested weight are bad for performance but it's the only way I know to do this. 
In general, if you want a component to fill the empty space, set the width or height to 0dp and add a weight.  The weight will define the proportions of the elements which want to fill the space. 

I hope it will help you. 