1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-30 05:52:57 +01:00

Hide Permissions title when action bar is visible

This commit is contained in:
Arjan Schrijver 2024-06-14 22:54:48 +02:00
parent 6d6c461a6a
commit 12cb5627f8
2 changed files with 7 additions and 0 deletions

View File

@ -27,6 +27,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.LinearLayoutManager;
@ -66,6 +67,11 @@ public class WelcomeFragmentPermissions extends Fragment {
requestAllPermissions();
});
if (((AppCompatActivity)getActivity()).getSupportActionBar().isShowing()) {
// Hide title when the Action Bar is visible (i.e. when not in the first run flow)
view.findViewById(R.id.permissions_title).setVisibility(View.GONE);
}
// Initialize RecyclerView and data
permissionsListView = view.findViewById(R.id.permissions_list);

View File

@ -7,6 +7,7 @@
android:padding="8dp">
<TextView
android:id="@+id/permissions_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"