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

Modifications #12

Open
wants to merge 6 commits into
base: master
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
15 changes: 10 additions & 5 deletions app/src/main/java/com/example/dubstep/AddAddressActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class AddAddressActivity extends AppCompatActivity {
TextInputEditText address2EditText;
TextInputEditText cityEditText;
TextInputEditText stateEditText;
TextView pincodeNotFound;
//TextView pincodeNotFound;
FirebaseUser mUser;
FirebaseDatabase mDatabase;
String pincode;
Expand Down Expand Up @@ -82,21 +82,24 @@ protected void onCreate(Bundle savedInstanceState) {
progressDialog.getWindow().setBackgroundDrawableResource(
android.R.color.transparent
);
pincodeEditText.addTextChangedListener(new TextWatcher() {
/*pincodeEditText.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {

}

@Override
/*@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
pincodeNotFound.setVisibility(View.INVISIBLE);
}



@Override
public void afterTextChanged(Editable s) {
}
});
*/
if(getIntent().hasExtra(EXTRA_ADDRESS)) {
setAddress();
} else {
Expand Down Expand Up @@ -226,15 +229,17 @@ public void onFailure(Call<UserAddress> call, Throwable t) {
} else {
//pincodeNotFound.setVisibility(View.VISIBLE);

AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("We do not Deliver to that Pincode yet. Stay tuned for more updates!");
AlertDialog.Builder builder = new AlertDialog.Builder(this,R.style.CustomAlertDialog);
builder.setMessage("We do not deliver to that Pincode yet. Stay tuned for more updates!");
LayoutInflater inflater = getLayoutInflater();
View dialogLayout = inflater.inflate(R.layout.alert_dialog_with_imageview, null);
builder.setPositiveButton(
"OK",
null);
builder.setView(dialogLayout);
builder.show();
View v = getWindow().getDecorView();
v.setBackgroundResource(android.R.color.transparent);
}
progressDialog.dismiss();
}
Expand Down
32 changes: 25 additions & 7 deletions app/src/main/java/com/example/dubstep/Splash_Screen.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
package com.example.dubstep;

import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityOptionsCompat;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;

Expand All @@ -30,7 +34,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash__screen);

dubstep = findViewById(R.id.dubstepText);
dubstep =findViewById(R.id.dubstepText);
dabba = findViewById(R.id.dabbaText);
logo = findViewById(R.id.logoImage);
mAuth = FirebaseAuth.getInstance();
Expand All @@ -40,6 +44,7 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
public void run() {


if(currentUser != null) {
if (currentUser.isEmailVerified()){
if(Splash_Screen.this
Expand All @@ -52,27 +57,40 @@ public void run() {
@Override
public void onSuccess(GetTokenResult getTokenResult) {
IdTokenInstance.setToken(getTokenResult.getToken());
startActivity(new Intent(Splash_Screen.this, MainActivity.class));
Intent intent=new Intent(Splash_Screen.this, MainActivity.class);
ActivityOptionsCompat options = ActivityOptionsCompat.
makeSceneTransitionAnimation(Splash_Screen.this, (View)logo, "imageMain");
startActivity(intent, options.toBundle());
finish();

}
});
}else{
startActivity(new Intent(Splash_Screen.this, LoginActivity.class));
Intent intent=new Intent(Splash_Screen.this, LoginActivity.class);
ActivityOptionsCompat options = ActivityOptionsCompat.
makeSceneTransitionAnimation(Splash_Screen.this, (View)logo, "imageMain");
startActivity(intent, options.toBundle());
finish();

}
} else {
startActivity(new Intent(Splash_Screen.this, LoginActivity.class));
Intent intent=new Intent(Splash_Screen.this, LoginActivity.class);
ActivityOptionsCompat options = ActivityOptionsCompat.
makeSceneTransitionAnimation(Splash_Screen.this, (View)logo, "imageMain");
startActivity(intent, options.toBundle());
finish();

}
} else {
startActivity(new Intent(Splash_Screen.this, LoginActivity.class));
Intent intent=new Intent(Splash_Screen.this, LoginActivity.class);
ActivityOptionsCompat options = ActivityOptionsCompat.
makeSceneTransitionAnimation(Splash_Screen.this, (View)logo, "imageMain");
startActivity(intent, options.toBundle());
finish();

}
}

},SPLASH_SCREEN);
Animation myanim = AnimationUtils.loadAnimation(this,R.anim.splashanimation);
dubstep.startAnimation(myanim);
}
}
8 changes: 7 additions & 1 deletion app/src/main/java/com/example/dubstep/ThankYouActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

Expand Down Expand Up @@ -38,6 +41,7 @@
public class ThankYouActivity extends AppCompatActivity implements PaymentResultWithDataListener {

private static final String TAG = "ThankYouActivity";
ImageView logo;
Button continueButton;
// private ImageView thankYouImage;
// LottieAnimationView animationView;
Expand All @@ -54,7 +58,7 @@ public class ThankYouActivity extends AppCompatActivity implements PaymentResult
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_thank_you);

logo = findViewById(R.id.icon_image_view);
successAnimation = findViewById(R.id.success_animation);
failAnimation = findViewById(R.id.fail_animation);
bgView= findViewById(R.id.bg_view);
Expand Down Expand Up @@ -102,6 +106,8 @@ public void onClick(View view) {
);
}
});
Animation myanim = AnimationUtils.loadAnimation(this,R.anim.splashanimation);
logo.startAnimation(myanim);
}

private void fetchUserData() {
Expand Down
8 changes: 8 additions & 0 deletions app/src/main/res/anim/splashanimation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<alpha
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="2000">

</alpha>
8 changes: 8 additions & 0 deletions app/src/main/res/drawable/gradient_bg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:type="radial"
android:gradientRadius="130%p"
android:startColor="#FFFFFF"
android:endColor="#FF8656" />
</shape>
Binary file modified app/src/main/res/drawable/oops_alert1.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/reset_password.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: 12 additions & 9 deletions app/src/main/res/layout/activity_add_address.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,31 @@

<ImageView
android:id="@+id/imageView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleX="1.3"
android:layout_width="304dp"
android:layout_height="66dp"
android:layout_marginTop="32dp"
android:scaleX="1.3"
android:src="@drawable/ic_brush_stroke"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/add_address_textView"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_width="321dp"
android:layout_height="58dp"
android:layout_marginStart="16dp"
android:layout_marginTop="32dp"
android:layout_width="wrap_content"
android:layout_marginEnd="16dp"
android:padding="12dp"
android:text="Enter New Address"
android:textSize="28sp"
android:textAlignment="center"
android:textSize="30sp"
android:fontFamily="sans-serif-condensed-medium"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -135,7 +138,6 @@

<com.google.android.material.textfield.TextInputLayout
android:hint="City"
android:text="Bhubaneswar"
android:enabled="false"
android:id="@+id/city_editText"
android:inputType="text"
Expand All @@ -150,6 +152,7 @@
app:layout_constraintTop_toBottomOf="@id/address2_editText" >

<com.google.android.material.textfield.TextInputEditText
android:text="Bhubaneshwar"
android:id="@+id/city_editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
Expand All @@ -158,7 +161,6 @@

<com.google.android.material.textfield.TextInputLayout
android:hint="State"
android:text="Odisha"
android:enabled="false"
android:id="@+id/state_editText"
android:inputType="text"
Expand All @@ -172,6 +174,7 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/city_editText" >
<com.google.android.material.textfield.TextInputEditText
android:text="Odisha"
android:id="@+id/state_editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
Expand Down
17 changes: 8 additions & 9 deletions app/src/main/res/layout/activity_cart_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
android:layout_width="wrap_content"
android:text="Cart empty!"
android:padding="4dp"
android:textSize="20sp"
android:textAlignment="center"
android:textSize="30sp"
android:fontFamily="sans-serif-condensed-medium"
android:textStyle="bold"
android:gravity="center"
android:background="@drawable/ic_brush_stroke"
Expand Down Expand Up @@ -56,25 +58,23 @@

<TextView
android:id="@+id/cart_total_textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginTop="16dp"
android:layout_width="wrap_content"
android:layout_marginEnd="16dp"
android:text="@string/cart_total"
android:textAlignment="center"
android:textColor="@color/black"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/DdeliveryTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginTop="8dp"
android:layout_width="wrap_content"
android:layout_marginEnd="16dp"
android:text="@string/delivery_charge"
android:textAlignment="center"
android:textColor="@color/black"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/cart_total_textView" />

Expand All @@ -88,14 +88,13 @@

<TextView
android:id="@+id/total_price_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="4dp"
android:layout_weight="1"
android:layout_width="wrap_content"
android:text="Total Price : ₹ --"
android:textAlignment="center"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
Expand Down
8 changes: 5 additions & 3 deletions app/src/main/res/layout/activity_confirm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
android:padding="25dp"
android:background="@drawable/border"
>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Are you sure?"
android:textSize="25dp"
android:layout_marginBottom="20dp"
/>
android:text="Are you sure?"
android:textSize="26dp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
Expand All @@ -30,6 +30,7 @@
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="Yes"
android:textColor="@android:color/white"
android:layout_marginHorizontal="5dp"
android:background="@drawable/button_rounded"/>

Expand All @@ -38,6 +39,7 @@
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="No"
android:textColor="@android:color/white"
android:layout_marginHorizontal="5dp"
android:background="@drawable/button_rounded"/>
</LinearLayout>
Expand Down
Loading