ImageView Button hides textbox and images ANDROID - android

how can i make it where a ImageView button when you click it, it will hide 2 pictures and a text box?
then when i click a different image view it will show them again
here's my code (not added any thing)
http://pastebin.com/XTrAy8sX

in the onClickListener for the ImageView, you can use setVisibility() to change the visibility of the other two views

Related

Android Development make Buttons work like RadioButtons

I have 11 Buttons with Background Images and if i switch to the actual RadioButton the circle thing on the RadioButton would show up and make my Background drawables ugly is there a way to make buttons work like RadioButtons?
I'm assuming the image changes when you click on the button to show it is selected. In that case, in your onclicklistener for the first button, you could change the image of that button to show it is selected, and also change the images of the other buttons to the unselected image. Do the same for each button.

Button Showing a Box

I am trying to make my Button displays a text when clicking on it.
I will give you an example of what I meant :
When clicking a button, a text will appear above the button and pointing to that button.
How can this be done?
You can add a TextView programmatically in the onClick event or add it in the xml, set its visibility to gone or invisible and change it in the onClick event

Expand an image in gridview when clicked in Android

I am implementing a GridView which contains images.
I want to expand an image to occupy the whole row when it's clicked as shown in the images below.
I also want to show a button when the image is expanded so the user can take an action similar to how the ESPN app does that.
How can I achieve this?
---->
Surround your layout with a relative layout. Create a layout and a button inside it outside grid layout/inside relative layout. Set it's initial visibility to gone and match it's height, width to row you want it to encompass. Then in the onclick of the image set the layouts view to visible and it's button. Perhaps not perfect but it has the added benefit of allowing scrolling of your gridview while showing the big image you want.

Showing and Hiding Horizontal ScrollView on Button Click in Place of Button on Same Screen

I am new to android development so need some help. I want to show horizontal scroll view after the button is clicked which is associated with the scroll view. I can't figure it out that how to show & hide scroll view on same place as of button on same application screen.
E.g: The button name is Show Emoticons and when I click the button I want a ScrollView containing images to appear and when I select an image from it the ScrollView hides. ScrollView will contain ImageView which will contain image.
Any sort of help in this regard will be highly appreciated.

Change background image of button in List view which is offscreen?

I have a list view with an image, a textview and a button at the end. The button basically has 3 states which i represent using images.
What I want to do is change the background of button which is clicked and change the background of other buttons in the list view according to their current states.
Workaround I used is I changed the background image of buttons according to their states and then finish() the activity and restarted it. This shows the activity start animation which is annoying. It creates problems with buttons offscreen.
Is there anyway to change the background image of buttons offscreen listview inside onClick of any button in List View row ??

Categories

Resources