안녕하세요 갓 안드로이드를 시작한 늅입니다.


카메라 화면 레이아웃을 만들려고 하는데 weight를 적용해도 화면이 바뀌질 않네요..

BottomLinear에서 가운데 버튼 weight가 3인데 적용이 안되고

SurfaceView가 있는 Linear와 BottomLinear 사이의 가중치도 적용이 안됩니다.

Surfaceview부분에는 카메라 화면이 들어갈 예정입니다.


제코드에 문제가 있나요?? 혹시 레이아웃을 짜는데 더 좋은 방법 있을까요????\


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.example.myapplication.MainActivity">

<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="4"
android:orientation="vertical">

<SurfaceView
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!--android:layout_height="match_parent"-->

<LinearLayout
android:id="@+id/topLinear"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">

<ImageButton
android:id="@+id/imgBtt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
app:srcCompat="@mipmap/ic_launcher_round" />

<ImageButton
android:id="@+id/imgBtt2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
app:srcCompat="@mipmap/ic_launcher_round" />

<ImageButton
android:id="@+id/imgBtt3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
app:srcCompat="@mipmap/ic_launcher" />
</LinearLayout>

</FrameLayout>

<LinearLayout
android:id="@+id/bottomLinear"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:orientation="horizontal">

<ImageButton
android:id="@+id/galleryBtt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
app:srcCompat="@mipmap/ic_launcher_round" />

<ImageButton
android:id="@+id/cameraBtt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
android:layout_weight="3"
app:srcCompat="@mipmap/ic_launcher_round" />

<ImageButton
android:id="@+id/makingBtt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="10dp"
android:layout_weight="1"
app:srcCompat="@mipmap/ic_launcher" />

</LinearLayout>
</LinearLayout>