java - Big elements on device with high screen density -


i have application elements (buttons, images, ...) in layout. images in resources ldpi, mdpi, ... , xxhdpi. if run application on tablet 7" (800x480) elements has "correct" size. if run application on samsung galaxy s3 mini 4" (screen size 480x800) elements big.

how can decrease size of elements automatically? tried insert these lines manifest, without succesfull.

<supports-screens android:xlargescreens="true" android:smallscreens="true" android:largescreens="true" android:normalscreens="true"      android:resizeable="true" /> 

edit here images.

wrong wrong

good good

source:

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:paddingbottom="@dimen/activity_vertical_margin" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" tools:context=".mainactivity" >  <linearlayout     android:layout_width="fill_parent"     android:layout_height="wrap_content"     android:gravity="right" >      <imagebutton         android:id="@+id/btnremove"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:src="@drawable/close"         android:onclick="btnremovesong"         android:contentdescription="@string/remove"         android:layout_marginright="20dp" />      <imagebutton         android:id="@+id/btnup"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:contentdescription="@string/move_up"         android:onclick="moveup"         android:src="@drawable/up" />      <imagebutton         android:id="@+id/btndown"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:src="@drawable/down"         android:contentdescription="@string/move_down"         android:onclick="movedown"         android:layout_marginright="20dp" />      <textview         android:id="@+id/txvcurrentsong"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_gravity="center"         android:singleline="true"         android:text="@string/play_with"         android:textappearance="?android:attr/textappearancemedium" />  </linearlayout>  <listview     android:id="@+id/listmp3"     android:layout_width="match_parent"     android:layout_height="0dp"     android:scrollbaralwaysdrawverticaltrack="true"     android:layout_weight="1" > </listview>  <seekbar     android:id="@+id/progress"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:layout_margintop="5dp"     android:layout_marginbottom="5dp" />  <linearlayout     android:layout_width="match_parent"     android:layout_height="wrap_content" >      <imagebutton         android:id="@+id/btnback"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:src="@drawable/ic_backward"         android:contentdescription="@string/backward"         android:onclick="backward"         android:layout_marginright="10dp" />      <imagebutton         android:id="@+id/btnplay"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:src="@drawable/ic_play"         android:contentdescription="@string/play"         android:onclick="playpause"         android:layout_marginright="10dp" />      <imagebutton         android:id="@+id/btnstop"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:src="@drawable/ic_stop"         android:contentdescription="@string/stop"         android:onclick="stop"         android:layout_marginright="10dp" />      <imagebutton         android:id="@+id/btnforward"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:src="@drawable/ic_forward"         android:contentdescription="@string/forward"         android:onclick="forward"         android:layout_marginright="20dp" />      <textview         android:id="@+id/txvprogress"         android:layout_width="match_parent"         android:layout_height="wrap_content"         android:layout_gravity="center"         android:singleline="true"         android:text="@string/play_status"         android:textappearance="?android:attr/textappearancemedium" />  </linearlayout> 

ok, make specific widths , heights layout-sw600. solutions


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -