Skip to content

Commit

Permalink
incognito view fix (#89)
Browse files Browse the repository at this point in the history
* auto pip

* undo
  • Loading branch information
aayush2622 authored Dec 19, 2023
1 parent 11d04ec commit 0bacfb8
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 37 deletions.
4 changes: 3 additions & 1 deletion app/src/main/java/ani/dantotsu/home/AnimePageAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ class AnimePageAdapter : RecyclerView.Adapter<AnimePageAdapter.AnimePageViewHold
?.getBoolean("incognito", false) ?: false
if(incognito) {
binding.incognitoTextView.visibility = View.VISIBLE
binding.incognitoView.visibility = View.VISIBLE
if (!uiSettings.immersiveMode) {
binding.root.fitsSystemWindows = true
}
}

binding.animeTitleContainer.updatePadding(top = statusBarHeight)
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/ani/dantotsu/home/HomeFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ class HomeFragment : Fragment() {
?.getBoolean("incognito", false) ?: false
if(incognito) {
binding.incognitoTextView.visibility = View.VISIBLE
binding.incognitoView.visibility = View.VISIBLE
if (!uiSettings.immersiveMode) {
binding.root.fitsSystemWindows = true
}
}
binding.homeUserAvatarContainer.setSafeOnClickListener {
val dialogFragment =
Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/ani/dantotsu/home/MangaPageAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ class MangaPageAdapter : RecyclerView.Adapter<MangaPageAdapter.MangaPageViewHold
?.getBoolean("incognito", false) ?: false
if(incognito) {
binding.incognitoTextView.visibility = View.VISIBLE
binding.incognitoView.visibility = View.VISIBLE
if (!uiSettings.immersiveMode) {
binding.root.fitsSystemWindows = true
}
}

binding.mangaTitleContainer.updatePadding(top = statusBarHeight)
Expand Down
27 changes: 9 additions & 18 deletions app/src/main/res/layout/fragment_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,17 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/incognitoView"
<TextView
android:id="@+id/incognitoTextView"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:orientation="horizontal"
android:text="Incognito Mode"
android:fontFamily="@font/poppins_bold"
android:textSize="15sp"
android:textColor="#4f2dbd"
android:layout_gravity="bottom|center_horizontal"
android:padding="8dp"
android:visibility="gone"/>

<TextView
android:id="@+id/incognitoTextView"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Incognito Mode"
android:fontFamily="@font/poppins_bold"
android:textSize="11sp"
android:textColor="#4f2dbd"
android:layout_gravity="bottom|center_horizontal"
android:background="#00FFFFFF"
android:padding="8dp"
android:visibility="gone"/>

<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
Expand Down
9 changes: 1 addition & 8 deletions app/src/main/res/layout/item_anime_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,14 @@
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:orientation="vertical">
<LinearLayout
android:id="@+id/incognitoView"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:orientation="horizontal"
android:background="?attr/colorPrimary"
android:visibility="gone"/>

<TextView
android:id="@+id/incognitoTextView"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Incognito Mode"
android:fontFamily="@font/poppins_bold"
android:textSize="11sp"
android:textSize="15sp"
android:textColor="#4f2dbd"
android:layout_gravity="bottom|center_horizontal"
android:background="#00FFFFFF"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/item_anime_watch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:backgroundTint="@color/yt_red"
android:visibility="gone"
android:insetTop="0dp"
android:insetBottom="0dp"
android:text="@string/play_yt"
Expand Down
9 changes: 1 addition & 8 deletions app/src/main/res/layout/item_manga_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,14 @@
android:layout_marginStart="-16dp"
android:layout_marginEnd="-16dp"
android:orientation="vertical">
<LinearLayout
android:id="@+id/incognitoView"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:orientation="horizontal"
android:background="?attr/colorPrimary"
android:visibility="gone"/>

<TextView
android:id="@+id/incognitoTextView"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Incognito Mode"
android:fontFamily="@font/poppins_bold"
android:textSize="11sp"
android:textSize="15sp"
android:textColor="#4f2dbd"
android:layout_gravity="bottom|center_horizontal"
android:background="#00FFFFFF"
Expand Down

0 comments on commit 0bacfb8

Please sign in to comment.