2014-07-23 1 views
-1

두 개의 활동을 하나씩 표시하고 싶습니다. 활동 .... 하나 위로 및 두 번째 및 중간에 표시 탭 (about, gallery feeds) 모두 내가 내 레이아웃 여기하나의 활동에서 다른 활동을 여는 방법 (활동 및 중간보기 탭 레이아웃)

ActionBarSherlock의 라이브러리되어 사용하고 같은 화면 에 표시해야

<?xml version="1.0" encoding="utf-8"?> 
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="wrap_content" 
android:layout_height="fill_parent" 
android:orientation="vertical" 
android:background="#FFFFFF" > 
    <RelativeLayout 
android:layout_width="fill_parent" 
android:layout_height="fill_parent"> 

<ImageView 
    android:id="@+id/imageView1" 
    android:layout_width="200dp" 
    android:layout_height="200dp" 
    android:layout_marginLeft="63dp" 
    android:layout_marginTop="19dp" 
    android:padding="20dp" 
    android:scaleType="centerCrop" 
    android:src="@drawable/loader" /> 

</RelativeLayout> 

     <RelativeLayout 
      android:layout_width="fill_parent" 
      android:layout_height="match_parent" 
      android:background="#00ffffff" > 

      <ImageView 
       android:id="@+id/image_frm" 
       android:layout_width="fill_parent" 
       android:layout_height="fill_parent" 
       android:layout_marginBottom="300dp" 
       android:src="@drawable/img_frame" /> 

      <RelativeLayout 
       android:id="@+id/relativeLayout1" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_alignBottom="@+id/image_frm" > 
      </RelativeLayout> 

      <RelativeLayout 
       android:id="@+id/relativeLayout2" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_centerVertical="true" 
       android:layout_marginLeft="29dp" 
       android:layout_toRightOf="@+id/relativeLayout1" > 
      </RelativeLayout> 

      <RelativeLayout 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_alignBottom="@+id/image_frm" 
       android:layout_alignLeft="@+id/relativeLayout1" > 
      </RelativeLayout> 



     </RelativeLayout> 

     <RelativeLayout 
android:id="@+id/relativelayout" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
android:layout_alignParentLeft="true" 
android:background="#00ffffff" > 




<TextView 
    android:id="@+id/userfullname" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignParentTop="true" 
    android:layout_centerHorizontal="true" 
    android:layout_marginTop="2dp" 
    android:text="UsFn" 
    android:textColor="#DF0B0B" 
    android:textSize="30dip" /> 

<Button 
    android:id="@+id/logout" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignParentRight="true" 
    android:layout_below="@+id/userfullname" 
    android:layout_marginTop="118dp" 
    android:text="Log Out" /> 

<Button 
    android:id="@+id/btn_edit" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_alignBottom="@+id/logout" 
    android:layout_alignParentLeft="true" 
    android:layout_marginLeft="15dp" 
    android:background="@drawable/btn_green" 
    android:text="Edit " /> 

,

내가이 레이아웃 에 난 정말 혼동하고 도와 도움

+0

질문에 더 구체적인 언어를 사용해보십시오 : "활동 내에서 활동을 중첩하는 방법 *" – Todd

답변

0

간단한 Google Search 당신을 발견 할 수있는 솔루션에 대한 안드로이드 덕분에 아주 새로운하시기 바랍니다 탭을 보여주고 싶어요. 단편은 기본적으로 여러 가지 방법으로 사용할 수있는 두 가지 레이아웃입니다.

+0

나는 안드로이드에서 매우 새롭다. U 원하는 걸하는 방법을 말해라. – user3836115

+0

에서 링크를 통해 파편을 읽으십시오. 내 대답. 새로운 기능이지만 코드를 작성하지 않아도 좋습니다. Google의 "Fragments"또는 "Fragment Examples"를 사용하면 할 일에 대해 여러 가지 구현을 찾을 수 있습니다. Android 개발자가 되려면 Google 검색이 가장 친한 친구 여야합니다. 낙담하지 마십시오;) 우리 모두는 개발 초기 단계에서 이와 같은 질문을했습니다. 다시 말하지만, Google을 많이 사용해야합니다. –

관련 문제