Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
remove unnecessary buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
g4rb4g3 committed Apr 1, 2021
1 parent a75e350 commit 9d6c6cd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 59 deletions.
16 changes: 0 additions & 16 deletions app/src/main/java/g4rb4g3/at/abrptransmitter/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,6 @@ protected void onCreate(Bundle savedInstanceState) {
viewPager.setAdapter(mSectionsPageAdapter);
mTabs = findViewById(R.id.tabs);
mTabs.setupWithViewPager(viewPager);

TextClock textClock = findViewById(R.id.textclock);

Button btnToggleFullscreen = findViewById(R.id.btn_toggle_fullscreen);
btnToggleFullscreen.setOnClickListener(v -> {
if (!mFullscreen) {
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN);
btnToggleFullscreen.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(R.drawable.ic_fullscreen_exit), null, null, null);
textClock.setVisibility(View.VISIBLE);
} else {
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
btnToggleFullscreen.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(R.drawable.ic_fullscreen), null, null, null);
textClock.setVisibility(View.GONE);
}
mFullscreen = !mFullscreen;
});
}

@Override
Expand Down
43 changes: 0 additions & 43 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,47 +24,4 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:orientation="horizontal">

<Button
android:id="@+id/btn_toggle_fullscreen"
android:layout_width="48dp"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_fullscreen"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<Button
android:id="@+id/btn_reload_abrp"
android:layout_width="48dp"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_refresh"
android:visibility="invisible"
app:layout_constraintStart_toEndOf="@+id/btn_toggle_fullscreen"
app:layout_constraintTop_toTopOf="parent" />

<Button
android:id="@+id/btn_get_abrp_token"
android:layout_width="48dp"
android:layout_height="wrap_content"
android:drawableLeft="@drawable/ic_get_token"
android:visibility="invisible"
app:layout_constraintStart_toEndOf="@+id/btn_reload_abrp"
app:layout_constraintTop_toTopOf="parent" />

<TextClock
android:id="@+id/textclock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:format12Hour="hh:mm"
android:textSize="32sp"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

0 comments on commit 9d6c6cd

Please sign in to comment.