Student Details App | Android Development | Java

Develop an android application to display Student name and its marks

In this tutorial, we are creating an android application which will look like as



Let’s start by designing the layout of our Android App.

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.studentdetailsapp">
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

activity_main.xml

<?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"
    android:padding="10dp"
    tools:context=".MainActivity">

    <TextView
        android:id="@+id/studName"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Student name: Amol Chaudhari"
        android:textSize="24sp" />

    <TextView
        android:id="@+id/studMarks"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Marks: 75.00"
        android:textSize="24sp" />
</LinearLayout>

MainActivity.java

package com.example.studentdetailsapp;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}

Comments

  1. Fantastic to read this blog. Thanks you so much for sharing this kind of article.
    Python Training in Chennai
    Python Online Course
    Python Training in Bangalore

    ReplyDelete
  2. I recently came upon your blog and wanted to express how much I liked reading your postings about Python Course in Delhi. I'm hoping you'll write again soon. Thank you very much for the excellent information.

    ReplyDelete
  3. Thank you for this amazing blog, i am very satisfied with this blog. keep sharing this type of content with us
    apart from this if someone is looking for the best training institute in delhi for any course which is given below,
    you should go to High Technologies Solutions training institute
    this is the one of the best computer institute in delhi for these course .

    Best Training Institute for Python training Course in Delhi, NCR

    Best Training Institute for AutoCAD Training Course in Delhi, NCR

    Best Training Institute for SAP Training Course in Delhi, NCR

    Best Training Institute for SAS Training Course in Delhi, NCR

    Best Training Institute for c++ training Course in Delhi, NCR

    ReplyDelete

Post a Comment

Popular posts from this blog

Program to define a class 'employee' with data members as empid, name and salary. Accept data for 5 objects using Array of objects and print it.

Program to input age from user and throw user-defined exception if entered age is negative

Define a class Student with four data members such as name, roll no.,sub1, and sub2. Define appropriate methods to initialize and display the values of data members. Also calculate total marks and percentage scored by student.