Android Search Dialog and Suggestions ListView: Change theme and colours - android

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

Related

Is it possible to customize the BottomNavBar without Icons, Change the text and Changing the selected tab background

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.

How to get the files necessary for a floating action button?

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.

Styling the "Share" action menu

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:

How to style the children Views from the parent View?

I am currently trying to get the look of my app right. But I am having problems figuring out how to even set up a way to change themes. For one thing, is there even a way to change styles through code? I checked the method list and I saw nothing. This leads me to my actual question; is there a way that, like CSS, in which you style the parent, and then have it trickle down but also changed depending on the View? I looked at the Android docs, and they did not show any examples of this. Hopefully someone can give me an idea as to how to accomplish this, or if its not possible, to let me know that as well. Thanks in advance.
You should be able to do this using styles and themes. I've implemented this using Jake whartons Sherlock action bar. (I'm not certain if it's necessary) It involves using the comparability library which gives you the ability to use fragments and loaders as well. Look at his democode at http://actionbarsherlock.com/download.html. Look for where themes are mentioned and you will find the information you need. In the demo app you can change the theme in the top right corner and see how it affects the activities look and feel. It also shows many of the features available and the code to write them. I have found this an invaluable resource and it should show you how to theme your app.

Android Text Selection Listener

I'm trying to create a graceful, distraction-free text editor.
One of the features I really would like to implement is a pop-up with simple text formatting commands, such as bold, italic, underline, font color, and font face.
To give you an idea, here is a picture of the popup in iOS(Obviously, this is just the idea. I want to create a custom design for the popup):
I have a few questions:
1) Is there such thing as a text selection listener, or some equivalent?
2) Will I need to override the default android action for text selection?
3) How would I display/create this popup? (Vague question, I know...)
I am just starting out in Java and Android development, but I have already created a few apps and have gotten the hang of it.
The key term you're looking for here, to help you with your research, is ActionMode, provided that your target is honeycomb or newer.
The API docs (scroll down to "using the contextual action mode) do an ok job of explaining things, once you find what you're looking for, which is the biggest barrier to their use, but basically what you're going to need to do is this:
set your EditText to be selectable (android:textIsSelectable="true" or setTextIsSelectable(true);
Implement the ActionMode.Callback interface and provide your own menu items.
NOTE: as mentioned above, this only works for API level 11+. If you're targeting earlier platforms, getting the events for text selection is much more complicated.

Categories

Resources