I want to implement a header which has gradient background and a right icon, as is facebook & foursquared android apps. I couldn't find any tutorials about this.
I looked into foursquared source code but couldn't find how they implement this. If you can show me a way to implement this in that foursquare source code, it would be helpful.
You can take a look at GreenDroid https://github.com/cyrilmottier/GreenDroid.
Just make a custom component that consist of a LinearLayout or RelativeLayout where you set the background of it to your gradient color, and then just add the desired components of the header as child views of your layout.
Then include this layout in all your activities layout at the top.
Check out the iosched app source code. They build an action bar using a style.
Here's the layout for the home activity:
http://code.google.com/p/iosched/source/browse/android/res/layout/activity_home.xml
Here's the include for the action bar:
http://code.google.com/p/iosched/source/browse/android/res/layout/actionbar.xml
Here is the style that defines the action bar:
http://code.google.com/p/iosched/source/browse/android/res/values/styles.xml
Related
I have already implemented Search Interface for my app following the steps outlined in the guide below:
https://developer.android.com/guide/topics/search/search-dialog
I want to create custom styling for the SearchView as used in Google Chrome app and Google Photos app
How can we style Android SearchView embedded in Toolbar using Android Support Library?
I've already seen the following answer but that's limited to icons and text styling. I want to create custom borders and backgrounds.
https://stackoverflow.com/a/28018439/4419474
You can create a drawable XML with shape rectangle and add the tags of corner radius, solid colour to define your background shape.
Then add this drawable XML as background to the cardView. Inside this cardview add your SearchView widget.
Please let me know if you need any more help.
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:
i want like used listview in android and i want to create dynamic list like below image.how to possible and i want to fix top toolbar and below toolbar .
Thanks!!!
You are looking for three keywords: custom listview, adding search button to actionbar and adding a tab bar.
1) For your custom listview you need to create a layout for each row. You could realize it with a simple nested LinearLayout or RelativeLayout for the following parts. I could highly recommend this tutorial. Just modify the layout to create a row for your snippet:
2) For the search button in the actionbar, check out this section of the Android developer guide. This should help you getting started.
3) A tab bar example can be found here or here.
Hope it helps you getting started.
For the list: Create a layout xml and a ListAdapter that knows how to inflate the layout and populate it with each list item's data. Doing a quick google I found this presentation on it that looks to be fairly comprehensive.
For the top and bottom bar: Look at the action bar developer guide.
As has already been said, nobody will write your code for you. But this stuff should enable you to learn how to do it yourself.
I'm trying to create a custom actionBar with a different shape (not rectangular) as shown on the image below, does anyone knows point me on the right direction?
At this point, it is no longer an ActionBar. Something like that would be a custom View.
It is missing a number of key components of the ActionBar such as the application icon and back arrow, and is lacking all of an ActionBar's styling.
You can create a completely custom View class and use that, or make a reusable layout and include it wherever needed using an include tag.
I actually want to apply a custom title bar (kind of like the Action Bar), but since i'm developing for Froyo, I actually need to have it in a xml file. The trivial way to do this is to just write the code to create the title bar in each of the activities.
I did search around for some efficient ways and found this on SO
Similar Problem
There are 2 solutions proposed over there, but I am having problems in implementing them.
To include the layout of your title bar in the layout of all the Activities. My question is say I have a sample layout as follows, where should the include tag go and do I need to use Theme.NoTitleBar theme for the application in order to get it working?
To subclass Activity and then derive all of my Activities from that. Should the custom Title bar creation method be defined in the onCreate method of the subclassed Activity. Because if I do this, the custom title bar does appear, but it appears blank. No buttons,etc.. are present on it.
Thanks in advance for any help you provide
The tag belongs inside the top level view container (linear layout/relative layout). Yes use NoTitleBar so you don't have the Android provided title bar in your app window.
There is obviously an issue with your code there, with out any code in your post I cannot help you.