This question already has answers here:
Android - Navigation View item menu background color
(5 answers)
Closed 4 years ago.
when I open a navigation menu drawer project with Android Studio, it comes in Gray by default. I couldn't change them. How do I make color as in the picture?
Image
Your NaviagtigationView tag has a couple properties you can use.
app:itemTextAppearance="#style/Your.Style"
app:itemTextColor="#color/blue"
Related
This question already has answers here:
Set Animated .GIF As Background Android
(3 answers)
Closed 4 years ago.
I would like to know how to put a gif in a Button's background on Android.
I already found out how to put a gif in an image view but I can't find any answer for my problem.
Buttons do not support gifs as a background resource.
Why does it has to be a button?
Just use an Image-View and react to an onClick event.
This question already has answers here:
Disabling the fullscreen editing view for soft keyboard input in landscape?
(11 answers)
Closed 7 years ago.
I launch an AlertDialog in Android with an EditText field. When I use portrait orientation runs fine, but when I change to landscape the keyboard hides my alert. How I can I solve this?
In landscape, some android devices will cause the keyboard to fullscreen when the focus is on an editable feature of the layout (in your case, EditText).
You can flag the EditText to not fullscreen the keyboard in landscape in two ways:
XML: android:imeOptions="flagNoExtractUi"
Code: myEditText.setImeOptions(EditorInfo.IME_FLAG_NO_EXTRACT_UI);
This question already has answers here:
Android: How to enable/disable option menu item on button click?
(12 answers)
Closed 7 years ago.
I want the options menu with icons from the api level 11 when the menu button is clicked.If it is not possible after api level 10 then please suggest me how can I do this.
Thanks in advance.
The options menu is deprecated as of API 11; use the action bar or a navigation drawer instead. See: http://android-developers.blogspot.com/2012/01/say-goodbye-to-menu-button.html
This question already has answers here:
Swipe between activities
(2 answers)
Closed 9 years ago.
I have two activities with two different layouts.Right now i have to click a button to change to the other layout, but i wanna to swipe on the screen, is that possible?
If you make your two layouts as Fragments, then you can use the ViewPager to swipe between the fragments in the same activity.
http://developer.android.com/training/animation/screen-slide.html
This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
Getting the Listview default clicked color, depending on the Device
I would like to style a View to behave like a ListView. It means that when I click on it, the background color changes. I can't do this by setting a custom color because each device has a different style for this component.
Any ideas how can I do it? Is there any system style I can apply on it?
setBackground(res.getDrawable(android.R.drawable.list_selector_background));