如何在android代码中修改xml布局文件中ImageButton的属性呢?
比如下面XML文件中的android:layout_alignParentTop="true"这一项改成false
请各位大侠指教,如能提出代码十分感谢!
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".XShowActivity">
<ImageButton
android:id="@+id/pen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:src="@drawable/close" />
</RelativeLayout>