Reputation: 647
I have this app where in I have the below shown layout as the starting activity.It works fine in ICS but not in froyo.
In froyo it only shows the ABOUT button and nothing else. I have also updated my manifest file below
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.iolcalci"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<supports-screens
android:anyDensity="true"
android:resizeable="true" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.iolcalci.MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.iolcalci.Selection"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize|adjustPan|stateVisible" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.iolcalci.Srkt"
android:label="@string/title_activity_srkt"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.iolcalci.Srk2"
android:label="@string/title_activity_srk2"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.iolcalci.Holladay"
android:label="@string/title_activity_holladay"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.iolcalci.Binkhorst"
android:label="@string/title_activity_binkhorst"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.iolcalci.Srkt_x"
android:label="@string/title_activity_srkt_x" >
</activity>
<activity
android:name="com.example.iolcalci.Srk2_x"
android:label="@string/title_activity_srk2_x" >
</activity>
<activity
android:name="com.example.iolcalci.Binkhorst_x"
android:label="@string/title_activity_binkhorst_x" >
</activity>
<activity
android:name="com.example.iolcalci.Holladay_x"
android:label="@string/title_activity_holladay_x" >
</activity>
<activity
android:name="com.example.iolcalci.Help"
android:label="@string/title_activity_help" >
</activity>
</application>
</manifest>
XML file is here
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
tools:context=".FullscreenActivity"
android:id="@+id/frame_layout">
<LinearLayout
android:id="@+id/fullscreen_content_controls"
style="@style/ButtonBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:background="@color/black_overlay"
android:orientation="horizontal"
tools:ignore="UselessParent" >
</LinearLayout>
<Button
style="@style/ButtonBarButton"
android:layout_width="222dp"
android:layout_height="62dp"
android:layout_marginLeft="45dp"
android:layout_marginTop="75dp"
android:background="@color/black"
android:paddingLeft="20dp"
android:id="@+id/iolCalculation"
android:text="@string/Button"
android:textColor="@color/WhiteSmoke"
android:textStyle="bold" />
<Button
style="@style/ButtonBarButton"
android:layout_width="222dp"
android:layout_height="62dp"
android:layout_marginLeft="45dp"
android:id="@+id/sHelp"
android:layout_marginTop="139dp"
android:background="@color/Black"
android:gravity="center"
android:paddingLeft="10dp"
android:text="@string/Button1"
android:textColor="@color/WhiteSmoke"
android:textStyle="bold" />
<Button
style="@style/ButtonBarButton"
android:layout_width="222dp"
android:layout_height="62dp"
android:id="@+id/sAbout"
android:layout_marginLeft="45dp"
android:layout_marginTop="203dp"
android:background="@color/Black"
android:paddingLeft="10dp"
android:text="@string/Button2"
android:textColor="@color/WhiteSmoke"
android:textStyle="bold" >
</Button>
froyo screen
Please help me and is there any way to test my app for froyo on pc?
Upvotes: 1
Views: 165
Reputation: 4393
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".FullscreenActivity"
android:id="@+id/frame_layout">
<LinearLayout
android:id="@+id/fullscreen_content_controls"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top|center_horizontal"
android:orientation="vertical" >
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_gravity="center_horizontal"
android:paddingLeft="20dp"
android:id="@+id/iolCalculation"
android:textStyle="bold" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/sHelp"
android:layout_marginTop="6dp"
android:gravity="center"
android:layout_gravity="center_horizontal"
android:paddingLeft="10dp"
android:textStyle="bold" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/sAbout"
android:layout_gravity="center_horizontal"
android:layout_marginTop="6dp"
android:paddingLeft="10dp"
android:textStyle="bold" >
</Button>
</LinearLayout>
</FrameLayout>
This code works on all OSes. Do refrain from using fixed widths and heights!
Upvotes: 1