마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

fragmenttabhost.. viewpager..질문..입니다. [closed]

0 추천

 

이런식으로 구현해야 하는데요..

하.. 정말 답답해서 죽겟네요 ㅜㅜ

 


<android.support.v4.app.FragmentTabHost
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/tabhost"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >    
    
    <LinearLayout
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent">
  
        <LinearLayout 
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0"
            android:background="#FFDAB9"
            android:gravity="right"
            >
            <Button
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="머지"
                 />
        </LinearLayout>
        
  <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0"/>
  
  <android.support.v4.view.ViewPager
            android:id="@+id/pager"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="#FF0000"
            android:layout_weight="1"/>
  
  <TabWidget
            android:id="@android:id/tabs"
            android:orientation="horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="0"/>
    </LinearLayout>
</android.support.v4.app.FragmentTabHost>

xml 이구요

mTabHost = (FragmentTabHost)findViewById(android.R.id.tabhost);
   mTabHost.setup(this,getSupportFragmentManager(),R.id.pager);

   mTabHost.addTab(mTabHost.newTabSpec("simple").setIndicator("Simple"),testtest.class,null); 

 

엑티비티엔..이런식으로..

일단 테스트 해보기위해 하고잇는데요..

자꾸..nullpoint가 뜨네요..

길잡이가 되어주실분 계신가요 ㅜㅜ 답변기다립니다.ㅜㅜ

 

질문을 종료한 이유: 해결
mamongs (4,050 포인트) 님이 2013년 4월 22일 질문
mamongs님이 2013년 4월 24일 closed
로그를 올려주시길.......
...