I have an image file that has all the character sprites that I will be using in a game, and I want to make a layout that will allow the user to cycle through each image to be able to pick which one they want. So, I have one large image, and I need to render just a small (32 x 32) section of it at a time. Is that possible with the layouts...
I have the following code which creates an ImageButton and plays a sound when clicked:
ImageButton SoundButton1 = (ImageButton)findViewById(R.id.sound1);
SoundButton1.setImageResource(R.drawable.my_button);
SoundButton1.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
...
I am able to create a grid view layout as shown Here
when a image is clicked I would like to bring that image to the foreground (full screen) for 2 seconds and then go back to the grid layout.
Can you please point me to the appropriate examples/docs or pointers on how to do this .
Thanks
...
I have been looking everywhere how to play a ringtone/alarm sound in android.
I press a button and I want to play a ringtone/alarm sound. I could not find a easy, straightforward sample. Yes, I already looked at Alarm clock source code... but it is not straightforward and I cannot compile it.
I cannot make this work:
Uri alert = Rin...
I have a custom list adapter:
class ResultsListAdapter extends ArrayAdapter<RecordItem> {
in the overridden 'getView' method I do a print to check what position is and whether it is a convertView or not:
@Override
public View getView(int position, View convertView, ViewGroup parent) {
System.out.println("getView " + p...
Hi.
I want to add ImageView to FrameLayout with Gravity or margins. but FramLayout and ImageView has no method about that(Actually, I can't found that). Reason that selects Framelayout is to put ImageView on ImageView.
Help me plz. It is emergency for me to find solution.
thx.
Below is my code which help understanding my question.
F...
I'm used to handle graphics with old-school libraries (allegro, GD, pygame), where if I want to copy a part of a bitmap into another... I just use blit.
I'm trying to figure out how to do that in android, and I got very confused.
So... we have these Canvas that are write-only, and Bitmaps that are read-only? It seems too stupid to be re...
I want to have a seperate project that runs my server communication code in a normal JVM for the purposes of integration testing. This code uses these libraries which are build into the Android Framework...
http://developer.android.com/reference/org/apache/http/client/package-summary.html
Does anybody know what version of Apache HTTP ...
I'm trying to implement paging in a custom ListAdapter. Right now I'm just making the request for the next page when the last item in the ListView becomes visible, by checking in getView() if position is >= the size of ListAdapter.getCount().
It works fine, but I'm wondering if there's a better way (or a different way) that will only...
I have a widget that supposed to call an Activity of the main app when the user clicks on widget body. My setup works for a single widget instance but for a second instance of the same widget the PendingIntent gets reused and as result the vital information that I'm sending as extra gets overwritten for the 1st instance. So I figured tha...
Good Afternoon,
I have a spinner array containing 3 spinners. Each spinner is populated via a res string array. Each array contains the numbers 1-100. When the activity starts each spinner contains a string array of 1-100 and when you click on a spinner the first choice is 1.
Say a user picks 25 on the first spinner. I'd like the 2n...
This is probably a pretty easy to answer question, but I can't find the solution myself after a couple hours of searching the documentation and Google. I set the orientation of my Android app to landscape in the AndroidManifest.xml file:
android:screenOrientation="landscape"
However, when I run the app in the simulator, it appears sidew...
I'm fairly new to android programming and need some information for a 4th year forensics course project. Basically I am trying to create a suite of tools for live analysis of an android phone. I know how to get the information I need on the phone, but I was wondering if there was a way to communicate that information back to the PC? I wa...
I've got a lot of experience in Java but none developing mobile apps. I'd like to write an application using Java/Swing and then convert it for use on an Android phone.
Is this feasible or do I really need to develop from the ground up for the Android platform?
I don't own an Android phone as I can't afford one at the moment, and the ...
Hi,
I have an image, that I need to rotate on ACTION_MOVE. Its a wheel image. The wheel should rotate as the user's finger moves on screen. Can anyone help on this please?
Thanks.
...
i am biginner in android development and try to play video from link but it's give error "sorry,we can't play this video" i tride so many links but for all links its show same error.
My code it follwing
public class VideoDemo extends Activity {
private static final String path ="http://demo.digi-corp.com/S2LWebservice/Resources/S...
Currently I have a class that is extending the ListActivity class. I need to be able to add a few static buttons above the list that are always visible. I've attempted to grab the ListView using getListView() from within the class. Then I used addHeaderView(View) to add a small layout to the top of the screen.
Header.xml
<?xml versi...
Hi.
I have created a small and simple android app. I tried installing it on an actual android device. But because it won't install, I created an AVD resembling my phone. I tried copying and installing app on that AVD and it still says that error. "Application xxx could not be installed on this phone".
Before I tried installing my app o...
Hi all,
I was wondering how to obtain this result :
http://img718.imageshack.us/img718/6173/screenshot20100411at126.png
This is what I tried :
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#CCCCCC"
android:orientation="...
The network interfaces on Android interfaces are listed as directories in the file system in /sys/class/net/.
For most Android devices the network interface for gprs traffic is called rmnet0 and for Wi-Fi it's usually eth0 or tiwlan0.
I suspect that the cell interface for the Motorola CLIQ XT is rmnet0, but I would like to have this co...