Set it at the activity in Manifest! Add the FULLSCREEN option there!

On Tue, Oct 23, 2012 at 10:24 AM, Perry168 <perry...@gmail.com> wrote:

> Hi all,
> Following is my testing tabHost and activity.
>
> ---------------------------------------- Layout
> ----------------------------------------------------
>
> <?xml version="1.0" encoding="utf-8"?>
> <TabHost xmlns:android="http://schemas.android.com/apk/res/android";
>    android:id="@android:id/tabhost"
>    android:layout_width="fill_parent"
>    android:layout_height="fill_parent">
>
>    <LinearLayout
>     android:layout_width="fill_parent"
>      android:layout_height="fill_parent"
>      android:padding="0dp"
>      android:orientation="vertical">
>
>       <FrameLayout
>          android:id="@android:id/tabcontent"
>          android:layout_width="fill_parent"
>          android:layout_height="fill_parent"
>  android:layout_weight="1" >
>       </FrameLayout>
>
> <TabWidget
>       android:id="@android:id/tabs"
>       android:layout_weight="0"
>         android:layout_width="fill_parent"
>         android:layout_height="wrap_content" />
> </LinearLayout>
> </TabHost>
>
>
> ----------------------------------------------------------------------------------------
>
> -----------------------------------TabActivity
> -------------------------------------
>
> public class tabtest extends TabActivity {
> private TabHost tabHost;
>
> public Context thisContext;
>     @Override
>     public void onCreate(Bundle savedInstanceState) {
>         super.onCreate(savedInstanceState);
>         requestWindowFeature(Window.FEATURE_NO_TITLE);
>         getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
> WindowManager.LayoutParams.FLAG_FULLSCREEN);
>         setContentView(R.layout.tabgroup);
>
>         if (this.tabHost == null){
>       tabHost = getTabHost();
>           tabHost.setup();
>           tabHost.bringToFront();
>
>
>         TabSpec tab1 = tabHost.newTabSpec("Tab1");
>         TabSpec tab2 = tabHost.newTabSpec("Tab2");
>         TabSpec tab3 = tabHost.newTabSpec("Tab3");
>         TabSpec tab4 = tabHost.newTabSpec("Tab4");
>         TabSpec tab5 = tabHost.newTabSpec("Tab5");
>         TabSpec tab6 = tabHost.newTabSpec("Tab6");
>
>
>
>  
> tab1.setIndicator("Tab1",getResources().getDrawable(R.drawable.first)).setContent(new
> Intent(this,IntentGroup1.class));
>
>  
> tab2.setIndicator("Tab2",getResources().getDrawable(R.drawable.second)).setContent(new
> Intent(this,IntentGroup1.class));
>
>  
> tab3.setIndicator("Tab3",getResources().getDrawable(R.drawable.third)).setContent(new
> Intent(this,IntentGroup1.class));
>
>  
> tab4.setIndicator("Tab4",getResources().getDrawable(R.drawable.first)).setContent(new
> Intent(this,IntentGroup1.class));
>
>  
> tab5.setIndicator("Tab5",getResources().getDrawable(R.drawable.second)).setContent(new
> Intent(this,IntentGroup1.class));
>
>  
> tab6.setIndicator("Tab6",getResources().getDrawable(R.drawable.third)).setContent(new
> Intent(this,IntentGroup1.class));
>
>
>         tabHost.addTab(tab1);
>         tabHost.addTab(tab2);
>         tabHost.addTab(tab3);
>         tabHost.addTab(tab4);
>         tabHost.addTab(tab5);
>         tabHost.addTab(tab6);
>
>     }
>     }
> }
>
>
> ---------------------------------------------------------------------------------------------
>
>
> <https://lh4.googleusercontent.com/-DkProfjgRdQ/UIZBDCwNAEI/AAAAAAAAAOc/g0JYvOaWR3s/s1600/pq2.jpg>
>
>  The "IntentGroup1.class" just a "Hello,world" activity, so I not post it
> on here.
>
> Does anyone know how to solve the black spacing problem? This problem
> wasted me much days.
>
> I had try to test many times. Following is my observed information:
>
> 1) If it
> deleted "getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
> WindowManager.LayoutParams.FLAG_FULLSCREEN)". It will not have shifted down
> problem. Also I found that the black spacing size is similar to status bar
> size.
>
> 2) when running the activity in Emulator (API 7 & 10) , they have same
> problem. But if running  in API 14, It will not have this problem.
>
> Unfortunately, the apps is running for API 7 or above. Does anyone give me
> some help? Does any other method to change full screen?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to