Develop an android app which displays Hello message

Practical - 5
Develop an android app which displays “Hello, welcome to Android Lab” message.


Code:
MainActivity.java
package com.example.admin.helloworld;

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);
    }
}

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:gravity="center_vertical"
    tools:context="com.example.admin.helloworld.MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello,"
        android:textSize="30sp"
        android:layout_gravity="center"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="welcome to Android Lab"
        android:textSize="30sp"
        android:layout_gravity="center"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</LinearLayout>

Output:




Comments

  1. Thanks for sharing this article to us, it is very nice article and good post thanks for sharing this article to us. I really like this article because i got good info about this article thanks for haring this article to us . Checkout here more info about skapa appar

    ReplyDelete
  2. Amidst this pandemic, all you can think of right now is a virtual event. Stay home, stay safe and host events from your own house! Don't let your business cease. You just host your event through online event apps.
    https://eventify.io/form-builder/

    ReplyDelete
  3. Make your event successful with Eventify's AI-based event matchmaking platform.

    https://eventify.io/

    ReplyDelete
  4. Eventify is the best event management and registration platform. Use our customisable event management software to build engaging mobile event apps and websites.

    https://eventify.io/event-networking/

    ReplyDelete
  5. The all-in-one event app management platform that makes your in-person or virtual B2B events & conferences more successful than ever before. Registration & ticketing, event networking, attendee check-in and many more.

    ReplyDelete
  6. TeksMobile is a state of the art Mobile App and ios app development company UK on a mission to upgrade your mobile and web experience. Teks Mobile has always been, and will forever be, a mobile app company that accords first-priority to its clients’ wishes. Their support has helped us grow, and we look forward to more challenges, more success, more appreciation… and more scopes to serve clients across the world.


    ReplyDelete
  7. Eventify is a great event software and registration platform. Use our customisable event planning software to build engaging mobile event app and websites. Eventify brings to you a comprehensive set of features to boost user-engagement levels. Build an event app and/or an event website, incorporate these features, and get your attendees really involved with your conference on our conference app. It's an amazing apps for events.

    ReplyDelete
  8. Check out the main features and USP of our cutting-edge event app builder platform. You can use Eventify to create fully customised mobile event and conference apps. https://eventify.io/event-app/

    ReplyDelete

Post a Comment

Popular posts from this blog

Study of DB Miner Tool

Study of WEKA tool

Create calculated member using arithmetic operators and member property of dimension member