going to another xml from the main xml



I m totally new to program and I m trying to make a simple app. I need to jump from one xml to another xml by clicking a button, and I m stopped here. I only know how to use graphical layout and how should I do it???


I want to jump from Activity_Main.xml to 2bb.xml, and 2bb.xml to 2result.xml and at last from 2result.xml back to Activity_Main.xml.


my A_M.xml



<GridLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnCount="1"
tools:context="com.example.soo.MainActivity"
tools:ignore="MergeRootFrame,NewApi,UnusedAttribute" >

<Button
android:id="@+id/button1"
android:layout_width="150dp"
android:layout_height="215dp"
android:layout_column="0"
android:layout_gravity="left|top"
android:layout_row="0"
android:text="@string/B2"
android:onClick="2bb" />

No comments:

Post a Comment