Question

Create an iOS App in xcode with 3 screens, and add some interface elements into each...

Create an iOS App in xcode with 3 screens, and add some interface elements into each interface, including buttons on each interface, i.e. page 1: “Next Page”, page 2: “Next Page” and “Previous Page” and page 3: “First Page” and “Previous Page”. When a button is touched, move to the corresponding page (or screen). Include TextFields in page 1 and page 2 and pass the input values in the TextFields to Screen 2 and Screen 3 respectively.

Homework Answers

Answer #1

Screen1:

FirstPage:

Firstpage.xml:

<RelativeLayout>

<EditText

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:id="@+id/editText"/>

<Button

android:text="NextPage"

android:id="@+id/button"

android:onClick="showSecond"/>

</RelativeLayout>

Screen2:

SecondPage.xml:

<RelativeLayout>

<EditText

android:inputType="textName"/>

<Button

android:text="NextPage"

android:onClick="showThird"/>

<Button

android:text="PreviousPage"

android:onClick="showFirst"/>

</RelativeLayout>

Screen3:

ThirdPage:

ThirdPage.xml:

<RelativeLayout>

<EditText

android:inputType="textName"/>

<Button

android:text="FirstPage"

android:onClick="showFirst"/>

<Button

android:text="PreviousPage"

android:onClick="showSecond"/>

</RelativeLayout>

FirstPage.java:

public class FirstPage extends AppCompatActivity{

EditText et;

@override

protected void onCreate(Bundle savedInstanceState){

super.onCreate(savedInstanceState);

setContentView(R.layout.activity.first);

}

public void showSecond(View v)

{

et=(EditText)findViewByID(R.id.editText);

Intent i=new Intent(this,SecondPage.class);

i.putExtra("str1",et.getText().toString());

StartActivity(i);

}

}

SecondPage.java:

public class SecondPage extends AppCompatActivity{

EditText et;

@override

protected void onCreate(Bundle savedInstanceState)

{

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_second);

et=(EditText)findViewById(R.id.editText2);

et.setText(getIntent().getStringExtra("str1"));

}

}

public void showThird(View v)

{

et=(EditText)findViewById(R.id.editText2);

Intent i=new Intent(this,ThirdPage.class);

i.putExtra("str2",et.getText().toString());

startActivity(i);

}

public void showFirst(View v)

{

startActivity(new Intent(this,FirstPage.class));

}

}

ThirdPage.java:

public class ThirdPage extends AppCompatActivity{

EditText et;

@Override

protected void onCreate(Bundle savedInstanceState){

super.onCreate(savedInstanceState);

setContentView(R.layout.activity_third);

et=(EditText)findViewById(R.id.editText3);

et.setText(getIntent().getStringExtra("str2"));

}

public void showFirst(View v)

{

startActivity(new Intent(this,FirstPage.class));

}

public void showSecond(View v)

{

et=(EditText)findViewById(R.id.editText3);

Intent i=new Intent(this,SecondPage.class);

i.putExtra("str1",et.getText().toString());

startActivity(i);

}

}

In the above program by using intents i moved data from one screen to another screen.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Implement a scientific calculator using MVC constructs in Swift 3 Programming language(basic calculator IOS app) Requirements:...
Implement a scientific calculator using MVC constructs in Swift 3 Programming language(basic calculator IOS app) Requirements: It needs to be able to handle multiple operations in a sequence. It should ONLY use the last operand if multiple operands are entered consecutively Example: “5++-1=”is equivalent to “5-1=” Proper error handling and self-correction. “+-5” is equivalent to “negative 5” “0004+32 ++ 0101 -- 04=” is equivalent to “4+32+101-4=” Implement 3 more buttons: ¼ ½ and ¾ at the bottom of the keyboard....
Implement a scientific calculator using MVC constructs in Swift 3 Programming language(basic calculator IOS app). It...
Implement a scientific calculator using MVC constructs in Swift 3 Programming language(basic calculator IOS app). It needs to have two classes. One class name is CalculatorBrain.swift for model and another is ViewController.swift for view. Also please show the screenshot of storyboard. Requirements: It needs to be able to handle multiple operations in a sequence. It should ONLY use the last operand if multiple operands are entered consecutively Example: “5++-1=”is equivalent to “5-1=” Proper error handling and self-correction. “+-5” is equivalent...
I need the java code for a 4-function calculator app on android studio. Please make sure...
I need the java code for a 4-function calculator app on android studio. Please make sure all the requirements shown below are followed (such as the error portion and etc). The topic of this app is to simply create a 4 function calculator which calculates math expressions (add, subtract, multiply, and divide numbers). The requirements are the following : - The only buttons needed are 0-9, *, /, +, -, a clear, and enter button - Implement the onclicklistener on...
Introduction Purpose Your goal is to create a design for a software interface. You will experience...
Introduction Purpose Your goal is to create a design for a software interface. You will experience the scope of the design process from brainstorming ideas and gathering information about users’ needs to storyboarding, prototyping, and finally, testing and refining your product. As you work on the software interface, you will demonstrate your ability to apply fundamental Human-Computer Interaction principles to interface analysis, design, and implementation. You will be responsible for delivering project components to your professor at several points during...
Coding in Python Add radio button options for filing status to the tax calculator program of...
Coding in Python Add radio button options for filing status to the tax calculator program of Project 1. The user selects one of these options to determine the tax rate. The Single option’s rate is 20%. The Married option is 15%. The Divorced option is 10%. The default option is Single. Be sure to use the field names provided in the comments in your starter code. ================== Project 1 code: # Initialize the constants TAX_RATE = 0.20 STANDARD_DEDUCTION = 10000.0...
Hello! I'm getting this assignment wrong according to the cengage software. The code looks right to...
Hello! I'm getting this assignment wrong according to the cengage software. The code looks right to me but apparently it is not. May someone please take a look at it and let me know what I'm doing wrong. I just can't seem to find the error. I'm attaching the question below and below that I will attach my code. I appreciate any help you could provide. The book is: HTML5, CSS3, and JavaScript, 6th edition, Bundle Thanks QUESTION: General Flex...
CASE STUDY RENDEZWOLF Entrepreneurs create minimal viable products to allow them to test their product with...
CASE STUDY RENDEZWOLF Entrepreneurs create minimal viable products to allow them to test their product with real customers as quickly as possible. Testing the product this way helps to determine whether consumers really want the product, provides feedback from these customers to help improve the product, and gathers hard data that demonstrates the proof of concept many investors want before they fund an emerging business. Judson Aikens wanted to start a business but had a good paying job and was...
In the previous assessment, you used a static set of named variables to store the data...
In the previous assessment, you used a static set of named variables to store the data that was entered in a form to be output in a message. For this assessment, you will use the invitation.html file that you modified in the previous assessment to create a more effective process for entering information and creating invitations for volunteers. Rather than having to enter each volunteer and create an invitation one at a time, you will create a script that will...
I've posted this question like 3 times now and I can't seem to find someone that...
I've posted this question like 3 times now and I can't seem to find someone that is able to answer it. Please can someone help me code this? Thank you!! Programming Project #4 – Programmer Jones and the Temple of Gloom Part 1 The stack data structure plays a pivotal role in the design of computer games. Any algorithm that requires the user to retrace their steps is a perfect candidate for using a stack. In this simple game you...
Create an uml Sequence Diagrams for the following scenario A student at Grambling must register for...
Create an uml Sequence Diagrams for the following scenario A student at Grambling must register for class and pay for the class each term. Show all the steps done in the process starting with getting your pin to paying your fees.   Go to GSU’S website: www.gram.edu 2. Click on current student and then Banner Web 3. Click on Enter Secure Area 4. To Login: a. Enter User ID: Student ID No. e.g., GXXXXXXXX b. Enter PIN#: Date of Birth (mmddyy)...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT