Page 131

Android Programming Cookbook

123 / 143

Figure 7.4: “Add an activity to Mobile”. Choose: “Add no activity”. Now press finish, and our project has just been created!


Create the layout of the AndroidStackViewActivity

Add a new xml file inside /res/layout folder, with name activity_main.xml. We should have /layout/activit y_main.xml file and paste the code below. activity_main.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffcc00"> <StackView android:id="@+id/stack_view" android:layout_width="fill_parent" android:layout_height="wrap_content" android:animateLayoutChanges="true"></StackView> </RelativeLayout>


This is Yahya Christian School Magazine

Read more
Read more
Similar to
Popular now
Just for you