Questions tagged [imagebutton]

An image button is a button that displays an image, regardless of platform

An image button is a button that displays an image, regardless of platform

1801 questions
0
votes
1 answer

How can I change the highlight color of a borderless button?

An ImageButton using the borderlessButtonStyle has the holo blue highlight when tapped on it. How can I change the highlight color? (I know how to change the holo color on regular buttons and image buttons using…
0
votes
0 answers

Expandable List using ImageButton.setId returns nullpointerexception

so, i'm creating an expandable list, each group header has a star icon (image button) on the right side and can be pressed to indicate whether it is favorite or not. I need to assign id to each star to indicate which one is favorite and which one is…
0
votes
1 answer

ImageButton.setId = null pointer exception

I am creating an imageButton i'm going to setId to the imageButton. But what I got is nullpointerexception error.. can anybody please tell me what have I done wrong? Thank you so much :) I've declared public int count=0; public int count=0; final…
user3158109
  • 41
  • 1
  • 4
0
votes
3 answers

Android - Listen to imagebutton click inside listview inside fragment

I am working on a 4 tabs application. One of my fragment is the search one, containing a searchview, textview, listview. fragmentSearch.java JSONObject jsonobject = new JSONObject(result); textView1.setText((String)…
user3119384
  • 329
  • 4
  • 23
0
votes
1 answer

ImageButton Visibility not getting changed in aspx.cs page

I'm using a gridview to display some data. There is an image button to display a flag. Within the GridView RowDataBound Event i'm changing the visibility of that button. But the visibility didn't get changed. Here is the code: bool status = true; //…
Aruna
  • 1,962
  • 4
  • 25
  • 50
0
votes
1 answer

How to change widget background by clicking an image button

Right I've looked at a lot of questions, answers and tutorials but none have helped me so my question is my last hope... On my clock widgets config activity i want to be able to have image button so that the user can change the background on the…
SkintMedia
  • 33
  • 1
  • 5
0
votes
2 answers

ImageButton Position programmatically

I'm using XML for the layout but I need to programmatically position the ImageButton. Can anyone gives me an idea how to do it? XML
Wallyfull
  • 181
  • 1
  • 2
  • 16
0
votes
2 answers

What is the best way to implement fade-in and fade-out animations on Android?

I have a few controls that I don't want the user to see all the time, so they need to: Fade out 5 seconds after activity is created Fade in when user taps the screen Fade out after 5 seconds of visibility or when user taps screen again (whichever…
Eddie K
  • 503
  • 4
  • 18
0
votes
1 answer

(memory game)Change Image of ImageButton dynamically for the second card without additional user input

My question is regarding the onClick() method, in which the "Cards" receive their images through a switch statement. If you click the first "card", the "firstCard" variable is successfully associated with the image. If you choose the second card, it…
schwarz1603
  • 21
  • 1
  • 3
0
votes
0 answers

ImageButton Background doesn't change in real-time

I use this for loop to change the background of ImageButton: for(int i = 1 ; i <= right_num ; i++ ){ int resourceId = this.getResources().getIdentifier("c"+left_num+"_r"+i, "id", this.getPackageName()); ImageButton imageButton =…
Mlook
  • 73
  • 2
  • 9
0
votes
3 answers

Error when inflating the ImageButton

I click the ImageButton in Fragment-A , And it will change to Fragment-B. But if I add the two ImageButton in Fragment-B , it will crash. The following code is in Fragment-A. ImageButton FileButton = (ImageButton) view.findViewById(R.id.FileButton)…
Wun
  • 6,211
  • 11
  • 56
  • 101
0
votes
1 answer

when i change ImageButton image , not changing at real-time

i use this code for change ImageButton image , but it not change at real-time. it change one time only , not ImageButton by ImageButton. for(int i = 1 ; i <= left_num ; i++ ){ int resourceId =…
Mlook
  • 73
  • 2
  • 9
0
votes
2 answers

Using imageButton on an Android Layout

I want to use an image as a Button for an Android App, so I'm using an ImageButton. I want it to be pretty big so I understood the best way to do it is to configure the background of the image as the image I want. I'm setting the layout width and…
Javi
  • 889
  • 1
  • 16
  • 41
0
votes
1 answer

Designing the TableLayout which has to be added dynamically within a RelativeLayout

I have to create an activity which has the layout as shown in the attached image. I am having problems with making it look close to as shown in the image. In the previous activity a user enters his.her address and saves it. When saved a new row…
user2688158
  • 407
  • 5
  • 17
0
votes
2 answers

layout_weight not pixel perfect?

I'm an absolutely new coder, and I'm trying to design a short-side-of-the-screen navigation bar for an application that forces landscape view and allows the Android nav bar to be seen. This basically comes down to creating a vertical button bar on…