android - How can I set invisible area in ListView? -


listview image

enter image description here

hi. i'm using listview in android app. want set listview above image.

app user can see left , center area only. , want set component in right area, area must not visible.

how can this?

here current layout xml code :

<?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:orientation="horizontal" android:padding="8dp" >  <!-- left area start (visible) --> <linearlayout     android:layout_width="0dp"     android:layout_height="match_parent"     android:layout_marginright="5dp"     android:layout_weight="1"     android:orientation="vertical" >      <linearlayout         android:layout_width="match_parent"         android:layout_height="match_parent"         android:orientation="vertical" >           <imageview             android:layout_width="match_parent"             android:layout_height="0dp"             android:layout_weight="2"             android:gravity="center"             android:src="@drawable/ic_launcher" />          <button             android:layout_width="match_parent"             android:layout_height="0dp"             android:layout_weight="1"             android:gravity="center"             />      </linearlayout> </linearlayout> <!-- left area end -->   <!-- center area (visible) --> <linearlayout     android:layout_width="0dp"     android:layout_height="match_parent"     android:layout_weight="2"     android:orientation="vertical" >      <linearlayout         android:layout_width="match_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:orientation="horizontal" >          <button             android:layout_width="0dp"             android:layout_height="wrap_content"             android:layout_margin="2dp"             android:layout_weight="2"             />          <button             android:layout_width="0dp"             android:layout_height="wrap_content"             android:layout_margin="2dp"             android:layout_weight="2"             />     </linearlayout>       <linearlayout         android:layout_width="match_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:orientation="horizontal" >          <button             android:layout_width="0dp"             android:layout_height="wrap_content"             android:layout_margin="2dp"             android:layout_weight="1"             />          <button             android:layout_width="0dp"             android:layout_height="wrap_content"             android:layout_margin="2dp"             android:layout_weight="1"             />     </linearlayout>      <linearlayout         android:layout_width="match_parent"         android:layout_height="0dp"         android:layout_weight="1"         android:orientation="horizontal" >          <button             android:layout_width="0dp"             android:layout_height="wrap_content"             android:layout_margin="2dp"             android:layout_weight="1"             />          <button             android:layout_width="0dp"             android:layout_height="wrap_content"             android:layout_margin="2dp"             android:layout_weight="1"             />     </linearlayout>  </linearlayout> <!-- center area end -->   <!-- right area start (invisible) -->     <!-- don't know --> <!-- right area end --> 

you can try element right layout:

android:visibility="gone" 

about element:

this view invisible, , doesn't take space layout purposes


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -