-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from batshalregmi/UI
UI
- Loading branch information
Showing
5 changed files
with
164 additions
and
7 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
app/src/main/java/com/group3/spotifywrapped/settingsActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.group3.spotifywrapped; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
|
||
import android.app.Dialog; | ||
import android.graphics.Color; | ||
import android.graphics.drawable.ColorDrawable; | ||
import android.os.Bundle; | ||
|
||
import android.view.View; | ||
import android.widget.Button; | ||
import android.widget.TextView; | ||
|
||
public class settingsActivity extends AppCompatActivity { | ||
Dialog myDialog; | ||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
setContentView(R.layout.activity_settings); | ||
myDialog = new Dialog(this); | ||
} | ||
// function that opens the custompopup.xml layout when the user clicks on the "Change Password" button | ||
public void ShowPopup(View v) { | ||
TextView txtclose; | ||
Button btnFollow; | ||
myDialog.setContentView(R.layout.custompopup); | ||
txtclose =(TextView) myDialog.findViewById(R.id.txtclose); | ||
txtclose.setText("X"); | ||
txtclose.setOnClickListener(new View.OnClickListener() { | ||
@Override | ||
public void onClick(View v) { | ||
myDialog.dismiss(); | ||
} | ||
}); | ||
myDialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); | ||
myDialog.show(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<shape android:shape="oval" xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<stroke android:width="2dp" android:color="@color/black"/> | ||
</shape> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="350dp" | ||
android:layout_height="475dp" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:background="#FFFFFF" | ||
android:orientation="vertical" | ||
android:padding="5dp" | ||
android:layout_gravity="center"> | ||
|
||
<TextView | ||
android:id="@+id/txtclose" | ||
android:layout_width="30dp" | ||
android:layout_height="30dp" | ||
android:layout_gravity="end" | ||
android:background="@drawable/circlebackground" | ||
android:gravity="center" | ||
android:text="X" | ||
android:textColor="@color/black" | ||
android:textStyle="bold" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<LinearLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal" | ||
android:orientation="vertical" | ||
android:padding="24dp" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<TextView | ||
android:id="@+id/loginText" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:text="Change Password" | ||
android:textAlignment="center" | ||
android:textColor="@color/green" | ||
android:textSize="30sp" | ||
android:textStyle="bold" /> | ||
|
||
<com.google.android.material.textfield.TextInputLayout | ||
android:id="@+id/passwordParent" | ||
android:layout_width="350dp" | ||
android:layout_height="wrap_content" | ||
android:layout_marginTop="15dp" | ||
android:textColor="@color/black" | ||
app:cursorColor="@color/purple" | ||
app:hintEnabled="false" | ||
app:passwordToggleEnabled="true" | ||
app:passwordToggleTint="@color/green"> | ||
|
||
<com.google.android.material.textfield.TextInputEditText | ||
android:id="@+id/newPassword" | ||
android:layout_width="290dp" | ||
android:layout_height="50dp" | ||
android:background="@drawable/custom_edittext" | ||
android:defaultFocusHighlightEnabled="false" | ||
android:hint="New Password" | ||
android:inputType="textPassword" | ||
android:padding="8dp" | ||
app:hintAnimationEnabled="false" /> | ||
</com.google.android.material.textfield.TextInputLayout> | ||
|
||
<Button | ||
android:id="@+id/loginButton" | ||
android:layout_width="match_parent" | ||
android:layout_height="60dp" | ||
android:layout_marginTop="30dp" | ||
android:backgroundTint="@color/green" | ||
android:text="Submit" | ||
android:textSize="18sp" | ||
app:cornerRadius="20dp" /> | ||
</LinearLayout> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters