mirror of
https://github.com/ClaytonWWilson/Listify.git
synced 2025-12-16 18:48:48 +00:00
Incorporated my original code into that of the new template
This commit is contained in:
parent
cc965fba4a
commit
701f26d361
30
Listify/.idea/jarRepositories.xml
Normal file
30
Listify/.idea/jarRepositories.xml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="MavenRepo" />
|
||||||
|
<option name="name" value="MavenRepo" />
|
||||||
|
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="BintrayJCenter" />
|
||||||
|
<option name="name" value="BintrayJCenter" />
|
||||||
|
<option name="url" value="https://jcenter.bintray.com/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="Google" />
|
||||||
|
<option name="name" value="Google" />
|
||||||
|
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
|||||||
@ -15,10 +15,11 @@
|
|||||||
android:theme="@style/AppTheme.NoActionBar">
|
android:theme="@style/AppTheme.NoActionBar">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
<activity android:name="com.example.listify.ui.SignupPage" />
|
||||||
|
<activity android:name="com.example.listify.ui.LoginPage" />
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@ -1,8 +1,10 @@
|
|||||||
package com.example.listify;
|
package com.example.listify;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||||
import com.google.android.material.snackbar.Snackbar;
|
import com.google.android.material.snackbar.Snackbar;
|
||||||
@ -17,8 +19,8 @@ import androidx.appcompat.app.AppCompatActivity;
|
|||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private AppBarConfiguration mAppBarConfiguration;
|
private AppBarConfiguration mAppBarConfiguration;
|
||||||
|
//private Button toLoginPage;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@ -36,8 +38,6 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
});
|
});
|
||||||
DrawerLayout drawer = findViewById(R.id.drawer_layout);
|
DrawerLayout drawer = findViewById(R.id.drawer_layout);
|
||||||
NavigationView navigationView = findViewById(R.id.nav_view);
|
NavigationView navigationView = findViewById(R.id.nav_view);
|
||||||
// Passing each menu ID as a set of Ids because each
|
|
||||||
// menu should be considered as top level destinations.
|
|
||||||
mAppBarConfiguration = new AppBarConfiguration.Builder(
|
mAppBarConfiguration = new AppBarConfiguration.Builder(
|
||||||
R.id.nav_home, R.id.nav_gallery, R.id.nav_slideshow)
|
R.id.nav_home, R.id.nav_gallery, R.id.nav_slideshow)
|
||||||
.setDrawerLayout(drawer)
|
.setDrawerLayout(drawer)
|
||||||
@ -45,6 +45,15 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
|
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
|
||||||
NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
|
NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration);
|
||||||
NavigationUI.setupWithNavController(navigationView, navController);
|
NavigationUI.setupWithNavController(navigationView, navController);
|
||||||
|
|
||||||
|
/*toLoginPage = (Button) findViewById(R.id.button1);
|
||||||
|
toLoginPage.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(MainActivity.this, com.example.listify.ui.SignupPage.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});*/
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -57,7 +66,6 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onSupportNavigateUp() {
|
public boolean onSupportNavigateUp() {
|
||||||
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
|
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
|
||||||
return NavigationUI.navigateUp(navController, mAppBarConfiguration)
|
return NavigationUI.navigateUp(navController, mAppBarConfiguration) || super.onSupportNavigateUp();
|
||||||
|| super.onSupportNavigateUp();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
package com.example.listify.ui;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
|
import com.example.listify.MainActivity;
|
||||||
|
import com.example.listify.R;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
public class LoginPage extends AppCompatActivity {
|
||||||
|
private Button button;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_login);
|
||||||
|
|
||||||
|
button = (Button) findViewById(R.id.button3);
|
||||||
|
button.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(LoginPage.this, MainActivity.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
package com.example.listify.ui;
|
||||||
|
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
|
||||||
|
import com.example.listify.R;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
public class SignupPage extends AppCompatActivity {
|
||||||
|
private Button button;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_signup);
|
||||||
|
|
||||||
|
button = (Button) findViewById(R.id.button2);
|
||||||
|
button.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
Intent intent = new Intent(SignupPage.this, com.example.listify.ui.LoginPage.class);
|
||||||
|
startActivity(intent);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Listify/app/src/main/res/drawable/lisitfy_logo.png
Normal file
BIN
Listify/app/src/main/res/drawable/lisitfy_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
63
Listify/app/src/main/res/layout/activity_login.xml
Normal file
63
Listify/app/src/main/res/layout/activity_login.xml
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<?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:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context="com.example.listify.ui.LoginPage">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:text="Log in"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/editTextTextPersonName"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_marginRight="8dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="Username or email"
|
||||||
|
android:inputType="textPersonName"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/textView3"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView3" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/editTextTextPassword"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="Password"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/editTextTextPersonName"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="14dp"
|
||||||
|
android:text="Log in"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/textView3"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="324dp"
|
||||||
|
android:text="New to Listify? Click here to sign up."
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
@ -21,4 +21,5 @@
|
|||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
app:headerLayout="@layout/nav_header_main"
|
app:headerLayout="@layout/nav_header_main"
|
||||||
app:menu="@menu/activity_main_drawer" />
|
app:menu="@menu/activity_main_drawer" />
|
||||||
|
|
||||||
</androidx.drawerlayout.widget.DrawerLayout>
|
</androidx.drawerlayout.widget.DrawerLayout>
|
||||||
79
Listify/app/src/main/res/layout/activity_signup.xml
Normal file
79
Listify/app/src/main/res/layout/activity_signup.xml
Normal file
@ -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:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context="com.example.listify.ui.SignupPage">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/button2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:text="Sign up"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/editTextTextPassword" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/editTextTextPersonName"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginLeft="32dp"
|
||||||
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="Email"
|
||||||
|
android:inputType="textPersonName"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/textView3"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/textView3" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/editTextTextEmailAddress"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="Username"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/editTextTextPersonName"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/editTextTextPersonName" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/editTextTextPassword"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="Password"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/editTextTextEmailAddress"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/editTextTextEmailAddress" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:layout_marginEnd="86dp"
|
||||||
|
android:layout_marginLeft="86dp"
|
||||||
|
android:layout_marginRight="86dp"
|
||||||
|
android:layout_marginStart="86dp"
|
||||||
|
android:text="Sign up"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/textView3"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/textView3"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/editTextTextPersonName" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="324dp"
|
||||||
|
android:text="Already have an account? Click here to log in."
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
24
Listify/app/src/main/res/layout/activity_splashscreen.xml
Normal file
24
Listify/app/src/main/res/layout/activity_splashscreen.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?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:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#C3C3C3"
|
||||||
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/imageView"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="189dp"
|
||||||
|
android:layout_marginEnd="36dp"
|
||||||
|
android:layout_marginLeft="36dp"
|
||||||
|
android:layout_marginRight="36dp"
|
||||||
|
android:layout_marginStart="36dp"
|
||||||
|
android:src="@drawable/lisitfy_logo"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
Loading…
Reference in New Issue
Block a user