Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
android:supportsRtl="true"
android:theme="@style/Theme.SyncVision"
tools:targetApi="31">
<activity
android:name=".Sign_UpActivity"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>

</manifest>
74 changes: 74 additions & 0 deletions app/src/main/java/com/example/syncvision/Sign_UpActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package com.example.syncvision;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.util.Log;
import android.widget.Switch;
import android.widget.Toast;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.view.ViewCompat;
import androidx.core.graphics.Insets;
import androidx.core.view.WindowInsetsCompat;

public class Sign_UpActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_sign_up);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
return insets;
});

// Find the Switch in your layout
@SuppressLint("UseSwitchCompatOrMaterialCode") Switch themeSwitch = findViewById(R.id.switcher);

// Set listener to handle theme change
themeSwitch.setOnCheckedChangeListener((buttonView, isChecked) -> {
if (isChecked) {
// Dark theme
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
} else {
// Light theme
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
}
recreate(); // Recreate activity to apply the new theme
});
}

protected void onStart() {
super.onStart();
Log.i("LogName", "On start Activity Started");
Toast.makeText(this, "on start Activity Started", Toast.LENGTH_LONG).show();
}

protected void onResume() {
super.onResume();
Log.i("LogName", "On Resume Activity Started");
Toast.makeText(this, "on Resume Activity Started", Toast.LENGTH_LONG).show();
}

protected void onPause() {
super.onPause();
Log.i("LogName", "On pause Activity Started");
Toast.makeText(this, "on pause Activity Started", Toast.LENGTH_LONG).show();
}

protected void onStop() {
super.onStop();
Log.i("LogName", "On stop Activity Started");
Toast.makeText(this, "on stop Activity Started", Toast.LENGTH_LONG).show();
}

protected void onDestroy() {
super.onDestroy();
Log.i("LogName", "On destroy Activity Started");
Toast.makeText(this, "on destroy Activity Started", Toast.LENGTH_LONG).show();
}
}
158 changes: 158 additions & 0 deletions app/src/main/res/layout/activity_sign_up.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<?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:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".Sign_UpActivity">

<TextView
android:id="@+id/textView2"
android:layout_width="250dp"
android:layout_height="50dp"
android:autofillHints="@string/username"
android:text="@string/Sign_Up"
android:textColor="@color/black"
android:textSize="35sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.844"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.109" />

<EditText
android:id="@+id/editTextText"
style="@style/Input"
android:layout_width="250dp"
android:layout_height="52dp"
android:autofillHints="@string/username"
android:ems="10"
android:hint="@string/username"
android:inputType="text"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.496"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2"
app:layout_constraintVertical_bias="0.168" />

<TextView
android:id="@+id/textView3"
android:layout_width="238dp"
android:layout_height="32dp"
android:letterSpacing="0.1"
android:text="@string/create_an_account"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.583"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textView2"
app:layout_constraintVertical_bias="0.044" />

<EditText
android:id="@+id/editTextTextEmailAddress"
style="@style/Input"
android:layout_width="250dp"
android:layout_height="52dp"
android:autofillHints="Email Address"
android:ems="10"
android:hint="@string/email_address"
android:inputType="textEmailAddress"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.496"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextText"
app:layout_constraintVertical_bias="0.071" />

<EditText
android:id="@+id/editTextTextPassword3"
style="@style/Input"
android:layout_width="250dp"
android:layout_height="52dp"
android:layout_marginBottom="56dp"
android:ems="10"
android:hint="@string/password"
android:inputType="textPassword"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.472"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextEmailAddress"
app:layout_constraintVertical_bias="0.09" />

<EditText
android:id="@+id/editTextTextPassword4"
style="@style/Input"
android:layout_width="250dp"
android:layout_height="52dp"
android:ems="10"
android:hint="@string/confirm_password"
android:inputType="textPassword"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.496"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword3"
app:layout_constraintVertical_bias="0.133" />

<Button
android:id="@+id/button2"
android:layout_width="131dp"
android:layout_height="60dp"
android:text="@string/Sign_Up"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.485"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword4"
app:layout_constraintVertical_bias="0.269" />

<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="4dp"
android:text="@string/already_have_an_account"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.33"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button2"
app:layout_constraintVertical_bias="0.231" />

<TextView
android:id="@+id/textView6"
android:layout_width="77dp"
android:layout_height="30dp"
android:layout_marginBottom="36dp"
android:text="@string/log_in"
android:textColor="@color/purple_500"
android:textSize="21sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.799"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/button2"
app:layout_constraintVertical_bias="0.265" />

<Switch
android:id="@+id/switcher"
android:layout_width="69dp"
android:layout_height="50dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.02"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.052"
tools:ignore="UseSwitchCompatOrMaterialXml" />

</androidx.constraintlayout.widget.ConstraintLayout>
9 changes: 9 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,13 @@
<string name="sign_in">Sign In</string>
<string name="don_t_have_an_account">Don`t have an account?</string>
<string name="let_s_register">Let`s Register</string>
<string name="Sign_Up">Sign Up</string>
<string name="username">Username</string>
<string name="create_an_account">Create an account</string>
<string name="email_address">Email Address</string>
<string name="password">Password</string>
<string name="confirm_password">Confirm Password</string>
<string name="already_have_an_account">Already have an account?</string>
<string name="log_in">Log In</string>
<string name="dark_mode">Dark Mode</string>
</resources>
15 changes: 15 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,23 @@
<style name="Input">
<item name="android:paddingVertical">15dp</item>
<item name="android:paddingHorizontal">10dp</item>
<item name="android:radius">20dp</item>

<item name="android:background">@drawable/round_grey</item>
<item name="android:layout_marginHorizontal">30dp</item>
<item name="android:drawablePadding">5dp</item>
</style>

<!-- Light Theme -->
<style name="AppTheme.Light" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:textColor">#000000</item> <!-- Black text color -->
</style>

<!-- Dark Theme -->
<style name="AppTheme.Dark" parent="Theme.AppCompat.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:textColor">#FFFFFF</item> <!-- White text color -->
</style>

</resources>