Android 2.3.3
I have an activity, that is displayed using the below code.
<activity android:name="com.xx.xxx.CombinationActivity"
android:label=""
android:theme="@android:style/Theme.Dialog">
</activity>
Here is the Layout :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:background="#000000"
android:orientation="vertical" >
<!-- Beginner / Intermediate and so on -->
<TextView
android:id="@+id/textview_choose_level_main_title_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/text_choose_level_main_title_1"
android:textColor="#FFFFFF"
android:layout_marginBottom="20dp"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/textview_choose_level_1_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/text_choose_level_1_default_title"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#FFFFFF" />
<TextView
android:id="@+id/textview_choose_level_1_range"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/text_choose_level_1_default_range"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#FFFFFF" />
<SeekBar
android:id="@+id/seekbar_choose_level_1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:max="100" />
<TextView
android:id="@+id/textview_choose_level_empty"
android:layout_width="match_parent"
android:layout_height="20dp"
android:gravity="center_horizontal"
android:text=""
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#FFFFFF" />
<!-- 2 / 3 / 4 / 5 -->
<TextView
android:id="@+id/textview_choose_level_main_title_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/text_choose_level_main_title_1"
android:textColor="#FFFFFF"
android:layout_marginBottom="20dp"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/textview_choose_level_2_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/text_choose_level_1_default_title"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#FFFFFF" />
<TextView
android:id="@+id/textview_choose_level_2_range"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="@string/text_choose_level_1_default_range"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#FFFFFF" />
<SeekBar
android:id="@+id/seekbar_choose_level_2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="20dp"
android:max="100" />
</LinearLayout>
When I run the app, I get the what is displayed in first image. I need it to be as second image.
Thanks in advance..
What it is now :
What I want :
Answer :::
To those who are looking for the solution of similar kind, I have found the answer from @Marko comment. Thanks Marko..
Here is the link : click here
Here is the solution :
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.your_layout);
getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
}