android - How to change layout_weight in my View (programmatically) -


How do I use Java code to replace layout_weight of my code View object from XML? I have included the last thing that I tried below vynosy is my specialty with the value that I want to set

  see hospVyslLineAppColor = (see) View.findViewById (R.id.hospodarsky_vysledok_line_appcolor). HospVyslLineAppcolor.setLayoutParams (New LinearLayout.LayoutParams (Layout Paramount. MATCH_PARENT, Layout P. WRAP_CONTENT, Math. Falcon (Float) vynosy)));   

My XML:

  & lt; Android: id = "@ + id / hospodarsky_vysledok_line_appcolor" Android: layout_width = "match_parent" android: layout_height = "20dp" Android: layout_weight = "69382" Android: background = "# a8a8a8" /> You can use it for linerlight  
 

Code> LinearLayout. Outout Parameters = New liner layout. LayoutPam (Layout Parameter.philpaint, Layout Para. WRAP_CONTENT; Parameters.Wave = 1;

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -