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

Vedant #23

Merged
merged 6 commits into from
Oct 10, 2023
Merged
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
3 changes: 2 additions & 1 deletion .idea/deploymentTargetDropDown.xml

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

8 changes: 8 additions & 0 deletions .idea/misc.xml

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

3 changes: 1 addition & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ dependencies {
implementation 'androidx.cardview:cardview:1.0.0'
implementation group: 'com.cloudinary', name: 'cloudinary-android', version: '1.24.0'
implementation 'com.google.android.material:material:1.4.0' // Use the latest version


implementation 'com.razorpay:checkout:1.6.33'

}
19 changes: 17 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_CONTACTS"> </uses-permission>

<uses-permission android:name="android.permission.READ_CONTACTS" />

<permission android:name="com.BugBazaar.permission.contacts" android:protectionLevel="signature"/>


<queries>
<intent>
<action android:name="android.intent.action.PICK" />
Expand All @@ -34,6 +37,18 @@
tools:replace="android:fullBackupContent"
tools:targetApi="31"
tools:ignore="CustomPermissionTypo">
<activity
android:name=".ui.payment.OrderHistory"
android:exported="false" />
<activity
android:name=".ui.payment.OrderSummary"
android:exported="true" />
<activity
android:name=".ui.TestActivity"
android:exported="true" />
<activity
android:name=".ui.payment.TestRazorPay"
android:exported="true" />
<activity
android:name=".ui.ContactsPack.SelectContacts"
android:exported="true" />
Expand All @@ -42,7 +57,7 @@
android:exported="true" />
<activity
android:name=".ui.cart.CartActivity"
android:exported="false" />
android:exported="true" />
<activity
android:name=".ui.cart.Cart"
android:exported="false" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ public void onClick(View v) {
String filteredList = null;
Log.d("Exception",filteredList);
}

});

//Drawer and Navigation bar layout view find
Expand Down
32 changes: 28 additions & 4 deletions app/src/main/java/com/BugBazaar/ui/TestActivity.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.BugBazaar.ui;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;

import com.BugBazaar.R;

Expand All @@ -12,5 +14,27 @@ public class TestActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);

RadioGroup radioGroup = findViewById(R.id.radioGroup);
RadioButton radioButton1 = findViewById(R.id.radioButton1);
RadioButton radioButton2 = findViewById(R.id.radioButton2);

// Set OnClickListener for the first RadioButton
radioButton1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Show a toast when the first RadioButton is clicked
Toast.makeText(TestActivity.this, "First Clicked", Toast.LENGTH_SHORT).show();
}
});

// Set OnClickListener for the second RadioButton
radioButton2.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Show a toast when the second RadioButton is clicked
Toast.makeText(TestActivity.this, "Second Clicked", Toast.LENGTH_SHORT).show();
}
});
}
}
}
1 change: 0 additions & 1 deletion app/src/main/java/com/BugBazaar/ui/cart/Cart.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public Cart() {
private SQLiteDatabase database;



public long addCartItem(CartItem cartItem) {
ContentValues values = new ContentValues();
if (cartItems.containsKey(cartItem)) {
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/java/com/BugBazaar/ui/cart/CartActivity.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package com.BugBazaar.ui.cart;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
Expand All @@ -12,6 +13,8 @@
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.BugBazaar.R;
import com.BugBazaar.ui.payment.OrderSummary;

import java.util.List;
import java.util.Locale;

Expand Down Expand Up @@ -93,7 +96,9 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
public void onClick(View v) {
// Perform the checkout action here
Toast.makeText(CartActivity.this, "Checkout clicked", Toast.LENGTH_SHORT).show();
Intent intentz=new Intent(CartActivity.this, OrderSummary.class);
intentz.putExtra("totalPrice",totalCost);
startActivity(intentz);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ public long addCartItem(CartItem cartItem) {
return recordId;

}

//To Debug
public void removeCartItem(CartItem cartItem) {
SQLiteDatabase db = this.getWritableDatabase();
Log.d("removeid",String.valueOf(cartItem.getId()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.provider.BaseColumns;


public final class CartItemDBModel {
// To prevent someone from accidentally instantiating the contract class,
// make the constructor private.
Expand Down
16 changes: 16 additions & 0 deletions app/src/main/java/com/BugBazaar/ui/payment/OrderHistory.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.BugBazaar.ui.payment;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.BugBazaar.R;

public class OrderHistory extends AppCompatActivity {

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