android Learning-resolves a listview part of the content being tabhost obscured

Source: Internet
Author: User

Problem: Tabhost fixed at the bottom, a ListView is present in a tab, and when it runs, it is found that if the list content in the ListView is more (more than one screen), some content will be tabhost obscured.

650) this.width=650; "title=" 2014-12-09_13-21-28.png "src=" http://s3.51cto.com/wyfs02/M00/54/90/ Wkiom1sghywdcl2eaad9f3ty2lk946.jpg "alt=" Wkiom1sghywdcl2eaad9f3ty2lk946.jpg "/>

Original ListView Layout File

<listview android:id= "@+id/listbudgetset" android:layout_width= "Match_parent" Android:layout_heigh t= "Wrap_content" android:layout_marginleft= "4DP" android:layout_marginright= "4DP" ></ListView>

Later, after several debugs, it was found that the problem could be resolved by configuring the ListView, the following is the reconfiguration of the ListView:

Add android:layout_weight= "1" to <ListView> and add a layout below the ListView, This is the space for leaving the tabhost display (that is, letting the ListView's scrollbar Grow by 70DP)

<listview        android:id= "@+id/listbudgetset"          android:layout_width= "Match_parent"          android:layout_height= "Wrap_content"         android:layout_ marginleft= "4DP"         android:layout_marginright= "4DP"           android:layout_weight= "1" >    </listview >    <LinearLayout           Android:id= "@+id/budgetlt"          android:orientation= " Horizontal "            android:layout_width=" match _parent "             android:layout_height=" 70SP " >      </LinearLayout> 

650) this.width=650; "title=" 2014-12-09_13-20-44.png "src=" http://s3.51cto.com/wyfs02/M01/54/90/ Wkiom1sgieiy7jvvaad7v4i9ngu694.jpg "alt=" Wkiom1sgieiy7jvvaad7v4i9ngu694.jpg "/>

After reset, the scroll bar is obviously long, the problem is solved ~ ~ ~

But in the code over there I also have to do the processing, in order to make this interface for different oncreate entrance, you need to decide to hide or show the layout below the ListView, here do not paste code, define a global static variable, control linearlayout display or hide on OK.

This article is from the "Qytag (upspringing)" blog, so be sure to keep this source http://qytag.blog.51cto.com/6125308/1587855

android Learning-resolves a listview part of the content being tabhost obscured

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.