MainActivity- Adding numbers

This is for the main activity
mail@pastecode.io avatar
unknown
java
2 years ago
2.1 kB
1
Indexable
Never
package com.example.cse332mainproject;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;

import android.Manifest;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Address;
import android.location.Geocoder;
import android.location.Location;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;

import java.io.IOException;
import java.util.List;
import java.util.Locale;

import static androidx.constraintlayout.motion.widget.Debug.getLocation;

public class HomepageActivity extends AppCompatActivity implements DialogBox.DialogBoxListener {
    @Override
    public void applyTexts(String username, String password) {

        textViewUsername.setText(username);
        textViewPassword.setText(password);

    }

    private TextView textViewUsername;
    private TextView textViewPassword;
    private Button button;

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

        textViewUsername = (TextView) findViewById(R.id.textview_Username);
        textViewPassword = (TextView) findViewById(R.id.textview_Password);
        button = (Button) findViewById(R.id.button);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                openDialog();
            }
        });
    }

        public void openDialog()
        {
            DialogBox dialogBox = new DialogBox();
            dialogBox.show(getSupportFragmentManager(), "Dialog Box");



        }

        }





    @Override