다음과 같은 화면을 만들 수 있습니까?같은 라인에 레이아웃과 뷰 플리퍼를 만들 수 있습니까?
[스크린] [2]
I 페이지의 변경하면 동일한 레이아웃은 모든 페이지
감사에 표시됩니다
다음과 같은 화면을 만들 수 있습니까?같은 라인에 레이아웃과 뷰 플리퍼를 만들 수 있습니까?
[스크린] [2]
I 페이지의 변경하면 동일한 레이아웃은 모든 페이지
감사에 표시됩니다
FrameLayout에서 문제가 해결되었습니다. 중첩을 허용하는 FrameLayout Views
예, 레이아웃이 가능합니다!
<RelativeLayout android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ViewFlipper android:layout_width="fill_parent"
android:layout_height="fill_parent">
</ViewFlipper>
<!-- I assumed your layout at the top-left corner is a LinearLayout, otherwise replace it with what you have -->
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:id="@+id/firstLayout">
</LinearLayout>
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/firstLayout"
android:layout_margin="5dp"/>
</RelativeLayout>
편집 :
TextView
을 Layout
요소 옆에 추가 한 다음 TextView
을 추가하고 toRightOf
(약간의 여백을두고 약간의 공백을 넣음) 속성을 설정하는 경우 약간의 모호함이 있습니다. 위의 레이아웃에서 수정을 확인하십시오. TextView
을 (가로 : Layout
을 고려하여 높이를 고려하여) 세로 가운데에 표시하려면 Layout
및 TextView
을 너비와 높이가 wrap_content
인 LinearLayout
에 넣고 상단 및 왼쪽에 정렬 할 수 있습니다. 학부모 RelativeLayout
.
감사합니다. 같은 것을 시도했습니다. –
감사합니다. 같은 것을 시도했습니다. 그러나이 경우 : 레이아웃 측면에 텍스트 뷰를 설정해야합니다 (같은 줄에 있음) –
@AndroidUser 내 대답을 편집했습니다. – Luksprog
귀하의 질문은 분명하지 않지만, 왼쪽 상단 레이아웃과 텍스트보기를 래퍼 선형 레이아웃에 넣고 싶다는 점을 제외하고는 Kursprog가 제공 한 바를 정확히 찾고 있습니다. xml은 다음과 같습니다 (모든 속성을 뺀 것).
<RelativeLayout> <!--Parent -->
<ViewFlipper/>
<LinearLayout android:orientation="horizontal"><!-- wrapper to your two top layouts
<LinearLayout/> <!-- whatever layout it is that you're describing in your diagram -->
<TextView/> <!-- the text view in your diagram -->
</LinearLayout>
</RelativeLayout>
당신은 그들이 화면에 고르게 분포하고 있도록 랩퍼가 fill_parent의 폭을 제공하고 1로 모두 내부 요소의 layout_weight를 설정하는 것이 좋습니다.
FrameLayout의 문제를 해결했습니다. 겹치는보기를 허용하는 FrameLayout –
"페이지"란 무엇을 의미합니까? –
viewflipper의 슬라이드 전환 –