My requirment is there will be a india map and some imageview or buttons will be there on top of that map.when i drag and drop the button on that top of map color of some areas has to change ..
Please let me know how to do that.
If u dont want drag and drop option u can place some invisible imageviews on the top when ever user press the top buttons u can make them visible.
Like suppose if want to change the are of andra pradesh .place red color andhra pradesh on the top of white andrha pradesh and when ever u click top button make its status as visible.
Related
I have a quick symbol bar with a few buttons. I want to place a symbol in each corner of the button in addition to the button text. My goal is that when the user press the button then drag his finger in one of the corner direction, the symbol in the corner is inserted, like in Quoda app. Here's a quick sketch:
How can I write in the corners of the button programmatically?
For the second part, I guess I could do it this way: I calculate the x,y difference from the center of the button at the release then insert the right symbol.
EDIT: I cannot use a ImageButton and a drawable background, because I want the symbols to be customizable.
Try create custom compound component based on RelativeLayout with ImageView's (You can also use VectorDrawable's) in center and corners like in this tutorial.
I would please like to know how to create a diamond shaped button with an icon and text inside. Like in the image below. If i rotate the button then the image and icon get rotated too and if I create a custom shape/image to use as the background the buttons clickable area is still a square. Any help would be appreciated?
if you want change clickable area you have to intercept touch events and filter them. You need custom view for doing this
I want to show my AppIcon and some text on Top Left Corner at Home Screen. Please look at the picture you will get an idea
for R.Video enable you are already using ongoing notification.
for SpyVideo Enable text showing at bottom centre of screen. you can use chat head like Facebook! download this samplecode. instead of ImageView you have to use TextView.
You might use drawing over apps.
Here a link: How to draw a view on top of everything?
Maybe that helps.
I have a listview adapter, and when you click on an item in the list, it opens it up to a full screen activity. I have added a 'swipe to dismiss' functionality within the app. When the user swipes from the left side of the screen, and starts dragging, I set the X position of the top layout in the full screen activity to be the X position of the user's finger. I want to know how to change the color of the gap between the edge of the activity and the edge of the device. It is just white now, but I want it to be transparent to be able to see the adapter below the activity. I have tried setting the background color of the top layout in the full screen activity to be transparent. Here is a crude image describing what I want to achieve.
http://i.imgur.com/CfvuvAO.png
I think you can add this to your theme in your styles.xml
<item name="android:windowBackground">#android:color/transparent</item>
But I suggest you don't reinvent the wheel and use a library for this if you can:
https://github.com/r0adkll/Slidr
I am attempting to use my own buttons to make an overlay at the bottom of the screen. When a button is pressed it should light up (kind of how a radio button turns green when selected) and it should take you to a new activity while keeping the overlay intact.
There are five buttons that should be put on a black bar and when selected it should turn blue.
If someone could send me in the right direction I would be very grateful. Thank you
You need StateListDrawables for your buttons.