widget centered
Hello,
how to create a widget that is positioned in the center of the display of the screen?
I understood the need to edit the xml file and put it in read-only, but when I change it no longer compiles because I errors.
In this example, what should I change?
Hello,
how to create a widget that is positioned in the center of the display of the screen?
I understood the need to edit the xml file and put it in read-only, but when I change it no longer compiles because I errors.
In this example, what should I change?
B4X:
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent">
<AbsoluteLayout android:id="@+id/testwidget_panel1" android:layout_width="300dp" android:layout_height="300dp" android:layout_x="0dp" android:layout_y="0dp" android:visibility="visible">
<AbsoluteLayout android:id="@+id/testwidget_panel2" android:layout_width="280dp" android:layout_height="280dp" android:layout_x="10dp" android:layout_y="10dp" android:visibility="visible" android:background="@drawable/testwidget_panel2_background">
<ImageView android:src="@drawable/test" android:scaleType="fitXY" android:id="@+id/testwidget_imageview1" android:layout_width="260dp" android:layout_height="260dp" android:layout_x="10dp" android:layout_y="10dp" android:visibility="visible" />
</AbsoluteLayout>
</AbsoluteLayout>
</AbsoluteLayout>
Last edited: