Orientation change Frage

  • 0 Antworten
  • Letztes Antwortdatum
S

sunnysunny

Neues Mitglied
2
Hallo,

ich habe sensorPortait (Portrait + Portrait upside down) eingestellt für meine Activity.

Doch wenn ich das Device auf den Kopf stelle (Portrait upside down) ändert sich zwar die Status bar, jedoch das Hintergrundbild und das Label drehen sich nicht mit.


Wenn ich jedoch auf Landscape einstelle und auf Landscape wechsle, dreht sich das Label mit so wie es soll. Auch Landscape Left/Landscape Right passt alles.

Wieso funktioniert das nicht mit Portrait upside down? Habe nen Galaxy Ace zum Testen. Ist das Gerät schuld oder hab ich da was übersehen?


<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="sensorPortait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>


<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg" >


<!-- TOPLABEL -->
<TextView
android:id="@+id/topLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:layout_marginTop="25dp"
android:layout_centerHorizontal="true"
android:text ="@string/labelText"
android:textSize="26sp"
android:textColor="#fcc84a"
android:textStyle="bold"
android:gravity="center"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:background="@null" />




</RelativeLayout>
 
Zuletzt bearbeitet:
Zurück
Oben Unten