开发者

layout real estate android

I have several view components in a layout. most of them have visibility=gone and they are turned on only based on certain conditions and this is done programatically. All of this works fine but even though visibility=gone, there is a blank space occupying that area. how do i remove that>

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout android:weightSum="1" android:layout_height="wrap_content"
    android:background="@drawable/subheader_gradient" android:orientation="horizontal"
    android:layout_width="fill_parent" android:id="@+id/_searchLayout">
    <EditText android:layout_width="fill_parent" android:id="@+id/_search"
        android:layout_height="wrap_content" android:textColor="@color/black"
        android:layout_gravity="center" android:background="@color/white"
        android:layout_alignParentTop="true" android:layout_margin="10dp"
        style="@style/formValue" android:singleLine="true"
        android:inputType="textNoSuggestions|textVisiblePassword|textCapCharacters"
        android:autoText="false" android:lines="1"
        android:hint="@string/_Text_searchBy" android:maxLines="1"
        android:textColorHint="@color/light_gray" android:textScaleX="1"
        android:textSize="7pt" />
</LinearLayout>


<TextView style="@style/SubHeaderText" android:text="@string/_Heading_searchResults"
    android:id="@+id/_HeadingsearchResults"
    android:layout_height="wrap_content" android:layout_width="fill_parent"
    android:background="@drawable/subheader_gradient" android:visibility="gone"></TextView>


<TextView android:layout_width="fill_parent"
    android:visibility="gone" android:id="@+id/_HeadingsearchResultsNull"
    android:layout_height="wrap_content" android:text="@string/_Text_noSymbolsFounds"
    android:textColor="@color/light_gray" style="@style/formLabel"
    android:layout_gravity="center" android:background="@color/white" />
<LinearLayout android:layout_height="wrap_content"
    android:orientation="horizontal" android:layout_width="fill_parent"
    android:id="@+id/_progressLayout" android:background="@color/white"
    android:visibility="gone">
    <ProgressBar style="@android:style/Widget.ProgressBar.Small.Inverse"
        android:layout_height="wrap_content" android:layout_width="wrap_content"
        android:layout_gravity="left" android:id="@+id/_progress"
        android:padding="5dip"></ProgressBar>
    <TextView android:id="@+id/_progressText"
        andro开发者_JS百科id:text="@string/_Heading_searching"
        android:gravity="center|center_vertical" android:layout_height="wrap_content"
        android:layout_width="wrap_content" android:padding="5dip"
        android:textColor="@color/black" android:textSize="15dp"
        android:layout_gravity="center_vertical|center" />
</LinearLayout>

<ListView android:fadeScrollbars="true" android:scrollbars="vertical"
    android:id="@+id/_searchSymbol_list" android:layout_width="match_parent"
    android:layout_height="wrap_content" android:visibility="gone"
    android:scrollbarAlwaysDrawVerticalTrack="true" android:background="@color/white"
    android:cacheColorHint="@color/white" />

<TextView style="@style/SubHeaderText" android:text="@string/_Heading_recentResults"
    android:id="@+id/_recentResults" android:layout_height="wrap_content"
    android:layout_width="fill_parent" android:background="@drawable/subheader_gradient"></TextView>


<ListView android:fadeScrollbars="true" android:scrollbars="vertical"
    android:id="@+id/_recentQuotes_list" android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:scrollbarAlwaysDrawVerticalTrack="true" android:background="@color/white"
    android:cacheColorHint="@color/white" />

layout real estate android


Try to send your layout XML. Or if you want to identify, which layout is causing problems, set different background color for each one and then you can try different parameters for layout size.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜