Don't use pixels (px) units, instead use sp units.  On a device with
no screen scalling they map 1sp = 1px;  but on a scalled screen sp
units scale to match the device resolution. see:

http://developer.android.com/guide/topics/resources/more-resources.html#Dimension

for the full explanation.

On Aug 4, 11:18 am, Sarwar Erfan <[email protected]> wrote:
> What exactly do you mean by 'according to screen size'? Depends on
> what you want to do.
>
> For example, if you want a button to take whole available width, then
> use:
> android:layout_width="fill_parent"
>
> Regards
> Sarwar Erfan
>
> On Aug 4, 3:44 pm, "A N K ! T" <[email protected]> wrote:
>
> > i am trying to set size of edit text and buttons according to screen size
> > so what i want to know is there any way to set EditText Width dynamically
> > according to screen size...
>
> > --
>
> >  A N K ! T......

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to