Commit fbdc7bb4 authored by Charitha Ratnayake's avatar Charitha Ratnayake

Complete auth part in app

parent 911da2a4
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
[submodule "android-common-libs"]
path = android-common-libs
url = https://github.com/CharithaRatnayake/android-common-libs.git
Subproject commit 994e468195906230db755d680b65c43ae983856d
......@@ -8,7 +8,7 @@ android {
defaultConfig {
applicationId "com.jachdev.consumerprotection"
minSdkVersion 16
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
......@@ -33,7 +33,15 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation project(path: ':common-libs')
implementation 'androidx.navigation:navigation-fragment:2.3.4'
implementation 'androidx.navigation:navigation-ui:2.3.4'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.jakewharton:butterknife:10.2.3'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
}
\ No newline at end of file
......@@ -9,13 +9,27 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.ConsumerProtection">
<activity android:name=".MainActivity">
<activity
android:name=".ui.HomeActivity"
android:label="@string/title_activity_home"></activity>
<activity
android:name=".ui.MainActivity"
android:screenOrientation="portrait"
android:theme="@style/Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ui.LoginActivity"
android:screenOrientation="portrait"
android:theme="@style/ThemeAuthentication" />
<activity
android:name=".ui.SignUpActivity"
android:screenOrientation="portrait"
android:theme="@style/ThemeAuthentication" />
</application>
</manifest>
\ No newline at end of file
package com.jachdev.consumerprotection;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
\ No newline at end of file
package com.jachdev.consumerprotection.data.enums;
/**
* Created by Charitha Ratnayake(charitha.r@eyepax.com) on 6/5/2021.
*/
public enum UserType {
CONSUMER(0), VENDOR(1), ADMIN(2);
UserType(int value) {
this.id = value;
switch (value){
case 0:
name = "Consumer";
break;
case 1:
name = "Vendor";
break;
case 2:
name = "Admin";
break;
}
}
public int id;
public String name;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package com.jachdev.consumerprotection.ui;
import android.os.Bundle;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.jachdev.consumerprotection.R;
import androidx.appcompat.app.AppCompatActivity;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.navigation.ui.AppBarConfiguration;
import androidx.navigation.ui.NavigationUI;
public class HomeActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
BottomNavigationView navView = findViewById(R.id.nav_view);
// Passing each menu ID as a set of Ids because each
// menu should be considered as top level destinations.
AppBarConfiguration appBarConfiguration = new AppBarConfiguration.Builder(
R.id.navigation_home, R.id.navigation_dashboard, R.id.navigation_notifications)
.build();
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
NavigationUI.setupActionBarWithNavController(this, navController, appBarConfiguration);
NavigationUI.setupWithNavController(navView, navController);
}
}
\ No newline at end of file
package com.jachdev.consumerprotection.ui;
import androidx.appcompat.app.AppCompatActivity;
import butterknife.BindView;
import butterknife.ButterKnife;
import android.os.Bundle;
import android.view.View;
import com.jachdev.commonlibs.base.BaseActivity;
import com.jachdev.commonlibs.validator.Validator;
import com.jachdev.commonlibs.widget.CustomEditText;
import com.jachdev.consumerprotection.R;
import com.jachdev.consumerprotection.ui.SignUpActivity;
public class LoginActivity extends BaseActivity {
@BindView(R.id.et_email)
CustomEditText etEmail;
@BindView(R.id.et_password)
CustomEditText etPassword;
@Override
protected int layoutRes() {
return R.layout.activity_login;
}
public void onSignUpClick(View view) {
activityToActivity(SignUpActivity.class);
}
public void onSignInClick(View view) {
if(!Validator.isValidEmail(etEmail) || !Validator.isValidPassword(etPassword)){
return;
}
activityToActivity(HomeActivity.class);
LoginActivity.this.finish();
}
}
\ No newline at end of file
package com.jachdev.consumerprotection.ui;
import android.os.Bundle;
import com.jachdev.commonlibs.base.BaseActivity;
import com.jachdev.consumerprotection.R;
import androidx.annotation.Nullable;
public class MainActivity extends BaseActivity {
@Override
protected int layoutRes() {
return R.layout.activity_main;
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
activityToActivity(LoginActivity.class);
MainActivity.this.finish();
}
}
\ No newline at end of file
package com.jachdev.consumerprotection.ui;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import butterknife.BindView;
import android.os.Bundle;
import android.view.View;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import com.jachdev.commonlibs.base.BaseActivity;
import com.jachdev.commonlibs.validator.Validator;
import com.jachdev.commonlibs.widget.CustomEditText;
import com.jachdev.commonlibs.widget.CustomTextView;
import com.jachdev.consumerprotection.R;
import com.jachdev.consumerprotection.data.enums.UserType;
public class SignUpActivity extends BaseActivity {
@BindView(R.id.rg_user_type)
RadioGroup radioGroup;
@BindView(R.id.et_name)
CustomEditText etName;
@BindView(R.id.et_email)
CustomEditText etEmail;
@BindView(R.id.et_password)
CustomEditText etPassword;
@BindView(R.id.et_confirm_password)
CustomEditText etConfirmPassword;
@BindView(R.id.tv_user_type)
CustomTextView tvUserType;
@Override
protected int layoutRes() {
return R.layout.activity_sign_up;
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
((RadioButton)radioGroup.getChildAt(0)).setChecked(true);
radioGroup.setOnCheckedChangeListener(mOnCheckedChangeListener);
}
public void onSignUnClick(View view) {
if(!Validator.isValidField(etName) && !Validator.isValidEmail(etEmail) && !Validator.isValidChangedPassword(etPassword, etConfirmPassword)){
return;
}
activityToActivity(HomeActivity.class);
SignUpActivity.this.finish();
}
private RadioGroup.OnCheckedChangeListener mOnCheckedChangeListener = new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup rg, int i) {
String userType = null;
switch (rg.getCheckedRadioButtonId()){
case R.id.rb_admin:
userType = UserType.ADMIN.getName();
break;
case R.id.rb_consumer:
userType = UserType.CONSUMER.getName();
break;
case R.id.rb_vendor:
userType = UserType.VENDOR.getName();
break;
}
tvUserType.setAnyText(userType);
}
};
}
\ No newline at end of file
package com.jachdev.consumerprotection.ui.dashboard;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.jachdev.consumerprotection.R;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
public class DashboardFragment extends Fragment {
private DashboardViewModel dashboardViewModel;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
dashboardViewModel =
new ViewModelProvider(this).get(DashboardViewModel.class);
View root = inflater.inflate(R.layout.fragment_dashboard, container, false);
final TextView textView = root.findViewById(R.id.text_dashboard);
dashboardViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
@Override
public void onChanged(@Nullable String s) {
textView.setText(s);
}
});
return root;
}
}
\ No newline at end of file
package com.jachdev.consumerprotection.ui.dashboard;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class DashboardViewModel extends ViewModel {
private MutableLiveData<String> mText;
public DashboardViewModel() {
mText = new MutableLiveData<>();
mText.setValue("This is dashboard fragment");
}
public LiveData<String> getText() {
return mText;
}
}
\ No newline at end of file
package com.jachdev.consumerprotection.ui.home;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.jachdev.consumerprotection.R;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
public class HomeFragment extends Fragment {
private HomeViewModel homeViewModel;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
homeViewModel =
new ViewModelProvider(this).get(HomeViewModel.class);
View root = inflater.inflate(R.layout.fragment_home, container, false);
final TextView textView = root.findViewById(R.id.text_home);
homeViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
@Override
public void onChanged(@Nullable String s) {
textView.setText(s);
}
});
return root;
}
}
\ No newline at end of file
package com.jachdev.consumerprotection.ui.home;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class HomeViewModel extends ViewModel {
private MutableLiveData<String> mText;
public HomeViewModel() {
mText = new MutableLiveData<>();
mText.setValue("This is home fragment");
}
public LiveData<String> getText() {
return mText;
}
}
\ No newline at end of file
package com.jachdev.consumerprotection.ui.notifications;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.jachdev.consumerprotection.R;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
public class NotificationsFragment extends Fragment {
private NotificationsViewModel notificationsViewModel;
public View onCreateView(@NonNull LayoutInflater inflater,
ViewGroup container, Bundle savedInstanceState) {
notificationsViewModel =
new ViewModelProvider(this).get(NotificationsViewModel.class);
View root = inflater.inflate(R.layout.fragment_notifications, container, false);
final TextView textView = root.findViewById(R.id.text_notifications);
notificationsViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() {
@Override
public void onChanged(@Nullable String s) {
textView.setText(s);
}
});
return root;
}
}
\ No newline at end of file
package com.jachdev.consumerprotection.ui.notifications;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
public class NotificationsViewModel extends ViewModel {
private MutableLiveData<String> mText;
public NotificationsViewModel() {
mText = new MutableLiveData<>();
mText.setValue("This is notifications fragment");
}
public LiveData<String> getText() {
return mText;
}
}
\ No newline at end of file
package com.jachdev.consumerprotection.ui.widget;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Build;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import com.jachdev.commonlibs.widget.CustomTextView;
import com.jachdev.consumerprotection.R;
import androidx.annotation.Nullable;
/**
* Created by Charitha Ratnayake(charitha.r@eyepax.com) on 6/5/2021.
*/
public class HeaderView extends FrameLayout {
private CustomTextView tvHeader;
public HeaderView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
initViews();
getHeaderText(attrs);
}
private void initViews(){
View view = LayoutInflater.from(this.getContext())
.inflate(R.layout.layout_header_view, null);
tvHeader = view.findViewById(R.id.tv_header);
this.addView(view);
}
private void getHeaderText(AttributeSet attrs) {
TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.HeaderView);
String text = a.getString(R.styleable.HeaderView_text);
setHeaderText(text);
a.recycle();
}
public void setHeaderText(String text){
tvHeader.setAnyText(text);
}
}
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checkable="true" android:drawable="@drawable/ic_admin_selected" /> <!-- pressed -->
<item android:state_checked="true" android:drawable="@drawable/ic_admin_selected" /> <!-- focused -->
<item android:drawable="@drawable/ic_admin" /> <!-- default -->
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/bg_button_selected" android:state_selected="true" />
<item android:drawable="@drawable/bg_button_selected" android:state_pressed="true" />
<item android:drawable="@drawable/bg_button_normal" />
</selector>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/colorPrimary"/>
<corners android:radius="@dimen/default_radius"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/colorPrimaryDark"/>
<corners android:radius="@dimen/default_radius"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checkable="true" android:drawable="@drawable/ic_consumer_selected" /> <!-- pressed -->
<item android:state_checked="true" android:drawable="@drawable/ic_consumer_selected" /> <!-- focused -->
<item android:drawable="@drawable/ic_consumer" /> <!-- default -->
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<stroke android:color="@color/colorPrimary" android:width="@dimen/stroke"/>
<corners android:radius="@dimen/default_radius"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layer-list
xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item
android:drawable="@color/whiteTwo"/>
<item>
<bitmap
android:src="@drawable/ic_launcher"
android:gravity="center"/>
</item>
</layer-list>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<solid android:color="@color/colorPrimary"/>
<corners android:bottomLeftRadius="100dp"/>
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checkable="true" android:drawable="@drawable/ic_basket_selected" /> <!-- pressed -->
<item android:state_checked="true" android:drawable="@drawable/ic_basket_selected" /> <!-- focused -->
<item android:drawable="@drawable/ic_basket" /> <!-- default -->
</selector>
\ No newline at end of file
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="80dp"
android:height="80dp"
android:viewportWidth="474.565"
android:viewportHeight="474.565">
<path
android:fillColor="#252525"
android:pathData="M255.204,102.3c-0.606,-11.321 -12.176,-9.395 -23.465,-9.395C240.078,95.126 247.967,98.216 255.204,102.3z"/>
<path
android:fillColor="#252525"
android:pathData="M134.524,73.928c-43.825,0 -63.997,55.471 -28.963,83.37c11.943,-31.89 35.718,-54.788 66.886,-63.826C163.921,81.685 150.146,73.928 134.524,73.928z"/>
<path
android:fillColor="#252525"
android:pathData="M43.987,148.617c1.786,5.731 4.1,11.229 6.849,16.438L36.44,179.459c-3.866,3.866 -3.866,10.141 0,14.015l25.375,25.383c1.848,1.848 4.38,2.888 7.019,2.888c2.61,0 5.125,-1.04 7.005,-2.888l14.38,-14.404c2.158,1.142 4.55,1.842 6.785,2.827c0,-0.164 -0.016,-0.334 -0.016,-0.498c0,-11.771 1.352,-22.875 3.759,-33.302c-17.362,-11.174 -28.947,-30.57 -28.947,-52.715c0,-34.592 28.139,-62.739 62.723,-62.739c23.418,0 43.637,13.037 54.43,32.084c11.523,-1.429 22.347,-1.429 35.376,1.033c-1.676,-5.07 -3.648,-10.032 -6.118,-14.683l14.396,-14.411c1.878,-1.856 2.918,-4.38 2.918,-7.004c0,-2.625 -1.04,-5.148 -2.918,-7.004l-25.361,-25.367c-1.94,-1.941 -4.472,-2.904 -7.003,-2.904c-2.532,0 -5.063,0.963 -6.989,2.904l-14.442,14.411c-5.217,-2.764 -10.699,-5.078 -16.444,-6.825V9.9c0,-5.466 -4.411,-9.9 -9.893,-9.9h-35.888c-5.451,0 -9.909,4.434 -9.909,9.9v20.359c-5.73,1.747 -11.213,4.061 -16.446,6.825L75.839,22.689c-1.942,-1.941 -4.473,-2.904 -7.005,-2.904c-2.531,0 -5.077,0.963 -7.003,2.896L36.44,48.048c-1.848,1.864 -2.888,4.379 -2.888,7.012c0,2.632 1.04,5.148 2.888,7.004l14.396,14.403c-2.75,5.218 -5.063,10.708 -6.817,16.438H23.675c-5.482,0 -9.909,4.441 -9.909,9.915v35.889c0,5.458 4.427,9.908 9.909,9.908H43.987z"/>
<path
android:fillColor="#252525"
android:pathData="M354.871,340.654c15.872,-8.705 26.773,-25.367 26.773,-44.703c0,-28.217 -22.967,-51.168 -51.184,-51.168c-9.923,0 -19.118,2.966 -26.975,7.873c-4.705,18.728 -12.113,36.642 -21.803,52.202C309.152,310.022 334.357,322.531 354.871,340.654z"/>
<path
android:fillColor="#252525"
android:pathData="M460.782,276.588c0,-5.909 -4.799,-10.693 -10.685,-10.693H428.14c-1.896,-6.189 -4.411,-12.121 -7.393,-17.75l15.544,-15.544c2.02,-2.004 3.137,-4.721 3.137,-7.555c0,-2.835 -1.118,-5.553 -3.137,-7.563l-27.363,-27.371c-2.08,-2.09 -4.829,-3.138 -7.561,-3.138c-2.734,0 -5.467,1.048 -7.547,3.138l-15.576,15.552c-5.623,-2.982 -11.539,-5.481 -17.751,-7.369v-21.958c0,-5.901 -4.768,-10.685 -10.669,-10.685H311.11c-2.594,0 -4.877,1.04 -6.739,2.578c3.26,11.895 5.046,24.793 5.046,38.552c0,8.735 -0.682,17.604 -1.956,26.423c7.205,-2.656 14.876,-4.324 22.999,-4.324c36.99,0 67.086,30.089 67.086,67.07c0,23.637 -12.345,44.353 -30.872,56.303c13.48,14.784 24.195,32.324 31.168,51.976c1.148,0.396 2.344,0.684 3.54,0.684c2.733,0 5.467,-1.04 7.563,-3.13l27.379,-27.371c2.004,-2.004 3.106,-4.721 3.106,-7.555s-1.102,-5.551 -3.106,-7.563l-15.576,-15.552c2.982,-5.621 5.497,-11.555 7.393,-17.75h21.957c2.826,0 5.575,-1.118 7.563,-3.138c2.004,-1.996 3.138,-4.72 3.138,-7.555L460.782,276.588z"/>
<path
android:fillColor="#252525"
android:pathData="M376.038,413.906c-16.602,-48.848 -60.471,-82.445 -111.113,-87.018c-16.958,17.958 -37.954,29.351 -61.731,29.351c-23.759,0 -44.771,-11.392 -61.713,-29.351c-50.672,4.573 -94.543,38.17 -111.145,87.026l-9.177,27.013c-2.625,7.773 -1.368,16.338 3.416,23.007c4.783,6.671 12.486,10.631 20.685,10.631h315.853c8.215,0 15.918,-3.96 20.702,-10.631c4.767,-6.669 6.041,-15.234 3.4,-23.007L376.038,413.906z"/>
<path
android:fillColor="#252525"
android:pathData="M120.842,206.782c0,60.589 36.883,125.603 82.352,125.603c45.487,0 82.368,-65.014 82.368,-125.603C285.563,81.188 120.842,80.939 120.842,206.782z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="80dp"
android:height="80dp"
android:viewportWidth="474.565"
android:viewportHeight="474.565">
<path
android:fillColor="#cd9485"
android:pathData="M255.204,102.3c-0.606,-11.321 -12.176,-9.395 -23.465,-9.395C240.078,95.126 247.967,98.216 255.204,102.3z"/>
<path
android:fillColor="#cd9485"
android:pathData="M134.524,73.928c-43.825,0 -63.997,55.471 -28.963,83.37c11.943,-31.89 35.718,-54.788 66.886,-63.826C163.921,81.685 150.146,73.928 134.524,73.928z"/>
<path
android:fillColor="#cd9485"
android:pathData="M43.987,148.617c1.786,5.731 4.1,11.229 6.849,16.438L36.44,179.459c-3.866,3.866 -3.866,10.141 0,14.015l25.375,25.383c1.848,1.848 4.38,2.888 7.019,2.888c2.61,0 5.125,-1.04 7.005,-2.888l14.38,-14.404c2.158,1.142 4.55,1.842 6.785,2.827c0,-0.164 -0.016,-0.334 -0.016,-0.498c0,-11.771 1.352,-22.875 3.759,-33.302c-17.362,-11.174 -28.947,-30.57 -28.947,-52.715c0,-34.592 28.139,-62.739 62.723,-62.739c23.418,0 43.637,13.037 54.43,32.084c11.523,-1.429 22.347,-1.429 35.376,1.033c-1.676,-5.07 -3.648,-10.032 -6.118,-14.683l14.396,-14.411c1.878,-1.856 2.918,-4.38 2.918,-7.004c0,-2.625 -1.04,-5.148 -2.918,-7.004l-25.361,-25.367c-1.94,-1.941 -4.472,-2.904 -7.003,-2.904c-2.532,0 -5.063,0.963 -6.989,2.904l-14.442,14.411c-5.217,-2.764 -10.699,-5.078 -16.444,-6.825V9.9c0,-5.466 -4.411,-9.9 -9.893,-9.9h-35.888c-5.451,0 -9.909,4.434 -9.909,9.9v20.359c-5.73,1.747 -11.213,4.061 -16.446,6.825L75.839,22.689c-1.942,-1.941 -4.473,-2.904 -7.005,-2.904c-2.531,0 -5.077,0.963 -7.003,2.896L36.44,48.048c-1.848,1.864 -2.888,4.379 -2.888,7.012c0,2.632 1.04,5.148 2.888,7.004l14.396,14.403c-2.75,5.218 -5.063,10.708 -6.817,16.438H23.675c-5.482,0 -9.909,4.441 -9.909,9.915v35.889c0,5.458 4.427,9.908 9.909,9.908H43.987z"/>
<path
android:fillColor="#cd9485"
android:pathData="M354.871,340.654c15.872,-8.705 26.773,-25.367 26.773,-44.703c0,-28.217 -22.967,-51.168 -51.184,-51.168c-9.923,0 -19.118,2.966 -26.975,7.873c-4.705,18.728 -12.113,36.642 -21.803,52.202C309.152,310.022 334.357,322.531 354.871,340.654z"/>
<path
android:fillColor="#cd9485"
android:pathData="M460.782,276.588c0,-5.909 -4.799,-10.693 -10.685,-10.693H428.14c-1.896,-6.189 -4.411,-12.121 -7.393,-17.75l15.544,-15.544c2.02,-2.004 3.137,-4.721 3.137,-7.555c0,-2.835 -1.118,-5.553 -3.137,-7.563l-27.363,-27.371c-2.08,-2.09 -4.829,-3.138 -7.561,-3.138c-2.734,0 -5.467,1.048 -7.547,3.138l-15.576,15.552c-5.623,-2.982 -11.539,-5.481 -17.751,-7.369v-21.958c0,-5.901 -4.768,-10.685 -10.669,-10.685H311.11c-2.594,0 -4.877,1.04 -6.739,2.578c3.26,11.895 5.046,24.793 5.046,38.552c0,8.735 -0.682,17.604 -1.956,26.423c7.205,-2.656 14.876,-4.324 22.999,-4.324c36.99,0 67.086,30.089 67.086,67.07c0,23.637 -12.345,44.353 -30.872,56.303c13.48,14.784 24.195,32.324 31.168,51.976c1.148,0.396 2.344,0.684 3.54,0.684c2.733,0 5.467,-1.04 7.563,-3.13l27.379,-27.371c2.004,-2.004 3.106,-4.721 3.106,-7.555s-1.102,-5.551 -3.106,-7.563l-15.576,-15.552c2.982,-5.621 5.497,-11.555 7.393,-17.75h21.957c2.826,0 5.575,-1.118 7.563,-3.138c2.004,-1.996 3.138,-4.72 3.138,-7.555L460.782,276.588z"/>
<path
android:fillColor="#cd9485"
android:pathData="M376.038,413.906c-16.602,-48.848 -60.471,-82.445 -111.113,-87.018c-16.958,17.958 -37.954,29.351 -61.731,29.351c-23.759,0 -44.771,-11.392 -61.713,-29.351c-50.672,4.573 -94.543,38.17 -111.145,87.026l-9.177,27.013c-2.625,7.773 -1.368,16.338 3.416,23.007c4.783,6.671 12.486,10.631 20.685,10.631h315.853c8.215,0 15.918,-3.96 20.702,-10.631c4.767,-6.669 6.041,-15.234 3.4,-23.007L376.038,413.906z"/>
<path
android:fillColor="#cd9485"
android:pathData="M120.842,206.782c0,60.589 36.883,125.603 82.352,125.603c45.487,0 82.368,-65.014 82.368,-125.603C285.563,81.188 120.842,80.939 120.842,206.782z"/>
</vector>
<vector android:height="80dp" android:viewportHeight="512"
android:viewportWidth="512" android:width="80dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#252525" android:pathData="m46.56,428.662c5.87,47.519 46.37,83.338 94.27,83.338h230.34c47.9,0 88.4,-35.819 94.27,-83.338l12.39,-87.667h-443.66zM332.22,381.494h26.45c8.28,0 15,6.72 15,15 0,8.29 -6.72,15 -15,15h-26.45c-8.28,0 -15,-6.71 -15,-15 0,-8.28 6.72,-15 15,-15zM313.95,441.492c8.28,0 15,6.72 15,15 0,8.29 -6.72,15 -15,15h-26.45c-8.28,0 -15,-6.71 -15,-15 0,-8.28 6.72,-15 15,-15zM242.78,381.494h26.44c8.29,0 15,6.72 15,15 0,8.29 -6.71,15 -15,15h-26.44c-8.29,0 -15,-6.71 -15,-15 0,-8.28 6.71,-15 15,-15zM224.22,441.492c8.29,0 15,6.72 15,15 0,8.29 -6.71,15 -15,15h-26.44c-8.29,0 -15,-6.71 -15,-15 0,-8.28 6.71,-15 15,-15zM153.33,381.494h26.45c8.28,0 15,6.72 15,15 0,8.29 -6.72,15 -15,15h-26.45c-8.28,0 -15,-6.71 -15,-15 0,-8.28 6.72,-15 15,-15z"/>
<path android:fillColor="#252525" android:pathData="m497,245.998h-482c-8.28,0 -15,6.72 -15,15v34.999c0,8.28 6.72,15 15,15h482c8.28,0 15,-6.72 15,-15v-34.999c0,-8.28 -6.72,-15 -15,-15z"/>
<path android:fillColor="#252525" android:pathData="m288.5,15.015c0,-8.28 -6.72,-15 -15,-15h-35c-8.28,0 -15,6.72 -15,15v200.984h65z"/>
<path android:fillColor="#252525" android:pathData="m506.68,63.963c0.31,-0.27 0.62,-0.55 0.92,-0.84l0.01,-0.01c7.03,-7.051 5.379,-18.857 -3.29,-23.699l-67.11,-37.499c-9.184,-5.126 -20.604,0.557 -22.15,10.87 -1.7,11.25 -5,22.259 -9.75,32.619 49.587,28.95 12.852,7.501 77.77,45.379 6.51,-10.03 14.48,-19.11 23.6,-26.82z"/>
<path android:fillColor="#252525" android:pathData="m318.5,162.53v53.469h96.61z"/>
<path android:fillColor="#252525" android:pathData="m469.95,117.852c-62.192,-36.293 -20.993,-12.238 -80.4,-46.909 -5.744,7.145 -4.185,5.237 -61.83,62.398l122.21,67.628c18.263,-78.167 17.496,-75.741 20.02,-83.117z"/>
<path android:fillColor="#252525" android:pathData="m52.48,160.92c-9.84,15.8 -13.73,35.419 -11.32,55.078h152.34v-98.467c-25.497,-14.778 -55.969,-15.452 -80.973,1.611 -23.227,-28.642 -54.325,-27.837 -55.834,-27.769 0,0 -14.223,1.586 -14.528,15.021s15.5,14.961 15.5,14.961 0.07,-0.054 0.189,-0.145l0.005,0.139 -0.194,0.006c0.733,-0.017 14.247,0.018 26.843,11.719 -13.249,5.897 -24.264,15.37 -32.028,27.846z"/>
</vector>
<vector android:height="80dp" android:viewportHeight="512"
android:viewportWidth="512" android:width="80dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#cd9485" android:pathData="m46.56,428.662c5.87,47.519 46.37,83.338 94.27,83.338h230.34c47.9,0 88.4,-35.819 94.27,-83.338l12.39,-87.667h-443.66zM332.22,381.494h26.45c8.28,0 15,6.72 15,15 0,8.29 -6.72,15 -15,15h-26.45c-8.28,0 -15,-6.71 -15,-15 0,-8.28 6.72,-15 15,-15zM313.95,441.492c8.28,0 15,6.72 15,15 0,8.29 -6.72,15 -15,15h-26.45c-8.28,0 -15,-6.71 -15,-15 0,-8.28 6.72,-15 15,-15zM242.78,381.494h26.44c8.29,0 15,6.72 15,15 0,8.29 -6.71,15 -15,15h-26.44c-8.29,0 -15,-6.71 -15,-15 0,-8.28 6.71,-15 15,-15zM224.22,441.492c8.29,0 15,6.72 15,15 0,8.29 -6.71,15 -15,15h-26.44c-8.29,0 -15,-6.71 -15,-15 0,-8.28 6.71,-15 15,-15zM153.33,381.494h26.45c8.28,0 15,6.72 15,15 0,8.29 -6.72,15 -15,15h-26.45c-8.28,0 -15,-6.71 -15,-15 0,-8.28 6.72,-15 15,-15z"/>
<path android:fillColor="#cd9485" android:pathData="m497,245.998h-482c-8.28,0 -15,6.72 -15,15v34.999c0,8.28 6.72,15 15,15h482c8.28,0 15,-6.72 15,-15v-34.999c0,-8.28 -6.72,-15 -15,-15z"/>
<path android:fillColor="#cd9485" android:pathData="m288.5,15.015c0,-8.28 -6.72,-15 -15,-15h-35c-8.28,0 -15,6.72 -15,15v200.984h65z"/>
<path android:fillColor="#cd9485" android:pathData="m506.68,63.963c0.31,-0.27 0.62,-0.55 0.92,-0.84l0.01,-0.01c7.03,-7.051 5.379,-18.857 -3.29,-23.699l-67.11,-37.499c-9.184,-5.126 -20.604,0.557 -22.15,10.87 -1.7,11.25 -5,22.259 -9.75,32.619 49.587,28.95 12.852,7.501 77.77,45.379 6.51,-10.03 14.48,-19.11 23.6,-26.82z"/>
<path android:fillColor="#cd9485" android:pathData="m318.5,162.53v53.469h96.61z"/>
<path android:fillColor="#cd9485" android:pathData="m469.95,117.852c-62.192,-36.293 -20.993,-12.238 -80.4,-46.909 -5.744,7.145 -4.185,5.237 -61.83,62.398l122.21,67.628c18.263,-78.167 17.496,-75.741 20.02,-83.117z"/>
<path android:fillColor="#cd9485" android:pathData="m52.48,160.92c-9.84,15.8 -13.73,35.419 -11.32,55.078h152.34v-98.467c-25.497,-14.778 -55.969,-15.452 -80.973,1.611 -23.227,-28.642 -54.325,-27.837 -55.834,-27.769 0,0 -14.223,1.586 -14.528,15.021s15.5,14.961 15.5,14.961 0.07,-0.054 0.189,-0.145l0.005,0.139 -0.194,0.006c0.733,-0.017 14.247,0.018 26.843,11.719 -13.249,5.897 -24.264,15.37 -32.028,27.846z"/>
</vector>
<vector android:height="80dp" android:viewportHeight="388.227"
android:viewportWidth="388.227" android:width="80dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#252525" android:pathData="M194.113,190.505c36.691,0 66.438,-36.129 66.438,-80.695c0,-44.567 -9.768,-80.696 -66.438,-80.696c-56.672,0 -66.438,36.129 -66.438,80.696C127.676,154.376 157.422,190.505 194.113,190.505z"/>
<path android:fillColor="#252525" android:pathData="M319.455,310.459c-1.229,-77.637 -11.369,-99.759 -88.959,-113.763c0,0 -10.924,13.917 -36.381,13.917c-25.457,0 -36.379,-13.917 -36.379,-13.917c-76.744,13.85 -87.502,35.645 -88.916,111.24c-0.115,6.173 -0.168,6.497 -0.189,5.78c0.004,1.343 0.01,3.826 0.01,8.157c0,0 18.473,37.239 125.475,37.239s125.477,-37.239 125.477,-37.239c0,-2.782 0.002,-4.718 0.004,-6.033C319.576,316.283 319.533,315.424 319.455,310.459z"/>
<path android:fillColor="#252525" android:pathData="M286.313,176.097c29.801,0 53.959,-29.343 53.959,-65.539c0,-36.197 -7.932,-65.54 -53.959,-65.54c-7.742,0 -14.404,0.833 -20.135,2.388c10.631,19.598 12.088,43.402 12.088,62.403c0,21.514 -5.832,42.054 -16.572,59.061C269.076,173.48 277.441,176.097 286.313,176.097z"/>
<path android:fillColor="#252525" android:pathData="M388.111,273.521c-1,-63.055 -9.234,-81.022 -72.252,-92.396c0,0 -8.871,11.304 -29.547,11.304c-0.855,0 -1.684,-0.026 -2.5,-0.063c13.137,5.923 25.088,14.17 33.889,26.238c15.215,20.863 18.713,48.889 19.435,90.062c42.397,-8.378 51.086,-25.873 51.086,-25.873c0,-2.28 0,-3.844 0.004,-4.913C388.209,278.256 388.174,277.582 388.111,273.521z"/>
<path android:fillColor="#252525" android:pathData="M101.912,176.097c8.873,0 17.236,-2.617 24.621,-7.226c-10.74,-17.007 -16.572,-37.547 -16.572,-59.061c0,-19.002 1.457,-42.806 12.086,-62.403c-5.73,-1.555 -12.391,-2.388 -20.135,-2.388c-46.027,0 -53.957,29.343 -53.957,65.54C47.955,146.754 72.113,176.097 101.912,176.097z"/>
<path android:fillColor="#252525" android:pathData="M104.412,192.365c-0.814,0.037 -1.643,0.063 -2.5,0.063c-20.676,0 -29.547,-11.304 -29.547,-11.304c-63.016,11.374 -71.252,29.34 -72.25,92.396c-0.065,4.062 -0.098,4.735 -0.115,4.358c0.002,1.069 0.004,2.633 0.004,4.913c0,0 8.69,17.495 51.084,25.873c0.725,-41.172 4.221,-69.198 19.438,-90.062C79.326,206.536 91.275,198.288 104.412,192.365z"/>
</vector>
<vector android:height="80dp" android:viewportHeight="388.227"
android:viewportWidth="388.227" android:width="80dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#cd9485" android:pathData="M194.113,190.505c36.691,0 66.438,-36.129 66.438,-80.695c0,-44.567 -9.768,-80.696 -66.438,-80.696c-56.672,0 -66.438,36.129 -66.438,80.696C127.676,154.376 157.422,190.505 194.113,190.505z"/>
<path android:fillColor="#cd9485" android:pathData="M319.455,310.459c-1.229,-77.637 -11.369,-99.759 -88.959,-113.763c0,0 -10.924,13.917 -36.381,13.917c-25.457,0 -36.379,-13.917 -36.379,-13.917c-76.744,13.85 -87.502,35.645 -88.916,111.24c-0.115,6.173 -0.168,6.497 -0.189,5.78c0.004,1.343 0.01,3.826 0.01,8.157c0,0 18.473,37.239 125.475,37.239s125.477,-37.239 125.477,-37.239c0,-2.782 0.002,-4.718 0.004,-6.033C319.576,316.283 319.533,315.424 319.455,310.459z"/>
<path android:fillColor="#cd9485" android:pathData="M286.313,176.097c29.801,0 53.959,-29.343 53.959,-65.539c0,-36.197 -7.932,-65.54 -53.959,-65.54c-7.742,0 -14.404,0.833 -20.135,2.388c10.631,19.598 12.088,43.402 12.088,62.403c0,21.514 -5.832,42.054 -16.572,59.061C269.076,173.48 277.441,176.097 286.313,176.097z"/>
<path android:fillColor="#cd9485" android:pathData="M388.111,273.521c-1,-63.055 -9.234,-81.022 -72.252,-92.396c0,0 -8.871,11.304 -29.547,11.304c-0.855,0 -1.684,-0.026 -2.5,-0.063c13.137,5.923 25.088,14.17 33.889,26.238c15.215,20.863 18.713,48.889 19.435,90.062c42.397,-8.378 51.086,-25.873 51.086,-25.873c0,-2.28 0,-3.844 0.004,-4.913C388.209,278.256 388.174,277.582 388.111,273.521z"/>
<path android:fillColor="#cd9485" android:pathData="M101.912,176.097c8.873,0 17.236,-2.617 24.621,-7.226c-10.74,-17.007 -16.572,-37.547 -16.572,-59.061c0,-19.002 1.457,-42.806 12.086,-62.403c-5.73,-1.555 -12.391,-2.388 -20.135,-2.388c-46.027,0 -53.957,29.343 -53.957,65.54C47.955,146.754 72.113,176.097 101.912,176.097z"/>
<path android:fillColor="#cd9485" android:pathData="M104.412,192.365c-0.814,0.037 -1.643,0.063 -2.5,0.063c-20.676,0 -29.547,-11.304 -29.547,-11.304c-63.016,11.374 -71.252,29.34 -72.25,92.396c-0.065,4.062 -0.098,4.735 -0.115,4.358c0.002,1.069 0.004,2.633 0.004,4.913c0,0 8.69,17.495 51.084,25.873c0.725,-41.172 4.221,-69.198 19.438,-90.062C79.326,206.536 91.275,198.288 104.412,192.365z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M3,13h8L11,3L3,3v10zM3,21h8v-6L3,15v6zM13,21h8L21,11h-8v10zM13,3v6h8L21,3h-8z" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z" />
</vector>
<?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"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="?attr/actionBarSize">
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/nav_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:background="?android:attr/windowBackground"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:menu="@menu/bottom_nav_menu" />
<fragment
android:id="@+id/nav_host_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:defaultNavHost="true"
app:layout_constraintBottom_toTopOf="@id/nav_view"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/mobile_navigation" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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:fitsSystemWindows="false"
tools:context=".ui.LoginActivity">
<com.jachdev.consumerprotection.ui.widget.HeaderView
android:id="@+id/headerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:text="@string/login" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/medium"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/headerView">
<com.jachdev.commonlibs.widget.CustomEditText
android:id="@+id/et_email"
style="@style/EditText"
android:hint="@string/email"
android:inputType="textEmailAddress"
app:fontType="@string/font_para"
app:layout_constraintTop_toBottomOf="@+id/headerView" />
<com.jachdev.commonlibs.widget.CustomEditText
android:id="@+id/et_password"
style="@style/EditText"
android:layout_marginTop="@dimen/medium"
android:hint="@string/password"
android:inputType="textPassword"
app:fontType="@string/font_para"
app:layout_constraintTop_toBottomOf="@+id/headerView" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/stroke"
android:background="@color/colorPrimary"
android:layout_margin="@dimen/medium"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:orientation="horizontal">
<com.jachdev.commonlibs.widget.CustomTextView
app:fontType="@string/font_para"
android:text="@string/don_t_you_have_an_account"
style="@style/TextView" />
<com.jachdev.commonlibs.widget.CustomTextView
app:fontType="@string/font_header"
android:text="@string/sign_up"
android:textColor="@color/colorPrimaryTextAccent"
style="@style/TextView"
android:paddingStart="@dimen/low"
android:paddingEnd="@dimen/low"
android:onClick="onSignUpClick"/>
</LinearLayout>
<com.jachdev.commonlibs.widget.CustomButton
android:layout_marginTop="@dimen/medium"
app:fontType="@string/font_para"
android:text="@string/sign_in"
style="@style/Button"
android:onClick="onSignInClick"/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -4,15 +4,24 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context=".ui.MainActivity">
<TextView
<com.jachdev.consumerprotection.ui.widget.HeaderView
android:id="@+id/headerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:text="@string/app_name" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
android:src="@mipmap/ic_launcher"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/headerView" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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:fitsSystemWindows="false"
tools:context=".ui.SignUpActivity">
<com.jachdev.consumerprotection.ui.widget.HeaderView
android:id="@+id/headerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:text="@string/sign_up" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/headerView">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/medium">
<com.jachdev.commonlibs.widget.CustomEditText
android:id="@+id/et_name"
style="@style/EditText"
android:hint="@string/name"
android:inputType="textPersonName|textCapWords"
app:fontType="@string/font_para"
app:layout_constraintTop_toBottomOf="@+id/headerView" />
<com.jachdev.commonlibs.widget.CustomEditText
android:id="@+id/et_email"
style="@style/EditText"
android:layout_marginTop="@dimen/medium"
android:hint="@string/email"
android:inputType="textEmailAddress"
app:fontType="@string/font_para"
app:layout_constraintTop_toBottomOf="@+id/headerView" />
<com.jachdev.commonlibs.widget.CustomEditText
android:id="@+id/et_password"
style="@style/EditText"
android:layout_marginTop="@dimen/medium"
android:hint="@string/password"
android:inputType="textPassword"
app:fontType="@string/font_para"
app:layout_constraintTop_toBottomOf="@+id/headerView" />
<com.jachdev.commonlibs.widget.CustomEditText
android:id="@+id/et_confirm_password"
style="@style/EditText"
android:layout_marginTop="@dimen/medium"
android:hint="@string/confirm_password"
android:inputType="textPassword"
app:fontType="@string/font_para"
app:layout_constraintTop_toBottomOf="@+id/headerView" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.jachdev.commonlibs.widget.CustomTextView
app:fontType="@string/font_para"
android:layout_marginTop="@dimen/medium"
android:layout_weight="1"
android:text="@string/sign_up_as"
style="@style/TextView" />
<com.jachdev.commonlibs.widget.CustomTextView
android:id="@+id/tv_user_type"
app:fontType="@string/font_header"
android:layout_marginTop="@dimen/medium"
android:text="@string/consumer"
style="@style/TextView" />
</LinearLayout>
<RadioGroup
android:id="@+id/rg_user_type"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:gravity="center"
android:layout_marginTop="@dimen/medium">
<RadioButton
android:id="@+id/rb_consumer"
android:button="@drawable/bg_consumer_selector"
android:layout_margin="@dimen/medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/rb_vendor"
android:button="@drawable/bg_vendor_selector"
android:layout_margin="@dimen/medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<RadioButton
android:id="@+id/rb_admin"
android:button="@drawable/bg_admin_selector"
android:layout_margin="@dimen/medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</RadioGroup>
<com.jachdev.commonlibs.widget.CustomButton
android:layout_marginTop="@dimen/medium"
app:fontType="@string/font_para"
android:text="@string/sign_up"
style="@style/Button"
android:onClick="onSignUnClick"/>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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=".ui.dashboard.DashboardFragment">
<TextView
android:id="@+id/text_dashboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textAlignment="center"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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=".ui.home.HomeFragment">
<TextView
android:id="@+id/text_home"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textAlignment="center"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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=".ui.notifications.NotificationsFragment">
<TextView
android:id="@+id/text_notifications"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textAlignment="center"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?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"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv_header"
android:layout_width="match_parent"
android:layout_height="300dp"
android:src="@drawable/bg_top_header"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.jachdev.commonlibs.widget.CustomTextView
android:id="@+id/tv_header"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end"
android:maxLines="2"
android:padding="@dimen/medium"
android:text="@string/app_name"
android:textAlignment="textEnd"
android:textColor="@color/colorAccent"
android:textSize="35sp"
app:fontType="@string/font_header"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/iv_header"
app:layout_constraintTop_toTopOf="@+id/iv_header" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/navigation_home"
android:icon="@drawable/ic_home_black_24dp"
android:title="@string/title_home" />
<item
android:id="@+id/navigation_dashboard"
android:icon="@drawable/ic_dashboard_black_24dp"
android:title="@string/title_dashboard" />
<item
android:id="@+id/navigation_notifications"
android:icon="@drawable/ic_notifications_black_24dp"
android:title="@string/title_notifications" />
</menu>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<navigation 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/mobile_navigation"
app:startDestination="@+id/navigation_home">
<fragment
android:id="@+id/navigation_home"
android:name="com.jachdev.consumerprotection.ui.home.HomeFragment"
android:label="@string/title_home"
tools:layout="@layout/fragment_home" />
<fragment
android:id="@+id/navigation_dashboard"
android:name="com.jachdev.consumerprotection.ui.dashboard.DashboardFragment"
android:label="@string/title_dashboard"
tools:layout="@layout/fragment_dashboard" />
<fragment
android:id="@+id/navigation_notifications"
android:name="com.jachdev.consumerprotection.ui.notifications.NotificationsFragment"
android:label="@string/title_notifications"
tools:layout="@layout/fragment_notifications" />
</navigation>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Fullscreen" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimary</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowBackground">@drawable/bg_splash</item>
<item name="android:windowLayoutInDisplayCutoutMode">always</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
<style name="ThemeAuthentication" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimary</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:windowBackground">@color/whiteTwo</item>
<item name="android:windowLayoutInDisplayCutoutMode">always</item>
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="HeaderView">
<attr name="text" format="string" />
</declare-styleable>
<declare-styleable name="CircleImageView">
<attr name="civ_border_width" format="dimension" />
<attr name="civ_border_color" format="color" />
<attr name="civ_border_overlay" format="boolean" />
<attr name="civ_circle_background_color" format="color" />
</declare-styleable>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#252525</color>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
......@@ -7,4 +10,11 @@
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="colorPrimaryDark">#151515</color>
<color name="colorAccent">#cd9485</color>
<color name="colorAccentVariant">#B88476</color>
<color name="whiteTwo">#FFFFFF</color>
<color name="colorPrimaryText">@color/colorPrimary</color>
<color name="colorPrimaryTextAccent">@color/colorAccent</color>
<color name="colorPrimaryTextHint">#6b6c72</color>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="medium">16dp</dimen>
<dimen name="stroke">1dp</dimen>
<dimen name="default_radius">4dp</dimen>
<dimen name="font_size_medium">16sp</dimen>
<dimen name="low">8dp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>
\ No newline at end of file
<resources>
<string name="app_name">Consumer Protection</string>
<string name="font_header">fonts/Montserrat-Bold.ttf</string>
<string name="font_Sub_header">fonts/Montserrat-Medium.ttf</string>
<string name="font_para">fonts/Montserrat-Regular.ttf</string>
<string name="font_para_light">fonts/Montserrat-Light.ttf</string>
<string name="font_para_extra_light">fonts/Montserrat-ExtraLight.ttf</string>
<string name="login">Login</string>
<string name="email">Email</string>
<string name="password">Password</string>
<string name="don_t_you_have_an_account">Don\'t you have an account?</string>
<string name="sign_up">Sign Up</string>
<string name="sign_in">Sign In</string>
<string name="name">Name</string>
<string name="confirm_password">Confirm Password</string>
<string name="sign_up_as">Sign Up as: </string>
<string name="consumer">Consumer</string>
<string name="title_activity_home">MainActivity</string>
<string name="title_home">Home</string>
<string name="title_dashboard">Dashboard</string>
<string name="title_notifications">Notifications</string>
</resources>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="EditText">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">45dp</item>
<item name="android:paddingLeft">@dimen/medium</item>
<item name="android:paddingRight">@dimen/medium</item>
<item name="android:maxLines">1</item>
<item name="android:imeOptions">actionNext</item>
<item name="android:textColor">@color/colorPrimaryText</item>
<item name="android:textColorHint">@color/colorPrimaryTextHint</item>
<item name="android:textSize">@dimen/font_size_medium</item>
<item name="android:background">@drawable/bg_edit_text</item>
</style>
<style name="TextView">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">@color/colorPrimaryText</item>
<item name="android:textSize">@dimen/font_size_medium</item>
</style>
<style name="Button">
<item name="android:background">@drawable/bg_button</item>
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">45dp</item>
<item name="android:textColor">@color/colorPrimaryTextAccent</item>
</style>
</resources>
\ No newline at end of file
......@@ -2,15 +2,31 @@
<!-- Base application theme. -->
<style name="Theme.ConsumerProtection" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<!-- Primary brand color. -->
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryVariant">@color/colorPrimaryDark</item>
<item name="colorOnPrimary">@color/white</item>
<!-- Secondary brand color. -->
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorSecondary">@color/colorAccent</item>
<item name="colorSecondaryVariant">@color/colorAccentVariant</item>
<item name="colorOnSecondary">@color/black</item>
<!-- Status bar color. -->
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item>
<!-- Customize your theme here. -->
<item name="android:windowBackground">@color/whiteTwo</item>
</style>
<style name="Fullscreen" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimary</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowFullscreen">true</item>
<item name="android:windowBackground">@drawable/bg_splash</item>
</style>
<style name="ThemeAuthentication" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimary</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowBackground">@color/whiteTwo</item>
</style>
</resources>
\ No newline at end of file
include ':common-libs'
include ':app'
project(':common-libs').projectDir = new File(rootDir, 'android-common-libs/common-libs/')
rootProject.name = "Consumer Protection"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment