
이런식으로 맨위에 textview 옆에 버튼을 만들었는데 layout_margin 속성을 주지않으면 꽉차기 때문에 15dp 정도를 주었습니다.
그런데 옆에 세종대학교 게시판 textview 가 옆으로 밀리네요...
어떻게해야 밀리지않고 버튼이 꽉차게 할수있을까요. 아래는 해당부분 xml 소스입니다.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:weightSum="1"
android:background="#DCDCDC"
android:layout_weight="0.2">
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="#DCDCDC"
android:layout_weight="0.2"></View>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.6"
android:text="세종대학교 게시판"
android:textSize="20dp"
android:background="#DCDCDC"
android:gravity="center"
android:textColor="#0049e9"
android:textStyle="bold" />
<Button
android:layout_width="0dp"
android:layout_height="match_parent"
android:background="@drawable/plus_btn"
android:layout_margin="15dp"
android:textSize="15dp"
android:layout_weight="0.2"/>
</LinearLayout>
+ ) 추가로 actionbar 로 말고 이런식으로 해야하기 때문에 이런식으로 하는겁니다.