Skip to content

Commit

Permalink
Worked on the UI of donor's login page
Browse files Browse the repository at this point in the history
  • Loading branch information
1HazArd1 committed Jan 17, 2022
1 parent 1df36b1 commit 74d9d34
Show file tree
Hide file tree
Showing 13 changed files with 248 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .idea/misc.xml

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

24 changes: 24 additions & 0 deletions app/src/main/res/drawable/facebook_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="48dp"
android:height="48dp"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:pathData="M24,4C12.954,4 4,12.954 4,24s8.954,20 20,20s20,-8.954 20,-20S35.046,4 24,4z">
<aapt:attr name="android:fillColor">
<gradient
android:startY="9.993"
android:startX="9.993"
android:endY="40.615"
android:endX="40.615"
android:type="linear">
<item android:offset="0" android:color="#FF2AA4F4"/>
<item android:offset="1" android:color="#FF007AD9"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M26.707,29.301h5.176l0.813,-5.258h-5.989v-2.874c0,-2.184 0.714,-4.121 2.757,-4.121h3.283V12.46c-0.577,-0.078 -1.797,-0.248 -4.102,-0.248c-4.814,0 -7.636,2.542 -7.636,8.334v3.498H16.06v5.258h4.948v14.452C21.988,43.9 22.981,44 24,44c0.921,0 1.82,-0.084 2.707,-0.204V29.301z"
android:fillColor="#fff"/>
</vector>
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/google_logo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<vector android:height="51.1666dp" android:viewportHeight="262"
android:viewportWidth="256" android:width="50dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#4285F4" android:pathData="M255.878,133.451c0,-10.734 -0.871,-18.567 -2.756,-26.69H130.55v48.448h71.947c-1.45,12.04 -9.283,30.172 -26.69,42.356l-0.244,1.622 38.755,30.023 2.685,0.268c24.659,-22.774 38.875,-56.282 38.875,-96.027"/>
<path android:fillColor="#34A853" android:pathData="M130.55,261.1c35.248,0 64.839,-11.605 86.453,-31.622l-41.196,-31.913c-11.024,7.688 -25.82,13.055 -45.257,13.055 -34.523,0 -63.824,-22.773 -74.269,-54.25l-1.531,0.13 -40.298,31.187 -0.527,1.465C35.393,231.798 79.49,261.1 130.55,261.1"/>
<path android:fillColor="#FBBC05" android:pathData="M56.281,156.37c-2.756,-8.123 -4.351,-16.827 -4.351,-25.82 0,-8.994 1.595,-17.697 4.206,-25.82l-0.073,-1.73L15.26,71.312l-1.335,0.635C5.077,89.644 0,109.517 0,130.55s5.077,40.905 13.925,58.602l42.356,-32.782"/>
<path android:fillColor="#EB4335" android:pathData="M130.55,50.479c24.514,0 41.05,10.589 50.479,19.438l36.844,-35.974C195.245,12.91 165.798,0 130.55,0 79.49,0 35.393,29.301 13.925,71.947l42.211,32.783c10.59,-31.477 39.891,-54.251 74.414,-54.251"/>
</vector>
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/login_button.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="20dp"/>
<solid android:color="@color/yellow"/>
</shape>
9 changes: 9 additions & 0 deletions app/src/main/res/drawable/twitter_icon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="480dp"
android:height="480dp"
android:viewportWidth="48"
android:viewportHeight="48">
<path
android:pathData="M42,12.429c-1.323,0.586 -2.746,0.977 -4.247,1.162c1.526,-0.906 2.7,-2.351 3.251,-4.058c-1.428,0.837 -3.01,1.452 -4.693,1.776C34.967,9.884 33.05,9 30.926,9c-4.08,0 -7.387,3.278 -7.387,7.32c0,0.572 0.067,1.129 0.193,1.67c-6.138,-0.308 -11.582,-3.226 -15.224,-7.654c-0.64,1.082 -1,2.349 -1,3.686c0,2.541 1.301,4.778 3.285,6.096c-1.211,-0.037 -2.351,-0.374 -3.349,-0.914c0,0.022 0,0.055 0,0.086c0,3.551 2.547,6.508 5.923,7.181c-0.617,0.169 -1.269,0.263 -1.941,0.263c-0.477,0 -0.942,-0.054 -1.392,-0.135c0.94,2.902 3.667,5.023 6.898,5.086c-2.528,1.96 -5.712,3.134 -9.174,3.134c-0.598,0 -1.183,-0.034 -1.761,-0.104C9.268,36.786 13.152,38 17.321,38c13.585,0 21.017,-11.156 21.017,-20.834c0,-0.317 -0.01,-0.633 -0.025,-0.945C39.763,15.197 41.013,13.905 42,12.429"
android:fillColor="#03A9F4"/>
</vector>
7 changes: 7 additions & 0 deletions app/src/main/res/font/bungee.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<font-family xmlns:app="http://schemas.android.com/apk/res-auto"
app:fontProviderAuthority="com.google.android.gms.fonts"
app:fontProviderPackage="com.google.android.gms"
app:fontProviderQuery="Bungee"
app:fontProviderCerts="@array/com_google_android_gms_fonts_certs">
</font-family>
184 changes: 182 additions & 2 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,187 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<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"
tools:context=".MainActivity"/>
android:orientation="vertical"
android:background="@color/white"
android:padding="20dp"
tools:context=".MainActivity">

<!--Image/logo here needed to be added-->
<ImageView
android:id="@+id/loginImage"
android:layout_width="100dp"
android:layout_height="100dp"
android:src="@drawable/ic_launcher_foreground" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/bungee"
android:text="Hello There, Welcome Back"
android:textColor="@color/black"
android:textSize="30sp" />

<!--TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="monospace"
android:text="@string/userLoginQuote"
android:textColor="@color/black"
android:textSize="15sp" /-->

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="monospace"
android:text="Sign In to Continue"
android:textColor="@color/black"
android:textSize="18sp" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:orientation="vertical">

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/donor_username"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:hint="Username"
android:layout_height="wrap_content">

<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black" />

</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/donor_password"
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Password"
app:passwordToggleEnabled="true">

<com.google.android.material.textfield.TextInputEditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPassword"
android:textColor="@color/black" />

</com.google.android.material.textfield.TextInputLayout>

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:background="#00000000"
android:elevation="0dp"
android:fontFamily="monospace"
android:text="Forgot Password?"
android:layout_margin="5dp"
android:textAllCaps="false"
android:textColor="@color/black" />
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:text="Login"
android:background="@drawable/login_button"
android:elevation="35dp"
android:textStyle="bold"
android:textSize="16sp"/>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_marginTop="8dp">

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/donor_google"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:backgroundTint="@color/white"
android:elevation="35dp"
android:contentDescription="Login using google"
android:src="@drawable/google_logo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/donor_facebook"
app:layout_constraintHorizontal_bias="0.705"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/donor_facebook"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:backgroundTint="@color/white"
android:elevation="35dp"
android:contentDescription="Login using facebook"
android:src="@drawable/facebook_icon"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/donor_twitter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:backgroundTint="@color/white"
android:elevation="35dp"
android:contentDescription="Login using twitter"
android:src="@drawable/twitter_icon"
app:layout_constraintHorizontal_bias="0.295"
app:layout_constraintBottom_toBottomOf="@+id/donor_google"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/donor_facebook"
app:layout_constraintTop_toTopOf="@+id/donor_google" />

</androidx.constraintlayout.widget.ConstraintLayout>


<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="#00000000"
android:elevation="0dp"
android:fontFamily="monospace"
android:layout_gravity="right"
android:text="Sign up"
android:layout_margin="5dp"
android:textAllCaps="false"
android:textColor="@color/black" />

<Button
android:layout_width="wrap_content"
android:layout_height="50dp"
android:layout_gravity="right"
android:layout_margin="5dp"
android:background="#00000000"
android:elevation="0dp"
android:fontFamily="monospace"
android:minHeight="48dp"
android:text="Login as NGO"
android:textAllCaps="false"
android:textColor="@color/black" />

<!--com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="@color/white"
android:elevation="35dp"
android:layout_gravity="center"
/-->

</LinearLayout>
</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Samarpan" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<style name="Theme.Samarpan" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_200</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="peach">#E8977D</color>
<color name="yellow">#FFFF00</color>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/preloaded_fonts.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<array name="preloaded_fonts" translatable="false">
<item>@font/bungee</item>
<item>@font/zeyada</item>
</array>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<resources>
<string name="app_name">Samarpan</string>
<string name="userLoginQuote">You would be the sunshine to someone\'s gray skies</string>
</resources>
7 changes: 3 additions & 4 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.Samarpan" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<style name="Theme.Samarpan" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimary">@color/yellow</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
Expand All @@ -16,6 +16,5 @@

<!--style name="splashScreenTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="android:windowBackground">@drawable/splash_image</item>
</style--><!--Remove the comment tag for this splash screen theme to add the logic of the splash screen-->

</style-->
</resources>
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.3"
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0"

// NOTE: Do not place your application dependencies here; they belong
Expand Down

0 comments on commit 74d9d34

Please sign in to comment.