0

i am using android studio in x.xml, i set the layout_height=400dp

<RelativeLayout
        android:id="@+id/relativeLayout2"
        android:layout_width="wrap_content"
android:layout_height="400dp"
      
</RelativeLayout>

in MainActivity.java,i use following code to get layer

relativelayout2=findViewById(R.id.relativeLayout2);

i got the id of layout_height in MainActivity.java,

but how to change it to differents value ?

oscar
  • 11
  • 2

0 Answers0