Well, I have been through multiple forums looking for the best way that works for me to play a streamed video file from a server or from my local machine, and I found an easy way to do that, here is how: public void onCreate(Bundle icicle) { super.onCreate(icicle); getWindow().setFormat(PixelFormat.TRANSLUCENT);</code> yourVideoView = new VideoView(this); yourVideoView.setMediaController(new MediaController(this)); setContentView(yourVideoView); // This works fine for almost all MPEG-4 and H.264 containers you find out there // If you have the video file on your sdk card yourVideoView.
Steps to get your key: you need to get an MD5 finger print go to C:\Program Files\Java\jdk1.6.0_24\bin copy the file “debug.keystore” you will find this in C:\Users\User.android</li> Type the following command: keytool.exe -list -alias androiddebugkey -keystore "C:\android\debug.keystore" -storepass android -keypass android Now you should be getting a finger print like this: A5:83:11:BB:56:EE:3E:87:58:6D:49:D3:90:E6:61:11 Now go to this page: http://code.google.com/android/maps-api-signup.html Insert your MD5 finger print and get your key: 0uNikOV3dR5gYi2qwuoNRrfR1OZRmM0uG5Arbvg
I spent some time trying to find out how to put other views in the same place with a ListActivity and I figured out 2 different ways : First, you can create a new XML file that should contain a listViewlike this for example: android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/black"> android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/home" /> android:layout_width="fill_parent" android:layout_height="fill_parent" android:drawSelectorOnTop="false" /> Then, in your activity type the following setContentView("xmlFile"); Here for example, I would like to put that image within my ListActivity.
I was stuck for like three hours trying to figure out how to change the background of a ListActivity because I have used an adapter with a layout for each item so when I change the background at the layout, only the item’s background is changed, but at the end I figured that it was very easy here is how I did it :- inside your onCreate() preferably before setting any adapters or putting any views, you insert the following line : getListView().
In advanced mobile applications or normal ones , a developer should communicate with the user using some feed backs so changing the color of an image or label when clicked gives the user the feedback that he has really clicked something, here how it is done. In your onClick() method , use the following method : setColorFilter("color in hexa" , "mode") In my case I use button.setColorFilter(0x77000000,Mode.SRC_ATOP); doing this you will change the Colour but if you pressed the back button , you will find it stuck on the colour you changed ,to return things as they were you can either use