1. Are you ready for the Galaxy S20? Here is everything we know so far!

images are blurry on Tablets

Discussion in 'Android Development' started by maddie_jones, Mar 27, 2016.

  1. maddie_jones

    maddie_jones Newbie
    Thread Starter

    I have developed an app with images, however, the images look blurry when I run the application from a tablet. The tablet size is 10.1.

    When I run the application on mobile devices it works like charm, can you please advice why the pictures look blurry on the tablet. I have created drawable folders

    for each of the different screen sizes which has also not fixed the problem. Please can you help or advice?.

    My Drawable folder structure and sizes

    Code (Text):
    1.  
    2. - drawable-hdpi - Width 62 x Height 62  
    3.  - drawable- mdpi - Width 40 x Height 40
    4.  - drawable- xhdpi - Width 82 x Height 82
    5.  - drawable - xxhdpi - Width 123 x Height 123
    6.  - drawable- xxxhdpi - Width 164 x Height 164
    7.  
    8.  

    Code (Text):
    1.  
    2.   <ImageButton
    3.             android:layout_width="150dp"
    4.             android:layout_height="100dp"
    5.             android:id="@+id/placesbtn"
    6.             android:src="@drawable/ic_place"
    7.             android:background="#00000000"
    8.             android:layout_marginLeft="83dp"
    9.             android:layout_marginStart="83dp"
    10.             android:layout_below="@+id/flipper1"
    11.             android:layout_alignParentLeft="true"
    12.             android:layout_alignParentStart="true"
    13.             android:contentDescription="Places"
    14.             android:focusable="true"  />
    15.    
    16.         <ImageButton
    17.             android:layout_width="150dp"
    18.             android:layout_height="100dp"
    19.             android:id="@+id/transportbtn"
    20.             android:src="@drawable/ic_travels"
    21.             android:background="#00000000"
    22.             android:layout_alignTop="@+id/placesbtn"
    23.             android:layout_toRightOf="@+id/placesbtn"
    24.             android:layout_toEndOf="@+id/placesbtn"
    25.             android:focusable="true"
    26.             android:contentDescription="Travel" />
    27.    
    28.         <ImageButton
    29.             android:layout_width="150dp"
    30.             android:layout_height="100dp"
    31.             android:id="@+id/directionbtn"
    32.             android:src="@drawable/ic_direction"
    33.             android:background="#00000000"
    34.             android:layout_alignParentBottom="true"
    35.             android:layout_alignLeft="@+id/placesbtn"
    36.             android:layout_alignStart="@+id/placesbtn"
    37.             android:focusable="true"
    38.             android:contentDescription="Direction"  />
    39.    
    40.         <ImageButton
    41.             android:layout_width="150dp"
    42.             android:layout_height="100dp"
    43.             android:id="@+id/gallerybtn"
    44.             android:src="@drawable/ic_gallerys"
    45.             android:background="#00000000"
    46.             android:layout_alignTop="@+id/directionbtn"
    47.             android:layout_toRightOf="@+id/directionbtn"
    48.             android:layout_toEndOf="@+id/directionbtn"
    49.             android:focusable="true"
    50.             android:contentDescription="Gallery" />
    51.    
    52.     </RelativeLayout>
    53.  
    54.  
    Please advice how I can make the above image buttons for suitable for tablet screen sizes.
     


Loading...

Share This Page

Loading...