java - How to increase the height of view in Android? -


i created view middle of layout in android application. want increase height of view pressing binary number on keypad.i don't have idea how implement it.i don't have idea it. how can .can 1 me. here xml file. in advanced.

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:gravity="center"     android:orientation="vertical"     android:padding="20dp" >      <textview         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:gravity="center"         android:paddingbottom="20dp"         android:text="@string/textstr" />      <view         android:layout_width="70dp"         android:layout_height="150dp"         android:background="#9400d3" />  </linearlayout>    

1) add id view.

2) in coding: try this:

view_object.setlayoutparams(new viewgroup.layoutparams(80,160)); 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -