android-icons

How to change option menu icon in the action bar?

北城以北 提交于 2019-11-27 03:30:17
How to change the index icon of option menu? I mean icon (3). Here is my code: @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.options, menu); return true; } And here is the XML file: <item android:id="@+id/Bugreport" android:title="@string/option_bugreport" /> <item android:id="@+id/Info" android:title="@string/option_info" /> <item android:id="@+id/About" android:title="@string/option_about" /> Syed Raza Mehdi The following lines should be updated in app -> main -> res -> values -> Styles.xml <!-- Application theme.

Android xxx-hdpi real devices

筅森魡賤 提交于 2019-11-27 01:31:40
问题 I'm gonna release my app, it's a 1.2Mb apk that includes about 120 icons in 4 different formats (ldpi, mdpi, hdpi, x-hdpi). If I add xx-dpi and xxx-hdpi icons the apk grows bigger and loading time increases. There are many entry-level devices out there with really loooow memory and I'd like my app to run everywhere. Do I really need to add xx-hdpi? And is there a real device that requires xxx-hdpi? 回答1: You shouldn't really need xxxhdpi . It was only introduced because of the way that

Android options menu icon won't display

烈酒焚心 提交于 2019-11-26 20:46:53
I'm following a book on Android Development to get myself started writing my first real app. I got up to the point where I'm making an options menu for one of my activities. The menu shows up, but the corresponding icon of the menu item refuses to display. Here is the code for the menu: ReminderListActivity @Override public boolean onCreateOptionsMenu(Menu menu) { super.onCreateOptionsMenu(menu); MenuInflater mi = getMenuInflater(); mi.inflate(R.menu.list_menu, menu); return true; } res/menu/list_menu.xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com

How to add “menu” indicator next to Action Bar's app icon?

≯℡__Kan透↙ 提交于 2019-11-26 20:23:14
问题 At least Gmail and Youtube Android apps use a side menu (navigation drawer?) that opens by swiping, or by clicking the app icon (home button): Is the menu indicator / icon in the screenshot above a ready-made part of Android SDK? (Or a custom icon Google uses in their apps?) In any case, what's the easiest way to get your home button to look like that , i.e., like it opens a menu? ( targetSdkVersion 18; minSdkVersion 14) Resolution Finally got it working. What was missing for me was 1) the

Android status bar expects icons of size 25x25dp while guidelines recommend 32x32dp. Who is wrong?

点点圈 提交于 2019-11-26 19:18:56
问题 According to android icon design guidelines (here, see table #1), developer needs to provide status bar icons of next sizes: Status Bar 24 x 24 px (LDPI) 32 x 32 px (MDPI) 48 x 48 px (HDPI) While my measurements show that status bar always has 25 dp in height and expects icons of 25x25dp. This translates to these sizes: Status Bar 19 x 19 px (LDPI) 25 x 25 px (MDPI) 38 x 38 px (HDPI) Here is how I get those size: 25dp * 0.75 = 18.75 => 19px (LDPI) 25dp * 1 = 25 => 25px (MDPI) 25dp * 1.5 = 37

Standard Android menu icons, for example refresh [closed]

穿精又带淫゛_ 提交于 2019-11-26 18:04:53
The Android SDK offers the standard menu icons via android.R.drawable.X . However, some standard icons, such as ic_menu_refresh (the refresh icon), are missing from android.R . Is there any way to get the original icons, maybe by extracting them from the applications? I already checked the Android source, but it's a bit too huge to look everywhere for the images. I know the Android Drawables website, but I would like to get the correct hdpi , mdpi and ldpi version, preferable the original ones. Never mind, I found it in the source: base.git/core/res/res and subdirectories. As others said in

Add Icons to SlidingTabLayout instead of Text

我与影子孤独终老i 提交于 2019-11-26 16:04:18
问题 I'm implementing a SlidingTabLayout in my android application. What my query is that I'd like to implement icons in my Sliding Tabs instead of texts for navigation. I searched heavily on the internet for any such tutorial or sample but found none. I also searched a previous question on stackoverflow: Over Here - SlidingTabLayout with Icons. It was slightly informative but didn't really help me out. To be clear. I require my tabs to consist of icons only . No text. As I am new to this whole

How to change option menu icon in the action bar?

≯℡__Kan透↙ 提交于 2019-11-26 12:39:21
问题 How to change the index icon of option menu? I mean icon (3). Here is my code: @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.options, menu); return true; } And here is the XML file: <item android:id=\"@+id/Bugreport\" android:title=\"@string/option_bugreport\" /> <item android:id=\"@+id/Info\" android:title=\"@string/option_info\" /> <item android:id=\"@+id/About\" android:title=\"@string/option_about\" /> 回答1: The

Adjust icon size of Floating action button (fab)

老子叫甜甜 提交于 2019-11-26 12:35:56
问题 The new floating action button should be 56dp x 56dp and the icon inside it should be 24dp x 24dp . So the space between icon and button should be 16dp . <ImageButton android:id=\"@+id/fab_add\" android:layout_width=\"56dp\" android:layout_height=\"56dp\" android:layout_gravity=\"bottom|right\" android:layout_marginBottom=\"16dp\" android:layout_marginRight=\"16dp\" android:background=\"@drawable/ripple_oval\" android:elevation=\"8dp\" android:src=\"@drawable/ic_add_black_48dp\" /> ripple

Android - Launcher Icon Size

谁说我不能喝 提交于 2019-11-26 09:20:42
For HDPI , XHDPI , etc. what should be the ideal size of the launcher icon? Should I have to create 9-Patch images for the icon to scale automatically, or would it be better to create separate icons? I would create separate images for each one: LDPI should be 36 x 36. MDPI should be 48 x 48. TVDPI should be 64 x 64. HDPI should be 72 x 72. XHDPI should be 96 x 96. XXHDPI should be 144 x 144. XXXHDPI should be 192 x 192. Then just put each of them in the separate stalks of the drawable folder. You are also required to give a large version of your icon when uploading your app onto the Google