我创建一个布局父布局,所有布局都匹配父级但仍显示包含仅包含。我尝试了所有布局设置匹配父级,但它没有以全宽显示如何解决这类问题。
<?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:background="@color/lightyellow"
android:orientation="vertical">
<include
android:id="@+id/rightLayout"
layout="@layout/header" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/padding_medium"
android:layout_marginRight="@dimen/padding_medium"
android:layout_marginTop="@dimen/padding_large"
android:dividerHeight="@dimen/padding_medium"
android:orientation="horizontal"
android:paddingBottom="@dimen/padding_medium"
android:paddingTop="@dimen/padding_medium">
<Spinner
android:id="@+id/spnSelectEventName"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.9"
android:background="@drawable/spinner_bg" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:background="@drawable/image_bg" />
</LinearLayout>
标题布局文件是。
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/GreenColor"
android:baselineAligned="false"
android:padding="@dimen/padding_medium"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/btn_header_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:clickable="true"
android:gravity="center"
android:visibility="gone">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_sidemenu"
android:clickable="false"
android:duplicateParentState="true" />
</LinearLayout>
<TextView
android:id="@+id/txt_middle_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginBottom="@dimen/padding_small"
android:layout_marginTop="@dimen/padding_small"
android:gravity="center"
android:layout_weight="1"
android:text="Header Name"
android:textColor="@color/WhiteColor"
android:textSize="@dimen/TextSize_medium"
android:textStyle="bold"
android:visibility="visible" />
<LinearLayout
android:id="@+id/btn_header_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center|right"
android:clickable="true"
android:gravity="center"
android:visibility="gone">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/ic_search_home"
android:clickable="false"
android:duplicateParentState="true" />
</LinearLayout>
答案 0 :(得分:1)
如下所示更改
img11 = imread('img.bmp'); [rows cols ColorChannels] = size(img11); for i=1:cols for j=1:rows intensityValue = img11(j,i); end end % below trying different plot method plot(intensityValue); plot(1:length(img11),img11); plot(img11(:))
。从SELECT STRAIGHT_JOIN * FROM smalltable INNER JOIN bigtable ON smalltable.bigtable_id = bigtable.bigtable_id;
中删除不必要的Layout
和padding
。并向margins
提供一些Layout
,以便它能正常运作。
weight