I am new in Android App development and loving this .
Is it good practice to call XML from another XML? Does this means to save app run time ?
XML 1(activity_main):
<fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/fragment" android:name="com.loginfbk.MainFragment" android:layout_width="match_parent" android:layout_height="match_parent" tools:layout="@layout/fragment_main" /> XML 2(fragment_main):
<LinearLayout 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:gravity="center" android:orientation="vertical" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin"> <ImageView android:layout_width="match_parent" android:layout_height="wrap_content" android:src="@drawable/messenger_button_white_bg_round"/> </LinearLayout>
No comments:
Post a Comment