2013-04-01 2 views
1

아래 이미지에서와 같이 액티비티를 어떻게 디자인 할 수 있을지 궁금합니다. 이 패턴은 Google에서 앱 세부 정보를보기로 선택한 경우에도 나타납니다.안드로이드 뷰 페이지를 디자인하는 방법

이런 종류의 디자인에 ViewPager를 사용합니까?

예제에 대한 링크, 자습서는 높이 평가됩니다. 나는 확실하지 않다

enter image description here

+0

태블릿이나 휴대 기기에서 이러한 종류의 레이아웃을 원하십니까? 모바일 디바이스에서 그다지 어색한 레이아웃이 아닌 가치가있는 파편은 당신을 위해 그것을 할 것입니다! –

+0

우리는 레이아웃을 달성 할 수있는 조각을 사용합니다. ur 앱이 3.0 이상의 태블릿 만 지원하는 경우에는 직접 지원할 수 있습니다. 그렇지 않으면 support jar를 사용할 수 있습니다. android-support-v4.jar http://developer.android.com/tools/extras/support-library.html – sri

+0

* 단편 * 당신을 도울 수 있습니다. –

답변

0

은 일을하거나하지 않는 유효한 방법이 그 것이다. 나는 Linear 레이아웃을 사용하여 전체적으로 작업하는 것을 선호합니다.

<!-- parent 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:orientation="vertical" > 

<!--  splitting into 2 horizontal --> 
    <LinearLayout 
     android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="horizontal" 
     > 

<!--   1st part of horizontal --> 
     <LinearLayout 

      android:layout_width="x_value" 
      android:layout_height="match_parent" 
      android:orientation="vertical" 
      > 
      <ScrollView 
       android:layout_width="fill_parent" 
       android:layout_height="fill_parent" 
       android:scrollbars="vertical" 
       android:layout_weight="1"> 

<!--   include content --> 

      </ScrollView> 


     </LinearLayout> 

     <!--   2nd part of horizontal --> 

     <LinearLayout 

      android:layout_width="x_value" 
      android:layout_height="match_parent" 
      android:orientation="vertical" 
      > 

        <!-- fixed header part--> 
          <LinearLayout    
          android:layout_width="match_parent" 
          android:layout_height="y_value"   
          > 
          </LinearLayout> 

          <!-- next 2 vertical splits with scrollbar--> 

          <LinearLayout 
           android:layout_width="match_parent" 
           android:layout_height="y_value" 
           android:orientation="vertical" 
           > 
               <ScrollView 
                android:layout_width="fill_parent" 
                android:layout_height="fill_parent" 
                android:scrollbars="vertical" 
                android:layout_weight="1"> 
                  <LinearLayout    
                  android:layout_width="match_parent" 
                  android:layout_height="y_value" 
                  > 
                    <ScrollView 
                     android:layout_width="fill_parent" 
                     android:layout_height="fill_parent" 
                     android:scrollbars="horizontal" 
                     android:layout_weight="1"> 

                     <!-- include content --> 

                    </ScrollView>  


                  </LinearLayout> 

                  <LinearLayout    
                  android:layout_width="match_parent" 
                  android:layout_height="y_value" 
                  > 

                  </LinearLayout> 
               </ScrollView> 

          </LinearLayout> 

      </LinearLayout> 


    </LinearLayout> 

</LinearLayout> 


I hope this would give some idea. 
관련 문제