mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-07 03:07:26 +01:00
Minor update to immersive interface.
This commit is contained in:
parent
0736f86e17
commit
14bf98d08a
@ -100,9 +100,7 @@ public class AccountPostsActivity extends BaseActivity implements SortTypeSelect
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
@ -122,9 +121,7 @@ public class AccountSavedThingActivity extends BaseActivity implements ActivityT
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -235,9 +235,7 @@ public class CustomThemePreviewActivity extends AppCompatActivity implements Cus
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
if (immersiveInterface) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -134,9 +134,7 @@ public class FilteredPostsActivity extends BaseActivity implements SortTypeSelec
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -10,7 +10,6 @@ import android.text.Spanned;
|
||||
import android.text.util.Linkify;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.TextView;
|
||||
@ -114,9 +113,7 @@ public class FullMarkdownActivity extends BaseActivity {
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -139,9 +139,7 @@ public class InboxActivity extends BaseActivity implements ActivityToolbarInterf
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
mCoordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
|
||||
drawer.setStatusBarBackgroundColor(Color.TRANSPARENT);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
drawer.setFitsSystemWindows(false);
|
||||
getWindow().setDecorFitsSystemWindows(false);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -106,9 +106,7 @@ public class MultiredditSelectionActivity extends BaseActivity implements Activi
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -100,9 +100,7 @@ public class RulesActivity extends BaseActivity {
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -169,9 +169,7 @@ public class SearchResultActivity extends BaseActivity implements SortTypeSelect
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -92,9 +92,7 @@ public class SearchSubredditsResultActivity extends BaseActivity implements Acti
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -91,9 +91,7 @@ public class SearchUsersResultActivity extends BaseActivity implements ActivityT
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -111,9 +111,7 @@ public class SubredditMultiselectionActivity extends BaseActivity implements Act
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
mCoordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -8,7 +8,6 @@ import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
@ -124,9 +123,7 @@ public class SubredditSelectionActivity extends BaseActivity implements Activity
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -146,9 +146,7 @@ public class SubscribedThingListingActivity extends BaseActivity implements Acti
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -132,9 +132,7 @@ public class TrendingActivity extends BaseActivity {
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -174,9 +174,7 @@ public class ViewMultiRedditDetailActivity extends BaseActivity implements SortT
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
@ -189,11 +187,6 @@ public class ViewMultiRedditDetailActivity extends BaseActivity implements SortT
|
||||
params.bottomMargin += navBarHeight;
|
||||
navigationWrapper.floatingActionButton.setLayoutParams(params);
|
||||
}
|
||||
|
||||
if (navigationWrapper.linearLayoutBottomAppBar != null) {
|
||||
navigationWrapper.linearLayoutBottomAppBar.setPadding(0,
|
||||
navigationWrapper.linearLayoutBottomAppBar.getPaddingTop(), 0, navBarHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -171,9 +171,7 @@ public class ViewPostDetailActivity extends BaseActivity implements SortTypeSele
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
mCoordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -18,7 +18,6 @@ import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||
import androidx.core.graphics.Insets;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowCompat;
|
||||
import androidx.core.view.WindowInsetsAnimationCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@ -138,11 +137,7 @@ public class ViewPrivateMessagesActivity extends BaseActivity implements Activit
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
mCoordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
WindowCompat.setDecorFitsSystemWindows(window, false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
@ -264,10 +264,7 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
/*coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);*/
|
||||
getWindow().setDecorFitsSystemWindows(false);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
@ -279,10 +276,6 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp
|
||||
params.bottomMargin += navBarHeight;
|
||||
navigationWrapper.floatingActionButton.setLayoutParams(params);
|
||||
}
|
||||
if (navigationWrapper.linearLayoutBottomAppBar != null) {
|
||||
navigationWrapper.linearLayoutBottomAppBar.setPadding(0,
|
||||
navigationWrapper.linearLayoutBottomAppBar.getPaddingTop(), 0, navBarHeight);
|
||||
}
|
||||
}
|
||||
|
||||
showToast = true;
|
||||
|
@ -301,9 +301,7 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
@ -315,10 +313,6 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele
|
||||
params.bottomMargin += navBarHeight;
|
||||
navigationWrapper.floatingActionButton.setLayoutParams(params);
|
||||
}
|
||||
if (navigationWrapper.linearLayoutBottomAppBar != null) {
|
||||
navigationWrapper.linearLayoutBottomAppBar.setPadding(0,
|
||||
navigationWrapper.linearLayoutBottomAppBar.getPaddingTop(), 0, navBarHeight);
|
||||
}
|
||||
}
|
||||
showToast = true;
|
||||
}
|
||||
|
@ -143,9 +143,7 @@ public class WikiActivity extends BaseActivity {
|
||||
|
||||
if (isImmersiveInterface()) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
coordinatorLayout.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||
window.setDecorFitsSystemWindows(false);
|
||||
} else {
|
||||
window.setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user