CENTER_HORIZONTAL in Android 3.2 Emulator

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

CENTER_HORIZONTAL in Android 3.2 Emulator

Postby galyathee » Tue Aug 23, 2011 1:43 pm

Hi,

I have that layout from a book on Android: Here is defined a CENTER_HORIZONTAL Gravity in the Java code. With a gravity set to CENTER, the application is able to start. With CENTER_HORIZONTAL it cannot open.

Any reason ?!

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout
  3. xmlns:android="http://schemas.android.com/apk/res/android"
  4. android:orientation="vertical"
  5. android:layout_width="fill_parent"
  6. android:layout_height="fill_parent"
  7. >
  8. <RadioGroup android:id="@+id/gravity"
  9. android:orientation="vertical"
  10. android:layout_width="fill_parent"
  11. android:layout_height="wrap_content"
  12. android:padding="5dip">
  13. <RadioButton
  14. android:id="@+id/center"
  15. android:text="center" />
  16. </RadioGroup>
  17. </LinearLayout>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4


Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. case R.id.center:
  2. gravity.setGravity(Gravity.CENTER_HORIZONTAL);
  3. break;
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


many thanks
galyathee
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Aug 22, 2011 3:07 pm

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 6 guests