다음과 같은 문제가 있습니다.이 경우 두 개의 파트, 상단 탐색 모음, 더 딱딱한 동작 또는 도구 모음을이 경우 더 복잡한 이유로 탐색 모음을 설정하는 옵션으로 분할하고 싶습니다. 다른 기기 (전화/패드)의 절대 값과 백분율 값이 다르므로 %가 너무 어렵습니다.분할 화면 비율 및 dp
내비게이션 막대 부분은 100dp 여야하고 RelativeLayout
의 새로운 100 % 화면을 사용하려면 fill_parent
을 사용하면 흰색 부분이 100과 같을 것입니다. %.
가능한 경우 axml 솔루션이 우선적으로 적용되므로 C# 또는 Java 기반의 모든 것이 옵션이지만 잘못된 것입니다.
나는 다음을 수행 다만하려고하지만 난 그냥 corretly, 내가이 문제를 해결하는 방법을 알아낼 질수 전체 상위 개체의 크기를 설정 생각합니다.<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#f0f0f0" >
<LinearLayout android:layout_width="fill_parent"
android:layout_height="100dp"
android:background="#ffffff">
<!--Some Content-->
</LinearLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<android.support.percent.PercentRelativeLayout
android:layout_width="0dip"
android:layout_height="fill_parent"
app:layout_widthPercent="100%"
app:layout_heightPercent="100%"
android:background="#ffffff">
<!--Some Content-->
</RelativeLayout>
</RelativeLayout>
'android : layout_weight' 사용을 시도하십시오. – Berkay92
특히 얼마나 좋습니까? 내가 정확히 기억한다면 그것은 두 부분 모두에 백분율에 기초한 가중치를 부여 할 것이지만, 그 지역의 한 부분 만 백분율을 기준으로 할 수 있습니다. 예를 들어 주시겠습니까? –