Showing posts with label button. Show all posts
Showing posts with label button. Show all posts

Thursday, May 31, 2012

Android: combining text & image on a Button or ImageButton


I'm trying to have an image (as the background) on a button and add dynamically, depending on what's happening during run-time, some text above/over the image.

Tuesday, May 1, 2012

android image button


How can i create a button with no text and an image centered horizontally ? I don't want to use an ImageButton because I want to define a different backgound image

Friday, April 27, 2012

Sunday, April 22, 2012

Android - play sound on button click - Null pointer exception


I am trying to play a sound file on the click of a button. The sound is just 1 sec long. It plays well the first few times I click the button, but after a while it gives a NullPointerException. Here's the code:

Thursday, April 19, 2012

Facebook "Like” button callback


I am interested in implementing the facebook "Like" button, but I would like to know what user is clicking on this button so I can get some useful information from this. From what I have read, facebook is leaving us in the dark on who is clicking on what. ANyone have an idea on how I could track which user clicked on a like button for a particular product?

Sunday, April 8, 2012

Start video chat without user interaction - Android


I am a total noob on this site so please be patient. I am trying to initiate a Video Chat/Call without any user interaction or confirmation.

Thursday, April 5, 2012

jQuery dialog button variable


Can anyone tell me how can i use a varaible for button text in jQuery UI dialogs. I want to make a dynamic button name.

Tuesday, April 3, 2012

Adding the Facebook Like Button in an iPhone App


Does anyone know how I would include a facbeook "like button" in an iphone app. I tried calling the iframe inside of a uiwebview but that doesn't work.

Monday, February 27, 2012

Eclipse: Android Soundboard buttons are "overclickable”


In my android soundboard, all of the buttons work perfectly and the sounds play normally, but there is a problem. The problem is that when you press a button in the app, you can press other buttons. For instance, if the button I press plays a siren like noise, I can press another button and both sounds will play at the same time. This is not what I want. Is there any code I can add to make it so that I can click only one button at a time, or some code that makes the previous sound stop and it will play the newly selected sound?

Friday, February 24, 2012

Java Jframe centers my buttons ):<


Here is my code:




public class Main {
public static void main(String[] args){
JFrame frame = new JFrame("Vex Development Studio 2.0");
frame.pack();
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocation(10,10);
//make variables
File newproject;

Container content = frame.getContentPane();
GridBagConstraints gbc = new GridBagConstraints ();
Dimension buttonsize = new Dimension(75,25);
Button about;
about = new Button("About");
about.setPreferredSize(buttonsize);
//add content
content.setLayout(new GridBagLayout());
content.setBackground(Color.white);
gbc.gridx = 0;
gbc.gridy = 0;
content.add(about,gbc);
//main stuff
//about button
about.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae){
JOptionPane.showMessageDialog(null, "Example", "About", 1);
}
});
//some extra crap
frame.setSize(700, 500);
frame.show();
//end
}
}

Friday, January 20, 2012

android fragments edittext button focus


being new to android app development, I encounter a problem regarding the interaction of android fragments, edittexts, focus and buttons.

Tuesday, January 17, 2012

Sunday, January 15, 2012

How to add a text under the image button in Android?


I want to add text under a image button, which are also clickable, and will be redirected to the same activity as the image button. basically it's like the app list in any android phone, e.g. enter image description here