Posts

Simple App To Get Text And Show

Image
MainActivity.Java package com.example.firstapp; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class MainActivity extends AppCompatActivity {     private Button showButton;     private TextView nameText;     private EditText enterName;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         showButton = findViewById(R.id.button);         nameText = findViewById(R.id.textView);         enterName = findViewById(R.id.editTextName);         showButton.setOnClickListener(new View.OnClickListener() {             @Override   ...

Make Rain Android App

Image
activity_main.xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout 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:background="#03A9F4"     tools:context=".MainActivity">     <TextView         android:id="@+id/textView"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:text="@string/you_have"         android:textSize="16sp"         app:layout_constraintBottom_toBottomOf="parent"         app:layout_constraintEnd_toEndOf="parent"         app:layou...