diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt index e1b41b3c0f..c71ce52471 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/MainActivity.kt @@ -2,6 +2,7 @@ package net.osmand.telegram.ui import android.app.Dialog import android.content.pm.PackageManager +import android.os.Build import android.os.Bundle import android.support.design.widget.BottomNavigationView import android.support.v4.app.DialogFragment @@ -66,6 +67,11 @@ class MainActivity : AppCompatActivity(), TelegramListener, ActionButtonsListene adapter = ViewPagerAdapter(supportFragmentManager) } + if (Build.VERSION.SDK_INT >= 23) { + AndroidUtils.enterToTransparentFullScreen(this) + } else if (Build.VERSION.SDK_INT >= 19) { + AndroidUtils.enterToTranslucentFullScreen(this) + } bottomNav = findViewById(R.id.bottom_navigation).apply { setOnNavigationItemSelectedListener { var pos = -1 diff --git a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt index d1ddb49c9e..3d9af9f7aa 100644 --- a/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt +++ b/OsmAnd-telegram/src/net/osmand/telegram/ui/MyLocationTabFragment.kt @@ -75,16 +75,6 @@ class MyLocationTabFragment : Fragment(), TelegramListener { private var updateEnable: Boolean = false - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - val activity = requireActivity() - if (Build.VERSION.SDK_INT >= 23) { - AndroidUtils.enterToTransparentFullScreen(activity) - } else if (Build.VERSION.SDK_INT >= 19) { - AndroidUtils.enterToTranslucentFullScreen(activity) - } - } - override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?,