I want to create a back and save button that look like the buttons in the image below. I tried but i did not find any solution. I do not want to use an image as a button. Please help me..
Here is the image of back and save button..
Related
I want to have a button like the one in the link below. How can i achieve it just by java code or xml? By the way it's going to be of a different color when pressed. I've explored similar posts but none helped. Any help appreciated.
The button which i want
Just make a View with large rectangle and add what you want(e.g. Label contains 'Number Of Students' and/or something else) in the view.
Then, add onClickListener to the View.
To change clicked colour, refer to here
I would like to know how to make the button which contains a kinda icon.
I made up a LinearLayout first and the button belongs in it.
I tried the the icon to be in the Button by using 'android:drawableLeft="#drawable/*"
The icon was placed to too Left for me.
The button is a little bit long and text and icon are small so there are some space empty.
I mean, I want the icon to be more closer to the text than it was.
Now, icon is placed to the left and text is in center.
I want them to be together with a little padding.
I tried to use 'android:drawablePadding=7dip' but it didnt work.
I so want somebody to let me know how to do it.
Have a good day.
Thank you
You can use Custom Buttons are resizes button stretch image size and below link for custom Button Tutorial link
http://www.thesecretpie.com/2010/07/creating-custom-fancy-buttons-in.html
Thanks..!
There are two techniques. I suggest you look into:
Image Buttons
Image Views
With Image view you can create a button by using an onclick listener which can be created from within your activity or from your xml layout file.
I have one screen with some image buttons and image view. when user click on these buttons or image view i need to show selected effect not replace any image instead of these. only selected dark shade effect on button or imageview same as iphone. How it's possible ?
i have not any selected image source , i checked these code ...
http://developer.android.com/reference/android/widget/ImageButton.html
But here we set another image on pressed event.
Anyone know any property of android to directly set select dark shadow
effect without image ?
Please anyone suggest how its possible ?
Thanks
you can use setAlpha method of imageView class to do this.
imgView.setAlpha(90);
http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList
Thats the link for adding images to show different state of buttons. You create a xml file for this and set this file as the background for the button.
I am creating a custom button to use in imageButton. I want to know will the button have a click effect when it is clicked by a user? If not what do i need to do to make it this way?
i think you want the click effect on the imagebutton... if so try this link and use selector for your purpose...
I have a program that I'm writing in Android using Eclipse. It has an array of buttons (4x4).
I would like to have the buttons contain a user defined image (perhaps some filled circles).
How do I go about doing this?
Thanks
Mike
http://developer.android.com/resources/tutorials/views/hello-formstuff.html#CustomButton
Should be straight forward enough to follow.. if the image is chosen by the uesr, you will just have to change the image path on a button press or something similar