Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subs dashboard #18

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
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
6 changes: 6 additions & 0 deletions .idea/render.experimental.xml

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

1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ dependencies {
implementation 'com.android.support.constraint:constraint-layout:2.0.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
implementation 'com.google.android.material:material:1.3.0-alpha03'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected void onCreate(Bundle savedInstanceState) {
View view = binding.getRoot();
setContentView(view);

binding.registerOrSignInButton.setOnClickListener(registerOrSignInButtonListener());
binding.registerButton.setOnClickListener(registerOrSignInButtonListener());

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN).requestEmail().build();
mGoogleSignInClient = GoogleSignIn.getClient(this, gso);
Expand Down
82 changes: 57 additions & 25 deletions app/src/main/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,48 +9,52 @@

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/lin_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="200dp"
android:layout_height="320dp"
android:layout_centerInParent="true">


<Button
android:id="@+id/registerOrSignInButton"
android:id="@+id/registerButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/register_or_sign_in_label"
app:layout_constraintEnd_toEndOf="parent"
android:layout_marginTop="8dp"
android:text="@string/register_label"
app:layout_constraintEnd_toStartOf="@+id/signInButton"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/passwordField" />
app:layout_constraintTop_toBottomOf="@+id/passwordContainer" />

<EditText
android:id="@+id/usernameField"
<Button
android:id="@+id/signInButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autofillHints="@string/auto_username_hint"
android:hint="@string/username_hint"
android:inputType="text"
android:maxEms="10"
android:minEms="10"
android:textSize="14sp"
app:layout_constraintBaseline_toBaselineOf="@+id/usernameLabel"
app:layout_constraintEnd_toEndOf="parent" />
android:layout_marginTop="8dp"
android:text="@string/signin_label"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/registerButton"
app:layout_constraintTop_toBottomOf="@+id/passwordContainer" />


<EditText
android:id="@+id/passwordField"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="132dp"
android:autofillHints="otp"
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/passwordContainer"
android:layout_width="186dp"
android:layout_height="58dp"
android:layout_marginBottom="188dp"
android:autofillHints="password"
android:hint="@string/password_hint"
android:inputType="textPassword"
android:maxEms="10"
android:minEms="10"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/passwordField"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<TextView
android:id="@+id/passwordLabel"
Expand All @@ -69,25 +73,53 @@
android:text="@string/username_label"
app:layout_constraintBottom_toTopOf="@+id/passwordField"
app:layout_constraintEnd_toStartOf="@+id/usernameField" />
</com.google.android.material.textfield.TextInputLayout>


<com.google.android.gms.common.SignInButton
android:id="@+id/g_sign_in_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="56dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.506"
app:layout_constraintStart_toStartOf="parent" />

<TextView
android:id="@+id/errorLabel"
android:layout_width="0dp"
android:layout_width="185dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:scrollHorizontally="false"
android:textAlignment="center"
android:textColor="@android:color/holo_red_dark"
app:layout_constraintBottom_toTopOf="@+id/g_sign_in_button"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintHorizontal_bias="0.466"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/g_sign_in_button" />

<com.google.android.material.textfield.TextInputLayout
android:id="@+id/usernameContainer"
android:layout_width="186dp"
android:layout_height="58dp"
android:autofillHints="username"
android:hint="@string/username_hint"
android:inputType="textPersonName"
android:maxEms="10"
android:minEms="10"
android:textSize="14sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/usernameField"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.google.android.material.textfield.TextInputLayout>

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
51 changes: 31 additions & 20 deletions app/src/main/res/layout/activity_ph_no_otp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,56 @@
android:layout_height="fill_parent"
tools:context=".regandlogin.EmailVerifyActivitiy"
android:gravity="center">

android:gravity="center"
tools:context=".regandlogin.EmailVerifyActivitiy">

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="end">
<EditText
android:id="@+id/phnoField"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="1dp"
android:layout_marginBottom="13dp"
android:hint="@string/phno_hint"
android:inputType="phone"
android:maxEms="10"
android:minEms="10"
app:layout_constraintBottom_toTopOf="@+id/otpLabel"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/phnoLabel"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
android:autofillHints="" />

<TextView
android:id="@+id/phnoLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/phno_label" />

<EditText
android:id="@+id/phnoField"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/phno_hint"
android:inputType="phone"
android:maxEms="10"
android:minEms="10" />

</LinearLayout>


<EditText
android:id="@+id/otpField"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/otp_hint"
android:inputType="number"
android:maxEms="10"
android:minEms="10"
app:layout_constraintStart_toStartOf="@+id/phnoField"
app:layout_constraintTop_toBottomOf="@+id/phnoField"
android:autofillHints="" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand All @@ -49,15 +69,6 @@
android:layout_height="wrap_content"
android:text="@string/otp_label" />

<EditText
android:id="@+id/otpField"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="number"
android:hint="@string/otp_hint"
android:maxEms="10"
android:minEms="10" />

</LinearLayout>

<LinearLayout
Expand Down
10 changes: 0 additions & 10 deletions app/src/main/res/values-night/themes.xml

This file was deleted.

8 changes: 8 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,12 @@
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="Gunmetal">#2C3539</color>
<color name="Bittersweet">#FE6F5E</color>
<color name="Medium_turquoise">#48D1CC</color>
<color name="Mountbatten_pink">#997A8D</color>
<color name="Dark_grey">#FF222222</color>
<color name="Light_grey">#FF666666</color>
<color name="Dark_blue">#0F3460</color>
<color name="Dark_bittersweet">#E94560</color>
</resources>
34 changes: 34 additions & 0 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="TextViews" parent="android:Widget.Material.TextView">
<item name="android:textColor">@color/Mountbatten_pink</item>
</style>

<style name="EditTexts" parent="android:Widget.Material.EditText">
<item name="background">@color/Gunmetal</item>
<item name="android:textColor">@color/Bittersweet</item>
<item name="android:textColorHint">@color/Mountbatten_pink</item>
</style>

<style name="Buttons" parent="android:Widget.Material.Button">
<item name="android:textColor">@color/Gunmetal</item>
<item name="backgroundTint">@color/Bittersweet</item>
</style>

<style name="TextViewsDark" parent="android:Widget.Material.TextView">
<item name="android:textColor">@color/Light_grey</item>
</style>

<style name="EditTextsDark" parent="android:Widget.Material.EditText">
<item name="background">@color/Bittersweet</item>
<item name="android:textColor">@color/Dark_bittersweet</item>
<item name="android:textColorHint">@color/Light_grey</item>
</style>

<style name="ButtonsDark" parent="android:Widget.Material.Button">
<item name="android:textColor">@color/white</item>
<item name="backgroundTint">@color/Dark_blue</item>
</style>

</resources>
33 changes: 28 additions & 5 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,33 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="Theme.TrackAndTrigger" parent="Theme.MaterialComponents">
<style name="Theme.TrackAndTrigger" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryDark">@color/purple_700</item>
<item name="colorAccent">@color/teal_200</item>
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/Medium_turquoise</item>
<item name="colorPrimaryDark">@color/Gunmetal</item>
<item name="colorAccent">@color/Bittersweet</item>
<item name="android:windowBackground">@color/white</item>
<item name="android:textColorPrimary">@color/Gunmetal</item>
<item name="android:textColorSecondary">@color/Mountbatten_pink</item>
<item name="android:colorBackground">@color/white</item>
<item name="android:panelBackground">@color/Medium_turquoise</item>
<item name="android:buttonStyle">@style/Buttons</item>
<item name="android:editTextStyle">@style/EditTexts</item>
<item name="android:textViewStyle">@style/TextViews</item>
</style>

<style name="Theme.TrackAndTriggerDark" parent="Theme.AppCompat.NoActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/Light_grey</item>
<item name="colorPrimaryDark">@color/black</item>
<item name="colorAccent">@color/Dark_blue</item>
<item name="android:windowBackground">@color/Dark_grey</item>
<item name="android:textColorPrimary">@color/Dark_bittersweet</item>
<item name="android:textColorSecondary">@color/Mountbatten_pink</item>
<item name="android:colorBackground">@color/Dark_grey</item>
<item name="android:panelBackground">@color/Dark_bittersweet</item>
<item name="android:buttonStyle">@style/ButtonsDark</item>
<item name="editTextStyle">@style/EditTextsDark</item>
<item name="android:textViewStyle">@style/TextViewsDark</item>
</style>

</resources>