Using AndroidStudio
Create a mobile app UI that has the following labels and textboxes.
The mobile app UI should also contain a Submit button. The following validation should be executed as soon as user clicks the Submit button.
Once you build the UI, then create an additional screen that shows following things:
Customer OrderID(Label):__________
Order_Name(Label):__________
Order_Quantity:_____________
Order_FullfilledBy:____________
CODE :-
1st Activity :-
It contains main page of the application, where validation is done.
xml file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Customer Name:-"
android:textSize="25dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/name"
android:textSize="25dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Customer ID:-"
android:textSize="25dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/id"
android:inputType="number"
android:textSize="25dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Customer Address:-"
android:textSize="25dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/address"
android:textSize="25dp"/>
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="submit"
android:layout_gravity="center"
android:layout_marginTop="50dp"
android:id="@+id/submit"/>
</LinearLayout>
java file
package com.example.myapplication1;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
EditText name,id,address;
Button submit;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
name=findViewById(R.id.name);
id=findViewById(R.id.id);
address=findViewById(R.id.address);
submit=findViewById(R.id.submit);
submit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String Customer_name=name.getText().toString();
String Customer_ID=id.getText().toString();
String Customer_address=address.getText().toString();
//this if will check that whether all the fields are filled or not.
if(Customer_name.equals("") || Customer_ID.equals("") || Customer_address.equals(""))
{
Toast.makeText(getApplicationContext(),"all the details are not filled",Toast.LENGTH_LONG).show();
}
//this else if will for both customer id and customer name are entered //correctlly or not
else if(Integer.parseInt(Customer_ID)<0 || Integer.parseInt(Customer_ID)>=1000 && (Customer_name.contains("0") || Customer_name.contains("1") || Customer_name.contains("2") || Customer_name.contains("3") || Customer_name.contains("4") || Customer_name.contains("5") || Customer_name.contains("6") || Customer_name.contains("7") || Customer_name.contains("8") || Customer_name.contains("9")))
{
Toast.makeText(getApplicationContext(),"invalid CUSTOMER_NAME and CUSTOMER_ID",Toast.LENGTH_SHORT).show();
}
//this else will check for valid customer id and customer name.
else
{
if(Integer.parseInt(Customer_ID)<0 || Integer.parseInt(Customer_ID)>=1000 || (Customer_name.contains("0") || Customer_name.contains("1") || Customer_name.contains("2") || Customer_name.contains("3") || Customer_name.contains("4") || Customer_name.contains("5") || Customer_name.contains("6") || Customer_name.contains("7") || Customer_name.contains("8") || Customer_name.contains("9")))
{
if(Integer.parseInt(Customer_ID)<0 || Integer.parseInt(Customer_ID)>1000)
{
Toast.makeText(getApplicationContext(),"invalid Customer_ID",Toast.LENGTH_SHORT).show();
}
if((Customer_name.contains("0") || Customer_name.contains("1") || Customer_name.contains("2") || Customer_name.contains("3") || Customer_name.contains("4") || Customer_name.contains("5") || Customer_name.contains("6") || Customer_name.contains("7") || Customer_name.contains("8") || Customer_name.contains("9")))
{
Toast.makeText(getApplicationContext(),"invalid Customer_Name",Toast.LENGTH_SHORT).show();
}
}
//if all the valid details are filled and all the conditions satisfied //than this else will execute and take us to another page.
else
{
Intent i=new Intent(getApplicationContext(),Main2Activity.class);
startActivity(i);
}
}
}
});
}
}
*************************************************************************************************
2nd Activity :-
It contains the 2nd page which will open after clicking on submit button.
xml file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".Main2Activity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Customer OrderID:-"
android:textSize="25dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/id"
android:textSize="25dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Order_Name:-"
android:textSize="25dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/name"
android:textSize="25dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Order_Quantity:-"
android:textSize="25dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/qty"
android:textSize="25dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Order_FullfilledBy:-"
android:textSize="25dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/fill"
android:textSize="25dp"/>
</LinearLayout>
</LinearLayout>
java file
package com.example.myapplication1;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class Main2Activity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main2);
}
}
************************************************************************************************
OUTPUT :-




Using AndroidStudio Create a mobile app UI that has the following labels and textboxes. Customer Name...
Using Android Studios. Scenario: You recently started working as the mobile app developer for a University and have been assigned to build a mobile app that calculates the students' grade. Your app should contain following screens: Screen 1 Labels for subject1, subject2, and subject3 Textboxes for subject1, subject2, and subject3 Labels for MaxGrade, MinGrade, and Avg.Grade Submit button Once user clicks submit button, you need to display letter grade in a label Screen 2 Screen that allows students to register...
This assignemnt for Android development using Java Weather Forecaster App Goal: Create an app to display a weather forecast for the user’s current location Create the app titled Weather Forecaster The first screen will have a textbox for the user to enter a zip code and a button to submit When the user enters the zip code and clicks the button, the app will navigate to the weather forecast screen. The weather forecast screen will show the current weather for...
Using C#: Create a Form that consists of 3 radio buttons, two textboxes, a label and a button. The three radio buttons should represent the names of three fonts, e.g. “Arial”, “Calibri” and “Times New Roman”. In the one textbox, a user should type a message and in the other textbox, the user should type a size. When the user clicks the button, the label should be updated with the text the user typed in the one textbox, using the...
Write a Visual C# program that will input the user's name and a message. The user will be able to choose from an option of formatting tools to change the way the message (and only the message) will look. The user can choose from bold, underline, italic, along with several different color options. All changes the user selects will be displayed in the message textbox. Once the user selects the Finish button, the two pieces of information entered by the...
Please help! Visual Basic - Windows App Form .NET
Framework.
Option Explicit ON
Option Strict ON
Option Infer ON
calculate Letter Grade Number grade: I Letter grade: Calculate Exxt Start a new Project named GradeConverter Add labels, textboxes, and button to the default form. Create an event handler for Calculate and Exit. . When the user enters a number- between 0.0 and 100.0 and clicks Calculate, the letter grade will display for the user The form should be able to...
Exercise 11-4 Create a Reminder app In this exercise, you’ll add a service to a Reminder app that displays a notification every hour that says, “Look into the distance. It’s good for your eyes.” Test the app 1. Start Android Studio and open the project named ch11_ex4_Reminder. 2. Review the code. Note that it contains a layout and a class for an activity, but no class for a service. 1. Run the app. Note that it displays a message that...
Use android studio to create a concert ticket mobile application. The app will calculate the total cost of concert tickets. These types of apps make it very easy for consumers to buy tickets via their mobile devices. In this app, the user will select an event, enter data, and the mobile app will conduct data processing by performing mathematical calculations. The mobile app details are below: Mobile Application Title: “Ticket Hub” Overview: Provide an app that will calculate the total...
Purpose: Experiment the interactive mode with php Instruction: Implement the following two different requirements and compare the results: Implementation 1: Create a html file (login.html) with a login form that contains two labels, two text boxes and one submit button as follows: User Name: ______________ Password: _______________ submit When a user enters values for user name and password text boxes and clicks the submit button, the values are sent to login_handle.php and the values are assigned to two variables: $username and $password....
HELP!
Event Handling- Develop an event handler to handle onclick Form Validation event when a user clicks the submit button on the Survey Form. The event handler should validate the following: o The Name tesxt box should contain only Alphabets. o The Address text boxes should contain only appropriate numeric, alphabet or alphanumeric characters o Make sure at least two checkboxes are checked. o Make sure a radio button option is selected. o The Email Address should be valid. Validate...
Your app is computing and displaying tax for the user, in the format “Hello John Doe, Your Tax is: ......” , where John Doe is the name entered, and .... indicates the tax amount as a dollar figure. Your form has two textboxes, where the user will enter his/her name, and income, and click a Submit button. Your app will store the name entered by the user into a variable of type String, and store the income into a variable...