added all pages, using premade components

This commit is contained in:
IvanaE 2018-10-04 13:23:53 -04:00
parent 5a97ad2ec8
commit 036c03f07e
18 changed files with 154 additions and 56 deletions

View file

@ -25,7 +25,7 @@
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View file

@ -26,4 +26,8 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.jaredrummler:material-spinner:1.2.5'
implementation 'com.android.support:design:28.0.0-alpha3'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
}

View file

@ -14,6 +14,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".Main"
android:label="@string/app_name">
@ -28,7 +29,13 @@
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
<activity android:name=".SignUp"></activity>
<activity android:name=".SignUp" android:parentActivityName=".Main">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".Main" />
</activity>
<activity android:name=".LogIn" />
<activity android:name=".Welcome"/>
</application>
</manifest>

View file

@ -0,0 +1,13 @@
package com.uottawa.olympus.olympusservices;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class LogIn extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_log_in);
}
}

View file

@ -2,6 +2,8 @@ package com.uottawa.olympus.olympusservices;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.content.Intent;
import android.view.View;
public class Main extends AppCompatActivity {
@ -9,5 +11,7 @@ public class Main extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}

View file

@ -2,13 +2,22 @@ package com.uottawa.olympus.olympusservices;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import com.jaredrummler.materialspinner.MaterialSpinner;
import android.support.design.widget.Snackbar;
public class SignUp extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign_up);
MaterialSpinner spinner = findViewById(R.id.RoleInput);
spinner.setItems("Ice Cream Sandwich", "Jelly Bean", "KitKat", "Lollipop", "Marshmallow");
spinner.setOnItemSelectedListener(new MaterialSpinner.OnItemSelectedListener<String>() {
@Override public void onItemSelected(MaterialSpinner view, int position, long id, String item) {
Snackbar.make(view, "Clicked " + item, Snackbar.LENGTH_LONG).show();
}
});
}
public static void main(String[] args){

View file

@ -0,0 +1,13 @@
package com.uottawa.olympus.olympusservices;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
public class Welcome extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_welcome);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 MiB

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:gravity="center_horizontal"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/background"
tools:context=".LogIn">
</LinearLayout>

View file

@ -16,16 +16,17 @@
<TextView
android:id="@+id/Title"
android:layout_width="300dp"
android:layout_height="50dp"
android:layout_height="wrap_content"
android:layout_marginBottom="100dp"
android:gravity="center"
android:text="@string/CompanyName"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="@android:color/white"
android:textSize="36sp"
android:gravity="center"
app:fontFamily="@font/julius_sans_one" />
<Button
android:theme="@style/AppTheme.Button"
android:id="@+id/SignUp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -33,6 +34,7 @@
android:text="@string/signup" />
<Button
android:theme="@style/AppTheme.Button"
android:id="@+id/LogIn"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -17,7 +17,7 @@
android:id="@+id/Title"
android:layout_width="300dp"
android:layout_height="50dp"
android:layout_marginBottom="80dp"
android:layout_marginBottom="40dp"
android:gravity="center"
android:text="@string/signup"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
@ -25,52 +25,69 @@
android:textSize="36sp"
app:fontFamily="@font/julius_sans_one" />
<Spinner
android:id="@+id/RolesInput"
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="72dp"
android:layout_marginBottom="50dp"
android:background="@drawable/customborder"
android:entries="@array/roles"
android:textColor="@android:color/white"
android:textSize="15sp"
android:theme="@android:style/TextAppearance.DeviceDefault.Widget.DropDownItem"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="108dp" />
android:layout_height="wrap_content"
android:textSize="20sp"
android:text="Role" />
<android.support.design.widget.TextInputLayout
<com.jaredrummler.materialspinner.MaterialSpinner
android:id="@+id/RoleInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp" />
<com.rengwuxian.materialedittext.MaterialEditText
android:id="@+id/UsernameInput"
android:layout_width="match_parent"
android:layout_height="81dp"
android:layout_marginBottom="50dp"
android:background="@drawable/customborder"
android:theme="@android:style/TextAppearance.DeviceDefault.Widget.EditText">
android:layout_height="wrap_content"
android:hint="Username"
android:textSize="20sp"
app:met_baseColor="@android:color/white"
android:background="@color/colorWhite"
app:met_floatingLabel="highlight"
app:met_primaryColor="?colorAccent"
app:met_singleLineEllipsis="true"/>
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/newusername"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="@android:color/white"
android:textSize="20sp" />
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.TextInputLayout
<com.rengwuxian.materialedittext.MaterialEditText
android:id="@+id/PasswordInput"
android:layout_width="match_parent"
android:layout_height="95dp"
android:background="@drawable/customborder"
android:theme="@android:style/TextAppearance.Holo.Widget.EditText">
android:layout_height="wrap_content"
android:hint="Password"
android:textSize="20sp"
app:met_baseColor="@android:color/white"
app:met_floatingLabel="highlight"
app:met_primaryColor="?colorAccent"
app:met_singleLineEllipsis="true"
android:background="@drawable/customborder"/>
<com.rengwuxian.materialedittext.MaterialEditText
android:id="@+id/FirstNameInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="First Name"
android:textSize="20sp"
app:met_baseColor="@android:color/white"
app:met_floatingLabel="highlight"
app:met_primaryColor="?colorAccent"
app:met_singleLineEllipsis="true"
android:background="@drawable/customborder"/>
<com.rengwuxian.materialedittext.MaterialEditText
android:id="@+id/LastNameInput"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Last Name"
android:textSize="20sp"
app:met_baseColor="@android:color/white"
app:met_floatingLabel="highlight"
app:met_primaryColor="?colorAccent"
app:met_singleLineEllipsis="true"
android:background="@drawable/customborder"/>
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint=""
android:text="@string/newpassword"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textColor="@android:color/white"
android:textSize="20sp" />
</android.support.design.widget.TextInputLayout>
</LinearLayout>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:gravity="center_horizontal"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/background"
tools:context=".Welcome">
</LinearLayout>

View file

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="20sp"
android:gravity="left"
android:textColor="#FF0000"
android:padding="5dip"
/>

View file

@ -3,4 +3,6 @@
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
<color name="colorWhite">#FFFFFF</color>
<color name="colorBlack">#000000</color>
</resources>

View file

@ -8,4 +8,9 @@
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme.Button" parent="Widget.AppCompat.Button.Colored">
<item name="colorButtonNormal">@color/colorWhite</item>
<item name="android:textColor">@color/colorBlack</item>
</style>
</resources>

View file

@ -8,6 +8,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong