3

I am developing a little application in android by following the Android UI Patterns and I am facing a little difficulty about the patterns used to build the dashboard. My question is the following : what should be the size of the icons used to build dashboard according to differents densities. In the android SDK documentation, it is not described.

King Regards.

Harry Coder
  • 2,429
  • 2
  • 28
  • 32

2 Answers2

2

If it helps, reference the DashbordLayout class in the Google I/O schedule app at http://code.google.com/p/iosched The class itself is in src/com/google/android/apps/iosched/ui/widget/DashboardLayout.java

An example of how it's used is seen in:

  • res/layout/fragment_dashboard.xml for the dashboard itself and the buttons inside. Note the style attribute set
  • res/values/styles.xml for an example of the style used
  • res/values/dimens.xml for an example
  • res/values/colors.xml for the color they used (obviously you can use any)
  • res/drawable/home_btn_*.xml for examples of a selector related to the various states of the button to reference different drawable files
  • res/drawable-hdpi/home_btn_*.png for the actual png files that are used, which tend to be 144x96

I myself had no idea so much was involved to make it look just right, but this made things so much easier once I saw how to properly make it.

Jouva Moufette
  • 370
  • 2
  • 10
0

You can use density pixels (dp) instead of regular pixels to set the size of your elements.

Have a look at Supporting Multiple Screens - Android

SERPRO
  • 10,015
  • 8
  • 46
  • 63
  • Can you post screenshots of your problem using dp? so we can see exactly what could be wrong? – SERPRO Nov 11 '11 at 11:39
  • I have read it but I didn't fount what I am looking for. When you look at "UI Guidelines" in the Android SDK Documentation, in the "Icon Design" section, you can see that the Android Team have described all the kinds of icons that should be used to build differents parts of an application, but there is nothing about the icon size guideline to build dashboard. Do you have any idea ? – Harry Coder Nov 11 '11 at 11:46
  • Well I think there's no information about that, but I still think that you can build it with density pixels to look the same in all devices.. – SERPRO Nov 11 '11 at 12:40