android - RelativeLayout params for main screen widget -


what's guys! here example of layout xml:

<relativelayout     android:id="@+id/conf_rlayoutmultisize"     android:layout_width="wrap_content"     android:layout_height="wrap_content"       android:layout_centerhorizontal="true"     android:layout_centervertical="true"     >      <imageview         android:id="@+id/widget_body"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_centerhorizontal="true"         android:layout_centervertical="true"         android:src="@drawable/transparent100" />      <imageview         android:id="@+id/widget_scar"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_centerhorizontal="true"         android:layout_centervertical="true"         android:src="@drawable/scar1" /> </relativelayout>  <imageview     android:id="@+id/widget_dial"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_centerhorizontal="true"     android:layout_centervertical="true"     android:src="@drawable/dial1" /> </relativelayout> 

the question - possible change conf_rlayoutmultisize size through code? have cofigurantion layout did easy, can't realise how on manescreen vidget. i've tried this

  widgetview.setint(r.id.conf_rlayoutmultisize,"setlayoutparams",150+widgetbodysize);  

but wasn't succesful

you can follows:

relativelayout rlay = (relativelayout) findviewbyid(r.id.conf_rlayoutmultisize); relativelayout.layoutparams params = new relativelayout.layoutparams(value_width, value_height); // set whatever parameters want here rlay.setlayoutparams(params); // assign parameters relative layout 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -