Skip to content

Commit

Permalink
bug fix for crashing while opening pages and tab it was related to th…
Browse files Browse the repository at this point in the history
…eme conflict
  • Loading branch information
yashkite committed Nov 6, 2024
1 parent 047b7d8 commit fc4149e
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 88 deletions.
5 changes: 2 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@
<activity
android:name=".ui.dashboard.DashboardActivity"
android:theme="@style/Theme.UMoney.Dashboard" />
<activity android:name=".ui.profile.ProfileActivity" />
<activity android:name=".ui.profile.ProfileActivity" android:theme="@style/Theme.UMoney.NoActionBar" />
<activity
android:name=".ui.about.AboutActivity"
android:exported="false"
android:theme="@style/Theme.UMoney"/>
android:theme="@style/Theme.UMoney.NoActionBar" />
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ public class TransactionEntryDialog extends BottomSheetDialog {
private SimpleDateFormat dateTimeFormatter;

private static final Map<String, String[]> CATEGORIES = new HashMap<String, String[]>() {{
put("NEEDS", new String[]{"Rent", "Groceries", "Utilities", "Transportation"});
put("WANTS", new String[]{"Entertainment", "Shopping", "Dining", "Travel"});
put("SAVINGS", new String[]{"Emergency Fund", "Investment", "Goals", "Retirement"});
put("NEEDS", new String[]{"Food", "Transportation", "Housing", "Utilities", "Healthcare", "Education"});
put("WANTS", new String[]{"Entertainment", "Shopping", "Dining", "Travel", "Hobbies", "Gadgets"});
put("SAVINGS", new String[]{"Emergency Fund", "Retirement", "Investment", "Goals", "Insurance"});
put("INCOME", new String[]{"Salary", "Freelance", "Business", "Investment", "Rental", "Other"});
}};

public TransactionEntryDialog(@NonNull Context context, String type, TransactionEntryListener listener) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected void setupObservers() {
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);

FloatingActionButton fab = view.findViewById(R.id.fab_action);
FloatingActionButton fab = view.findViewById(R.id.fab_add_income);
fab.setImageResource(R.drawable.ic_add);
fab.setOnClickListener(v -> showAddTransactionDialog());
}
Expand Down
168 changes: 88 additions & 80 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
@@ -1,104 +1,112 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
<LinearLayout
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="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">

<LinearLayout
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:elevation="4dp"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>

<ImageView
android:id="@+id/app_logo"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_gravity="center"
android:layout_marginTop="32dp"
android:src="@mipmap/umoneylogo"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">

<TextView
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="16dp"
android:text="UMoney"
android:textSize="24sp"
android:textStyle="bold"/>
android:orientation="vertical"
android:padding="16dp">

<TextView
android:id="@+id/app_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:text="Version 1.0.0"/>
<ImageView
android:id="@+id/app_logo"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_gravity="center"
android:layout_marginTop="32dp"
android:src="@mipmap/umoneylogo"/>

<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="16dp"
android:text="UMoney"
android:textSize="24sp"
android:textStyle="bold"/>

<LinearLayout
<TextView
android:id="@+id/app_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:text="Version 1.0.0"/>

<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
android:layout_marginTop="32dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp">

<TextView
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="About UMoney"
android:textSize="18sp"
android:textStyle="bold"/>
android:orientation="vertical"
android:padding="16dp">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="UMoney is your personal finance tracker that helps you manage your expenses and income. It automatically categorizes your transactions into needs, wants, and savings to help you maintain a healthy financial lifestyle."/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="About UMoney"
android:textSize="18sp"
android:textStyle="bold"/>

<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="UMoney is your personal finance tracker that helps you manage your expenses and income. It automatically categorizes your transactions into needs, wants, and savings to help you maintain a healthy financial lifestyle."/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>

<LinearLayout
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="16dp">
android:layout_marginTop="16dp"
app:cardCornerRadius="8dp"
app:cardElevation="4dp">

<TextView
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Contact Us"
android:textSize="18sp"
android:textStyle="bold"/>
android:orientation="vertical"
android:padding="16dp">

<TextView
android:id="@+id/email_support"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="[email protected]"
android:textColor="@color/design_default_color_primary"/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</ScrollView>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Contact Us"
android:textSize="18sp"
android:textStyle="bold"/>

<TextView
android:id="@+id/email_support"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="[email protected]"
android:textColor="@color/design_default_color_primary"/>
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</ScrollView>
</LinearLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_profile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/primary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"/>
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>

</com.google.android.material.appbar.AppBarLayout>

Expand Down
5 changes: 5 additions & 0 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

<style name="Theme.UMoney.NoActionBar" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>
</resources>

0 comments on commit fc4149e

Please sign in to comment.