Skip to content

Commit

Permalink
login Ui Pending
Browse files Browse the repository at this point in the history
  • Loading branch information
prathviksankaliya committed Jan 28, 2023
1 parent 0d95c1a commit 852a9b2
Show file tree
Hide file tree
Showing 22 changed files with 360 additions and 16 deletions.
1 change: 1 addition & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'com.github.MrNouri:DynamicSizes:1.0'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.github.aabhasr1:OtpView:v1.1.2'
}
15 changes: 10 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
android:supportsRtl="true"
android:theme="@style/Theme.Rideo"
tools:targetApi="31">
<activity
android:name=".Activity.LoginActivity"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Activity.UserRideActivity"
android:exported="false" />
Expand All @@ -19,12 +28,8 @@
android:exported="false" />
<activity
android:name=".Activity.MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
android:exported="false">

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.itcraftsolution.raido.Activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.itcraftsolution.raido.Fragments.SplashFragment;
import com.itcraftsolution.raido.R;

import java.util.Objects;

public class LoginActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);

Objects.requireNonNull(getSupportActionBar()).hide();
getSupportFragmentManager().beginTransaction().replace(R.id.frLoginContainer,
new SplashFragment()).addToBackStack(null).commit();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
// Inflate the layout for this fragment
binding = FragmentDetailBinding.inflate(getLayoutInflater());

binding.btnAdd.setOnClickListener(new View.OnClickListener() {
binding.btnAdminJourneyAdd.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Chip chip = new Chip(requireContext());
Expand All @@ -35,19 +35,19 @@ public void onClick(View view) {
chip.setClickable(false);
chip.setChipIconResource(R.drawable.baseline_location_on_24);
chip.setPadding(60, 10, 60, 10);
chip.setText(binding.AdminJourneyLocChips.getText());
chip.setText(binding.txAdminJourneyLocChips.getText());
chip.setOnCloseIconClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
binding.AdminLocationChip.removeView(chip);
binding.chGpAdminLocationChip.removeView(chip);
}
});
binding.AdminLocationChip.addView(chip);
binding.AdminJourneyLocChips.setText("");
binding.chGpAdminLocationChip.addView(chip);
binding.txAdminJourneyLocChips.setText("");
}
});

binding.btnSave.setOnClickListener(new View.OnClickListener() {
binding.btnAdminJourneySave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
showSelections();
Expand All @@ -58,12 +58,12 @@ public void onClick(View view) {

private void showSelections()
{
int count = binding.AdminLocationChip.getChildCount();
int count = binding.chGpAdminLocationChip.getChildCount();

String s = null;
for(int i = 0; i < count; i++)
{
Chip chip = (Chip) binding.AdminLocationChip.getChildAt(i);
Chip chip = (Chip) binding.chGpAdminLocationChip.getChildAt(i);
if(s == null)
{
s = chip.getText().toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
// Inflate the layout for this fragment
binding = FragmentHomeBinding.inflate(getLayoutInflater());

binding.AdminDate.setOnClickListener(new View.OnClickListener() {
binding.edAdminHomeDate.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Calendar c = Calendar.getInstance();
Expand All @@ -38,15 +38,15 @@ public void onClick(View view) {
@Override
public void onDateSet(DatePicker datePicker, int i, int i1, int i2) {
int monthDate = i1 + 1;
binding.AdminDate.setText( i2 + "/" + monthDate + "/" + i);
binding.edAdminHomeDate.setText( i2 + "/" + monthDate + "/" + i);
}
}, year, month, day);

datePickerDialog.show();
}
});

binding.AdminNext.setOnClickListener(new View.OnClickListener() {
binding.btnAdminHomeNext.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// String carName = binding.AdminCarName.getText().toString();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.itcraftsolution.raido.Fragments;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.itcraftsolution.raido.R;
import com.itcraftsolution.raido.databinding.FragmentLoginBinding;

public class LoginFragment extends Fragment {

private FragmentLoginBinding binding;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
binding = FragmentLoginBinding.inflate(getLayoutInflater());

return binding.getRoot();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.itcraftsolution.raido.Fragments;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.itcraftsolution.raido.R;
import com.itcraftsolution.raido.databinding.FragmentSignInBinding;

public class SignInFragment extends Fragment {

private FragmentSignInBinding binding;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
binding = FragmentSignInBinding.inflate(getLayoutInflater());


return binding.getRoot();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package com.itcraftsolution.raido.Fragments;

import android.os.Bundle;

import androidx.fragment.app.Fragment;

import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.itcraftsolution.raido.R;
import com.itcraftsolution.raido.databinding.FragmentSplashBinding;

public class SplashFragment extends Fragment {

private FragmentSplashBinding binding;

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
binding = FragmentSplashBinding.inflate(getLayoutInflater());

new Handler().postDelayed(new Runnable() {
@Override
public void run() {
getParentFragmentManager().beginTransaction().replace(R.id.frLoginContainer,
new LoginFragment()).addToBackStack(null).commit();
}
}, 1100);
return binding.getRoot();
}
}
5 changes: 5 additions & 0 deletions app/src/main/res/drawable/baseline_call_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#000000"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M20.01,15.38c-1.23,0 -2.42,-0.2 -3.53,-0.56 -0.35,-0.12 -0.74,-0.03 -1.01,0.24l-1.57,1.97c-2.83,-1.35 -5.48,-3.9 -6.89,-6.83l1.95,-1.66c0.27,-0.28 0.35,-0.67 0.24,-1.02 -0.37,-1.11 -0.56,-2.3 -0.56,-3.53 0,-0.54 -0.45,-0.99 -0.99,-0.99H4.19C3.65,3 3,3.24 3,3.99 3,13.28 10.73,21 20.01,21c0.71,0 0.99,-0.63 0.99,-1.18v-3.45c0,-0.54 -0.45,-0.99 -0.99,-0.99z"/>
</vector>
Binary file added app/src/main/res/drawable/bg1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/bg2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/bg3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/bg4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions app/src/main/res/drawable/box_strock.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">

<corners
android:radius="@dimen/_6mdp"
/>

<stroke
android:color="#8F000000"
android:width="@dimen/_1mdp"
/>

</shape>
Binary file added app/src/main/res/drawable/carsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/google.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions app/src/main/res/drawable/signin_btn.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">

<corners
android:radius="@dimen/_10mdp"
/>
<solid
android:color="@color/transparaWhite"
/>
</shape>
Binary file added app/src/main/res/drawable/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions app/src/main/res/layout/activity_login.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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=".Activity.LoginActivity">

<androidx.fragment.app.FragmentContainerView
android:id="@+id/frLoginContainer"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5"
tools:layout="@layout/fragment_splash" />

</androidx.constraintlayout.widget.ConstraintLayout>
Loading

0 comments on commit 852a9b2

Please sign in to comment.