Final
This commit is contained in:
parent
fc7fb5bd88
commit
9c001d1943
@ -1,6 +1,5 @@
|
|||||||
package com.example.coen390_assignment2.Controllers;
|
package com.example.coen390_assignment2.Controllers;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
@ -21,7 +20,6 @@ import java.util.List;
|
|||||||
|
|
||||||
public class AccessDBHelper extends SQLiteOpenHelper {
|
public class AccessDBHelper extends SQLiteOpenHelper {
|
||||||
private static final int DATABASE_VERSION = 1;
|
private static final int DATABASE_VERSION = 1;
|
||||||
private Context context = null;
|
|
||||||
|
|
||||||
public AccessDBHelper(@Nullable Context context) {
|
public AccessDBHelper(@Nullable Context context) {
|
||||||
super(context, AccessContract.AccessEntry.DATABASE_NAME, null, DATABASE_VERSION);
|
super(context, AccessContract.AccessEntry.DATABASE_NAME, null, DATABASE_VERSION);
|
||||||
@ -46,7 +44,7 @@ public class AccessDBHelper extends SQLiteOpenHelper {
|
|||||||
onCreate(db);
|
onCreate(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
public long insertAccess(Access access, Context context) {
|
public void insertAccess(Access access, Context context) {
|
||||||
long id = -1;
|
long id = -1;
|
||||||
SQLiteDatabase db = this.getWritableDatabase();
|
SQLiteDatabase db = this.getWritableDatabase();
|
||||||
ContentValues contentValues = new ContentValues();
|
ContentValues contentValues = new ContentValues();
|
||||||
@ -62,7 +60,6 @@ public class AccessDBHelper extends SQLiteOpenHelper {
|
|||||||
} finally {
|
} finally {
|
||||||
db.close();
|
db.close();
|
||||||
}
|
}
|
||||||
return id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Access> getAccessFromProfileID(long profileID, Context context) {
|
public List<Access> getAccessFromProfileID(long profileID, Context context) {
|
||||||
|
@ -9,7 +9,6 @@ import android.database.sqlite.SQLiteOpenHelper;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.example.coen390_assignment2.Models.StudentProfile;
|
import com.example.coen390_assignment2.Models.StudentProfile;
|
||||||
@ -22,7 +21,6 @@ import java.util.List;
|
|||||||
|
|
||||||
public class StudentProfileDBHelper extends SQLiteOpenHelper {
|
public class StudentProfileDBHelper extends SQLiteOpenHelper {
|
||||||
private static final int DATABASE_VERSION = 1;
|
private static final int DATABASE_VERSION = 1;
|
||||||
private Context context = null;
|
|
||||||
|
|
||||||
public StudentProfileDBHelper(@Nullable Context context) {
|
public StudentProfileDBHelper(@Nullable Context context) {
|
||||||
super(context, StudentProfileContract.StudentProfileEntry.DATABASE_NAME, null, DATABASE_VERSION);
|
super(context, StudentProfileContract.StudentProfileEntry.DATABASE_NAME, null, DATABASE_VERSION);
|
||||||
@ -44,7 +42,7 @@ public class StudentProfileDBHelper extends SQLiteOpenHelper {
|
|||||||
onCreate(db);
|
onCreate(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
public long insertStudentProfile(StudentProfile studentProfile, Context context) {
|
public void insertStudentProfile(StudentProfile studentProfile, Context context) {
|
||||||
long id = -1;
|
long id = -1;
|
||||||
SQLiteDatabase db = this.getWritableDatabase();
|
SQLiteDatabase db = this.getWritableDatabase();
|
||||||
ContentValues contentValues = new ContentValues();
|
ContentValues contentValues = new ContentValues();
|
||||||
@ -65,7 +63,6 @@ public class StudentProfileDBHelper extends SQLiteOpenHelper {
|
|||||||
} finally {
|
} finally {
|
||||||
db.close();
|
db.close();
|
||||||
}
|
}
|
||||||
return id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<StudentProfile> getAllStudentProfile(Context context) {
|
public List<StudentProfile> getAllStudentProfile(Context context) {
|
||||||
@ -98,4 +95,21 @@ public class StudentProfileDBHelper extends SQLiteOpenHelper {
|
|||||||
}
|
}
|
||||||
return studentProfiles;
|
return studentProfiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void deleteProfile(long profileID, Context context) {
|
||||||
|
SQLiteDatabase db = this.getWritableDatabase();
|
||||||
|
|
||||||
|
try{
|
||||||
|
// Define the WHERE clause with the ProfileID
|
||||||
|
String whereClause = "profile_id = ?";
|
||||||
|
String[] whereArgs = { String.valueOf(profileID) };
|
||||||
|
|
||||||
|
// Execute the DELETE statement
|
||||||
|
db.delete("Profile", whereClause, whereArgs);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Toast.makeText(context, "Error deleting Student Profile", Toast.LENGTH_SHORT).show();
|
||||||
|
} finally {
|
||||||
|
db.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,8 +24,6 @@ public class InsertProfileDialogFragment extends DialogFragment {
|
|||||||
|
|
||||||
private EditText profile_surname_edit_text, profile_name_edit_text, profile_ID_edit_text, profile_GPA_edit_text;
|
private EditText profile_surname_edit_text, profile_name_edit_text, profile_ID_edit_text, profile_GPA_edit_text;
|
||||||
|
|
||||||
private Button cancelButton, saveButton;
|
|
||||||
|
|
||||||
public InsertProfileDialogFragment() {
|
public InsertProfileDialogFragment() {
|
||||||
// Required empty public constructor
|
// Required empty public constructor
|
||||||
}
|
}
|
||||||
@ -41,8 +39,8 @@ public class InsertProfileDialogFragment extends DialogFragment {
|
|||||||
profile_ID_edit_text = view.findViewById(R.id.profile_ID_edit_text);
|
profile_ID_edit_text = view.findViewById(R.id.profile_ID_edit_text);
|
||||||
profile_GPA_edit_text = view.findViewById(R.id.profile_GPA_edit_text);
|
profile_GPA_edit_text = view.findViewById(R.id.profile_GPA_edit_text);
|
||||||
|
|
||||||
cancelButton = view.findViewById(R.id.cancelButton);
|
Button cancelButton = view.findViewById(R.id.cancelButton);
|
||||||
saveButton = view.findViewById(R.id.saveButton);
|
Button saveButton = view.findViewById(R.id.saveButton);
|
||||||
|
|
||||||
cancelButton.setOnClickListener(new View.OnClickListener() {
|
cancelButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package com.example.coen390_assignment2.Views;
|
package com.example.coen390_assignment2.Views;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
@ -10,7 +9,6 @@ import android.widget.AdapterView;
|
|||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
@ -72,14 +70,14 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
printStudentProfileList();
|
printStudentProfileList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void printStudentProfileList(){
|
private void printStudentProfileList() {
|
||||||
List<StudentProfile> studentProfiles = studentProfileDBHelper.getAllStudentProfile(getApplicationContext());
|
List<StudentProfile> studentProfiles = studentProfileDBHelper.getAllStudentProfile(getApplicationContext());
|
||||||
|
|
||||||
// by default sort by surname
|
// by default sort by surname
|
||||||
ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, showStudentProfileList(studentProfiles, profileNameDisplayMode));
|
ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, showStudentProfileList(studentProfiles, profileNameDisplayMode));
|
||||||
|
|
||||||
// set tool bar subtitle text
|
// set tool bar subtitle text
|
||||||
toolbar.setSubtitle(studentProfiles.size() + " Profiles, by " + (profileNameDisplayMode ? "Surname" : "ID") );
|
toolbar.setSubtitle(studentProfiles.size() + " Profiles, by " + (profileNameDisplayMode ? "Surname" : "ID"));
|
||||||
|
|
||||||
studentProfileList.setAdapter(adapter);
|
studentProfileList.setAdapter(adapter);
|
||||||
|
|
||||||
@ -118,9 +116,9 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onPrepareOptionsMenu(Menu menu) {
|
public boolean onPrepareOptionsMenu(Menu menu) {
|
||||||
// toggle to the next mode
|
// toggle to the next mode
|
||||||
if (profileNameDisplayMode){
|
if (profileNameDisplayMode) {
|
||||||
toggle.setTitle("By ID");
|
toggle.setTitle("By ID");
|
||||||
} else{
|
} else {
|
||||||
toggle.setTitle("By Surname");
|
toggle.setTitle("By Surname");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -135,7 +133,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
profileNameDisplayMode = false;
|
profileNameDisplayMode = false;
|
||||||
printStudentProfileList();
|
printStudentProfileList();
|
||||||
return false;
|
return false;
|
||||||
} else if (id == R.id.toggle_profiles_display_mode && toggle.getTitle() == "By Surname"){
|
} else if (id == R.id.toggle_profiles_display_mode && toggle.getTitle() == "By Surname") {
|
||||||
profileNameDisplayMode = true;
|
profileNameDisplayMode = true;
|
||||||
printStudentProfileList();
|
printStudentProfileList();
|
||||||
return false;
|
return false;
|
||||||
@ -143,7 +141,8 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
protected String[] showStudentProfileList(List<StudentProfile> studentProfiles, boolean profileNameDisplayMode){
|
|
||||||
|
protected String[] showStudentProfileList(List<StudentProfile> studentProfiles, boolean profileNameDisplayMode) {
|
||||||
// Create a new list for sorted profiles
|
// Create a new list for sorted profiles
|
||||||
List<StudentProfile> sortedProfiles = new ArrayList<>(studentProfiles);
|
List<StudentProfile> sortedProfiles = new ArrayList<>(studentProfiles);
|
||||||
|
|
||||||
@ -151,7 +150,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
String[] profileListToString = new String[sortedProfiles.size()];
|
String[] profileListToString = new String[sortedProfiles.size()];
|
||||||
|
|
||||||
// sort by surname
|
// sort by surname
|
||||||
if (profileNameDisplayMode){
|
if (profileNameDisplayMode) {
|
||||||
// Sort the new list based on the "surname" field
|
// Sort the new list based on the "surname" field
|
||||||
sortedProfiles.sort(new StudentProfileSurnameComparator());
|
sortedProfiles.sort(new StudentProfileSurnameComparator());
|
||||||
|
|
||||||
@ -187,7 +186,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void createAccessOpened(long profileID, AccessType accessType, LocalDateTime timestamp){
|
protected void createAccessOpened(long profileID, AccessType accessType, LocalDateTime timestamp) {
|
||||||
Access access = new Access(profileID, accessType, timestamp);
|
Access access = new Access(profileID, accessType, timestamp);
|
||||||
accessDBHelper.insertAccess(access, getApplicationContext());
|
accessDBHelper.insertAccess(access, getApplicationContext());
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import android.content.Intent;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
@ -15,6 +16,7 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
|
|
||||||
import com.example.coen390_assignment2.Controllers.AccessDBHelper;
|
import com.example.coen390_assignment2.Controllers.AccessDBHelper;
|
||||||
|
import com.example.coen390_assignment2.Controllers.StudentProfileDBHelper;
|
||||||
import com.example.coen390_assignment2.Models.Access;
|
import com.example.coen390_assignment2.Models.Access;
|
||||||
import com.example.coen390_assignment2.Models.AccessType;
|
import com.example.coen390_assignment2.Models.AccessType;
|
||||||
import com.example.coen390_assignment2.R;
|
import com.example.coen390_assignment2.R;
|
||||||
@ -34,7 +36,9 @@ public class ProfileActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
protected TextView surnameTextView, nameTextView, IDTextView, GPATextView, ProfileCreatedTextView;
|
protected TextView surnameTextView, nameTextView, IDTextView, GPATextView, ProfileCreatedTextView;
|
||||||
|
|
||||||
protected AccessDBHelper dbHelper;
|
protected AccessDBHelper accessDBHelper;
|
||||||
|
|
||||||
|
protected StudentProfileDBHelper studentProfileDBHelper;
|
||||||
|
|
||||||
protected Toolbar toolbar;
|
protected Toolbar toolbar;
|
||||||
|
|
||||||
@ -46,7 +50,8 @@ public class ProfileActivity extends AppCompatActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_profile);
|
setContentView(R.layout.activity_profile);
|
||||||
|
|
||||||
dbHelper = new AccessDBHelper(getApplicationContext());
|
accessDBHelper = new AccessDBHelper(getApplicationContext());
|
||||||
|
studentProfileDBHelper = new StudentProfileDBHelper(getApplicationContext());
|
||||||
|
|
||||||
surnameTextView = findViewById(R.id.surnameTextView);
|
surnameTextView = findViewById(R.id.surnameTextView);
|
||||||
nameTextView = findViewById(R.id.nameTextView);
|
nameTextView = findViewById(R.id.nameTextView);
|
||||||
@ -55,7 +60,7 @@ public class ProfileActivity extends AppCompatActivity {
|
|||||||
ProfileCreatedTextView = findViewById(R.id.ProfileCreatedTextView);
|
ProfileCreatedTextView = findViewById(R.id.ProfileCreatedTextView);
|
||||||
accessListView = findViewById(R.id.accessListView);
|
accessListView = findViewById(R.id.accessListView);
|
||||||
|
|
||||||
toolbar = (Toolbar) findViewById(R.id.toolbar);
|
toolbar = findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
@ -65,7 +70,7 @@ public class ProfileActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
public void handleOnBackPressed() {
|
public void handleOnBackPressed() {
|
||||||
Log.d("ProfileActivity", "handleOnBackPressed: Pressed");
|
Log.d("ProfileActivity", "handleOnBackPressed: Pressed");
|
||||||
createAccessClosed(profileId, AccessType.CLOSED, LocalDateTime.now());
|
createAccessClosed(profileId, LocalDateTime.now());
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -82,6 +87,7 @@ public class ProfileActivity extends AppCompatActivity {
|
|||||||
gpa = intent.getFloatExtra("gpa", -1);
|
gpa = intent.getFloatExtra("gpa", -1);
|
||||||
creationDate = intent.getStringExtra("dateCreated");
|
creationDate = intent.getStringExtra("dateCreated");
|
||||||
|
|
||||||
|
// set the text views
|
||||||
surnameTextView.setText(surname);
|
surnameTextView.setText(surname);
|
||||||
nameTextView.setText(name);
|
nameTextView.setText(name);
|
||||||
IDTextView.setText(Long.toString(profileId));
|
IDTextView.setText(Long.toString(profileId));
|
||||||
@ -89,7 +95,7 @@ public class ProfileActivity extends AppCompatActivity {
|
|||||||
ProfileCreatedTextView.setText(creationDate);
|
ProfileCreatedTextView.setText(creationDate);
|
||||||
|
|
||||||
if (profileId != -1 || gpa != -1) {
|
if (profileId != -1 || gpa != -1) {
|
||||||
List<Access> accessList = dbHelper.getAccessFromProfileID(profileId, getApplicationContext());
|
List<Access> accessList = accessDBHelper.getAccessFromProfileID(profileId, getApplicationContext());
|
||||||
|
|
||||||
ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, accessListFromProfileIDToString(accessList));
|
ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, accessListFromProfileIDToString(accessList));
|
||||||
|
|
||||||
@ -99,16 +105,29 @@ public class ProfileActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// handle the case when user pressed on the back (up) button in the action/tool bar
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
int id = item.getItemId();
|
int id = item.getItemId();
|
||||||
if (id == android.R.id.home) {
|
if (id == android.R.id.home) {
|
||||||
createAccessClosed(profileId, AccessType.CLOSED, LocalDateTime.now());
|
createAccessClosed(profileId, LocalDateTime.now());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delete profile and return to Main Activity
|
||||||
|
public void onDeleteProfileButtonClick(View view) {
|
||||||
|
studentProfileDBHelper.deleteProfile(profileId, getApplicationContext());
|
||||||
|
Log.d("ProfileActivity", "onDeleteProfileButtonClick: Deleted profile" + Long.toString(profileId));
|
||||||
|
|
||||||
|
Access access = new Access(profileId, AccessType.DELETED, LocalDateTime.now());
|
||||||
|
accessDBHelper.insertAccess(access, getApplicationContext());
|
||||||
|
Log.d("ProfileActivity", "onDeleteProfileButtonClick: Added access entry DELETE for profile ID: " + Long.toString(profileId));
|
||||||
|
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
protected String[] accessListFromProfileIDToString(List<Access> accessList) {
|
protected String[] accessListFromProfileIDToString(List<Access> accessList) {
|
||||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd @ HH:mm:ss");
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd @ HH:mm:ss");
|
||||||
|
|
||||||
@ -123,8 +142,8 @@ public class ProfileActivity extends AppCompatActivity {
|
|||||||
return formattedAccessStrings.toArray(new String[0]);
|
return formattedAccessStrings.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void createAccessClosed(long profileId, AccessType accessType, LocalDateTime timestamp) {
|
protected void createAccessClosed(long profileId, LocalDateTime timestamp) {
|
||||||
Access access = new Access(profileId, accessType, timestamp);
|
Access access = new Access(profileId, AccessType.CLOSED, timestamp);
|
||||||
dbHelper.insertAccess(access, getApplicationContext());
|
accessDBHelper.insertAccess(access, getApplicationContext());
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@ -12,7 +12,16 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="?attr/actionBarSize"
|
android:layout_height="?attr/actionBarSize"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
android:theme="?attr/actionBarTheme" />
|
android:theme="?attr/actionBarTheme">
|
||||||
|
|
||||||
|
</androidx.appcompat.widget.Toolbar>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_below="@id/toolbar"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/profileText"
|
android:id="@+id/profileText"
|
||||||
@ -158,5 +167,15 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingStart="10dp"
|
android:paddingStart="10dp"
|
||||||
android:paddingEnd="10dp" />
|
android:paddingEnd="10dp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
<Button
|
||||||
|
android:id="@+id/delete_profile_action_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:onClick="onDeleteProfileButtonClick"
|
||||||
|
android:text="@string/delete_profile" />
|
||||||
|
</RelativeLayout>
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:padding="15dp"
|
||||||
tools:context=".Views.InsertProfileDialogFragment">
|
tools:context=".Views.InsertProfileDialogFragment">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
@ -17,4 +17,5 @@
|
|||||||
<string name="cancel">Cancel</string>
|
<string name="cancel">Cancel</string>
|
||||||
<string name="save">Save</string>
|
<string name="save">Save</string>
|
||||||
<string name="access_history">Access History</string>
|
<string name="access_history">Access History</string>
|
||||||
|
<string name="delete_profile">Delete Profile</string>
|
||||||
</resources>
|
</resources>
|
Loading…
x
Reference in New Issue
Block a user