android - slide down view weight -


i have linear layout has 4 childs different weights. when user click button @ first child , want add new child parent linear layout different weight ( 0dp height ) . when adding new child childs height changing.how add new view without change height percantage ?

    ------     view 1 (25%)     ------       ------     view 2 (25%)     ------       ------     view 3 (25%)     ------       ------     view 4 (25%)     ------   

after adding new layout programmatically

     ------     view 1 (25%)     ------       ------     view 2 (25%)     ------       ------     view  3 (25%)     ------       ------     view 4 (25%)     ------        ------     view 5 (25%)     ------     

total layout 125% , scrollable. thanks

when use weights, sizes of views determined dynamically ensure views fit within size of parent - proportions determined weights.

from described, linearlayout not sound correct solution problem. listview may better approach, automatically provide scrolling functionality when total size of items exceeds size of listview itself. listview easy implement , gives scrolling , separators between items automatically. have @ listview developer's guide more information.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -