Skip to content

Commit

Permalink
1. Wallet Activity done
Browse files Browse the repository at this point in the history
2. Wallet integration in OrderSummary done.
  • Loading branch information
banditVedant committed Oct 17, 2023
1 parent 72174cc commit c57598e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 39 deletions.
3 changes: 2 additions & 1 deletion .idea/misc.xml

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

15 changes: 2 additions & 13 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,9 @@
android:name=".ui.NavigationDrawer_Dashboard"
android:exported="true">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />

<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.BROWSABLE" />
<action android:name="android.intent.action.MAIN" />

<data
android:host="bugbazaar"
android:pathPrefix="/dashboard"
android:scheme="bb" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
Expand All @@ -120,11 +113,7 @@
android:name=".ui.Signin"
android:clearTaskOnLaunch="true"
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=".ui.Deeplink"
Expand Down
23 changes: 8 additions & 15 deletions app/src/main/java/com/BugBazaar/ui/NavigationDrawer_Dashboard.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,6 @@ protected void onCreate(Bundle savedInstanceState) {

}


//////////// first check !!!!!!!






/////
// Rest of your activity initialization code

Expand Down Expand Up @@ -264,22 +256,23 @@ public void onDiscountCalculated(double discountedPrice) {
}

private void handleDiscountedPrice(double discountedPrice) {
double finalDiscount=discountedPrice*100;

Toast.makeText(this, "Discounted Price: $" + discountedPrice, Toast.LENGTH_SHORT).show();
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0,new Intent(),0);
// This is the first run, show your notification
AppInitializationManager.showNotification(this);
CustomDialog.showCustomDialog(this, " \uD83C\uDF89 Congratulations \uD83C\uDF89", "You've received a "+ discountedPrice+"voucher.Login to Redeem",pendingIntent);
CustomDialog.showCustomDialog(this, " \uD83C\uDF89 Congratulations!! \uD83C\uDF89", "You've received a "+ finalDiscount+" wallet balance. Login to Redeem.",pendingIntent);
AppInitializationManager.markFirstRunDone(this);

//When click on OK, navigate to Sign-in activity.
Intent intent=new Intent(this,Signin.class);
intent.putExtra("discountedPrice",finalDiscount);
startActivity(intent);


Intent intentz=new Intent(this,Wallet.class);
intentz.putExtra("discountedPrice",finalDiscount);
}

public void fetch_product()
{

}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
Expand Down
1 change: 0 additions & 1 deletion app/src/main/java/com/BugBazaar/ui/Signin.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);



UserAuthSave userAuthSave = new UserAuthSave(getApplicationContext()); // 'this' refers to the Activity's context


Expand Down
18 changes: 11 additions & 7 deletions app/src/main/res/layout/order_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,33 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Order ID: "
android:textSize="20sp"
android:paddingBottom="10dp" />
android:textSize="22sp"
android:paddingBottom="10dp"
android:textColor="@color/black"/>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Products:"
android:textSize="16sp"
android:textStyle="bold" />
android:textSize="18sp"
android:textStyle="bold"
android:textColor="@color/black"/>

<TextView
android:id="@+id/itemsTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="xdxd"
android:textSize="16sp"
android:textStyle="italic"/>
android:textStyle="italic|bold"
android:textColor="@color/main_theme"/>

<TextView
android:id="@+id/orderTotalTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Order Total: "
android:textSize="17sp"
android:paddingBottom="10dp"/>
android:textSize="19sp"
android:paddingBottom="10dp"
android:textColor="@color/black"/>
</LinearLayout>
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ buildscript {
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {

id 'com.android.application' version '8.0.0' apply false
id 'com.android.library' version '8.0.0' apply false
id 'com.android.application' version '8.1.0' apply false
id 'com.android.library' version '8.1.0' apply false
}

0 comments on commit c57598e

Please sign in to comment.