I'm trying to add a "Share button" to my app, but I haven't found a way to manage the styling of the ActionMenu displayed to choose the app to share content to.
Currently it appears as in this screenshot:
However, I'd like to change the background color and the text color to make them reflect the ones in the ActionBar: which are the style properties that handle these two colors?
I would suggest follow this tutorial and using the linked tool:
http://blog.stylingandroid.com/styling-the-actionbar-part-3/
Jeff Gilfelt Android Action Bar Style Geberator tool
Quick mockup below, to prove it's very relevant and helpful in the direction of solving your question:
Related
BottomBarNavigationBar template
BottomBarNavigationBar
Note : It should follow google material design guidelines also.
Removing Bottom Navigation Bar is not possible in non-rooted android device. But you can set buttons to just above the Bottom navigation Bar,it would work fine and look nice.
For changing text style you can go through this link. It would clear your doubt.
Changing the selected tab is definitely possible. For this go through this link
And finally I am sorry that I am giving just link here, as all the questions you asked are already available on SO.
So please, next time when you ask any question, then do a detail research about it then post that here.
I have found several answers on here as to how to change the background color and add a custom icon to the title bar in android studio but am having difficulties finding an answer for how to use a custom image as the background instead of just a color in the title bar. Any help would be much appreciated. Thanks.
sadly you cannot add images as the background on both the header and textView/webView that's why you don't see any apps on android with image backgrounds. you could try using html instead of xml, like:
replace colors.xml, styles.xml, ect with colors.html, styles.html, ect
but i doubt that will work. hopefully they will add this feature later in the android sdk.
All across the internet and several Stack Overflow pages, there are detailed instructions for the implementation of Floating Action Buttons, but nobody explains where I might be able to acquire the icon myself. Is everyone creating his own action buttons for his UI, or is there a downloadable library somewhere I have yet to discover?
Please link and explain!
Google doesn't provide any code for it, but it should be pretty basic to build yourself.
If you'd prefer to use a library for it, I use this one by shamanland: floating-action-button. You can change the color and icon displayed, and have it auto-hide when the user is scrolling.
There's another popular library by futuresimple here: android-floating-action-button. It includes support for sub-actions with text labels, and two button sizes, but won't give you auto-hiding on scrolling. I think I started with this one and switched to shamanland's, but I don't remember why.
I am creating Floating Action Button and shadow with .xml files as explained here and using icons from icons8.com, it has Android Lollipop specific icons.
I am creating an android application and I want to customize the look and feel of the action bar of the application.
For my project I am using actionbar sherlock. Currently my app is looking like this:
I want to remove the logo of the application and also the application title from the action bar and replace it with the following image.
Is there any way to accomplish this. I have read that we have to use the style tag to do this. But since I am new I don't know where to write the style tag and how to implement this. Please help...
EDIT
The width of the new image should be adjustable i.e. my requirement is that its width should cover half of the action bar
All I want to achieve is something like this application which is available in play store.
Just use this line in your onCreate method:
Drawable d=getResources().getDrawable(R.drawable.action_bar_background);
getActionBar().setBackgroundDrawable(d);
That will change the background of your actionbar to whatever image you want.
Of course it is always important to have different sized images for different device sizes.
I hope it helps
Update your AndroidManifest.xml tag to include the :icon attribute.
See the developer docs for more information.
Example:
<application
android:logo="#drawable/my_logo"
....>
</application>
Another nice example, for use with a theme/style can be found here.
To hide the title text shown on the action bar see this post's accepted answer. You'll need to have a custom style applied to the action bar to hide the text. If you also want the icon to be larger than the allowed space, you'll need to also set the background of the action bar as explained by #Eenvincible.
It's also worth noting that you're breaking a lot of Android Design Guidelines. It'd be easier for you and better for your users to simply set the right icon/title and move on with the standard ActionBar look/feel. Worth a look: Android Design Patterns - ActionBar.
What you are seeing is actually the default icon. Replace ic_launcher.png file from the following folders(if it exists there) with your image.
/res/drawable
/res/drawable-ldpi
/res/drawable-mdpi
/res/drawable-hdpi
/res/drawable-xdpi
/res/drawable-xxdpi
Also rename your image file to ic_launcher.png
To edit the text on right of icon, you can use:
getSupportActionBar().setTitle("ANY TEXT HERE");
I've implemented a simple search dialog that performs a custom search of the data within my app (Via a custom provider) as according to the guidelines here: http://developer.android.com/guide/topics/search/search-dialog.html
The problem is that the search bar's colors and size (exceeds the height of the action bar, etc) do not work within the design of my app. I know how to create a theme in my styles.xml file, but I do not know how to target the Android search dialog and suggestions listView. Does anyone know how I can do this?
After 13 hours spent on the question, it turns out it's not possible for some reason. Apps that do have visually customized search dialogs- even if it's just the colours - must implement them manually, and probably don't use the standard search interfaces.
as per google docs SearchDialog is
"The search dialog is a UI component that's controlled by the Android system."
So to have a control over search visuals use as for today :
ActionBarSherlock dev branch
https://github.com/JakeWharton/ActionBarSherlock/tree/dev
and this :
http://developer.android.com/guide/topics/search/search-dialog.html#ConfiguringWidget
to implement fully controlable search