Skip to content
Snippets Groups Projects
Commit 866991c1 authored by Tharun kumar's avatar Tharun kumar
Browse files

Add new file

parent d0f259eb
No related branches found
No related tags found
No related merge requests found
# Built application files
*.apk
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
.idea/caches
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
package com.example.fund_restart;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.cardview.widget.CardView;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
public class Adminpre extends AppCompatActivity implements View.OnClickListener {
EditText use,pass;
CardView cad;
String nam = "help";
String paas = "please";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_adminpre);
use = findViewById(R.id.adminname);
pass = findViewById(R.id.adminpassword);
cad = findViewById(R.id.Adminlogin);
cad.setOnClickListener(this);
}
@Override
public void onClick(View v) {
if(v.getId() == R.id.Adminlogin){
if(use.getText().toString().isEmpty() || pass.getText().toString().isEmpty()){
{
AlertDialog.Builder alertDialog = new AlertDialog.Builder(Adminpre.this);
alertDialog.setTitle("Alert");
alertDialog.setMessage("Fill all the details");
alertDialog.setPositiveButton("ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
alertDialog.show();
}}
if (pass.getText().toString().trim().equals("please") && use.getText().toString().trim() .equals("help")) {
Toast.makeText(getApplicationContext(), "Logging in....", Toast.LENGTH_SHORT).show();
Intent intent = new Intent(this,Userlogin.class);
startActivity(intent);
}else {
AlertDialog.Builder alertDialog = new AlertDialog.Builder(Adminpre.this);
alertDialog.setTitle("Alert");
alertDialog.setMessage("invalid credentials");
alertDialog.setPositiveButton("ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
alertDialog.show();
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment