Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
import android.os.Handler;
import android.view.ViewTreeObserver;
import android.view.animation.AnimationUtils;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.ViewFlipper;
Expand All @@ -27,7 +25,6 @@
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet;
import androidx.core.app.ActivityCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.transition.ChangeBounds;
import androidx.transition.Fade;
import androidx.transition.TransitionManager;
Expand All @@ -40,7 +37,6 @@
import com.brainwallet.presenter.activities.util.BRActivity;
import com.brainwallet.presenter.customviews.BRNotificationBar;
import com.brainwallet.presenter.history.HistoryFragment;
import com.brainwallet.tools.animation.BRAnimator;
import com.brainwallet.tools.animation.TextSizeTransition;
import com.brainwallet.tools.manager.AnalyticsManager;
import com.brainwallet.tools.manager.BRSharedPrefs;
Expand All @@ -63,7 +59,6 @@
import com.brainwallet.wallet.BRPeerManager;
import com.brainwallet.wallet.BRWalletManager;
import com.google.android.gms.tasks.Task;
import com.google.android.material.bottomnavigation.BottomNavigationView;
import com.google.android.material.navigation.NavigationView;
import com.google.android.play.core.review.ReviewInfo;
import com.google.android.play.core.review.ReviewManager;
Expand All @@ -77,15 +72,9 @@ public class BreadActivity extends BRActivity implements BRWalletManager.OnBalan
TransactionDataSource.OnTxAddedListener, InternetManager.ConnectionReceiverListener {

public static final Point screenParametersPoint = new Point();
private static final float PRIMARY_TEXT_SIZE = 24f;
private static final float SECONDARY_TEXT_SIZE = 12.8f;
private int mSelectedBottomNavItem = -1;

private InternetManager mConnectionReceiver;
private Button primaryPrice;
private Button secondaryPrice;
private TextView equals;
private ImageButton menuBut;
private TextView balanceTxtV;

public static boolean appVisible = false;
Expand All @@ -94,11 +83,9 @@ public class BreadActivity extends BRActivity implements BRWalletManager.OnBalan
private boolean uiIsDone;

private static BreadActivity app;
private BottomNavigationView bottomNav;

private Handler mHandler = new Handler();
private NavigationView navigationDrawer;
private DrawerLayout drawerLayout;
private HomeSettingDrawerComposeView homeSettingDrawerComposeView;

public static BreadActivity getApp() {
Expand All @@ -115,12 +102,7 @@ protected void onCreate(Bundle savedInstanceState) {
app = this;
getWindowManager().getDefaultDisplay().getSize(screenParametersPoint);

setListeners();

primaryPrice.setTextSize(PRIMARY_TEXT_SIZE);
secondaryPrice.setTextSize(SECONDARY_TEXT_SIZE);
onConnectionChanged(InternetManager.getInstance().isConnected(this));
bottomNav.setSelectedItemId(R.id.nav_history);
}

private void addObservers() {
Expand All @@ -147,25 +129,6 @@ protected void onNewIntent(Intent intent) {
setUrlHandler(intent);
}

private void setListeners() {
bottomNav.setOnNavigationItemSelectedListener(item -> handleNavigationItemSelected(item.getItemId()));

menuBut.setOnClickListener(v -> {
if (BRAnimator.isClickAllowed()) {
drawerLayout.open();
}
});
}

public boolean handleNavigationItemSelected(int menuItemId) {
if (mSelectedBottomNavItem == menuItemId) return true;
mSelectedBottomNavItem = menuItemId;
//TODO: Removal as Compose Send workflow is live and in Production
// Will remove as cruft as a backlog item

return true;
}

@Override
protected void onRestart() {
super.onRestart();
Expand Down
54 changes: 2 additions & 52 deletions app/src/main/res/layout/activity_bread.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<androidx.drawerlayout.widget.DrawerLayout 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:id="@+id/drawerLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:openDrawer="start">
Expand Down Expand Up @@ -71,23 +70,9 @@
android:text="@string/ManageWallet.balance"
android:textColor="@color/white"
android:textSize="18sp"
app:layout_constraintBottom_toTopOf="@+id/primary_price"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />

<Button
android:id="@+id/primary_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:fontFamily="@font/ibm_plex_sans_medium"
android:minWidth="0dp"
android:minHeight="0dp"
android:textColor="@color/white"
android:textSize="30sp"
tools:ignore="MissingConstraints"
tools:text="$1000.00" />
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/equals"
Expand All @@ -99,31 +84,6 @@
android:textSize="14sp"
tools:ignore="MissingConstraints" />

<Button
android:id="@+id/secondary_price"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:fontFamily="@font/ibm_plex_sans_medium"
android:gravity="start"
android:minWidth="0dp"
android:minHeight="0dp"
android:textColor="@color/white"
android:textSize="16sp"
tools:ignore="MissingConstraints"
tools:text="L100" />

<ImageButton
android:id="@+id/menuBut"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:src="@drawable/ic_menu"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.Toolbar>

Expand All @@ -135,18 +95,8 @@
android:id="@+id/fragment_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/bottomNav"
android:layout_below="@+id/toolbar_layout" />

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bottomNav"
style="@style/BottomNavTheme"
android:layout_width="match_parent"
android:layout_height="64dp"
android:layout_alignParentBottom="true"
app:labelVisibilityMode="labeled"
tools:menu="@menu/bottom_nav_menu" />

</RelativeLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
Expand Down
22 changes: 0 additions & 22 deletions app/src/main/res/menu/bottom_nav_menu.xml

This file was deleted.

Loading