This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| reg add HKLM\Software\Policies\Google\Chrome /v RemoteAccessHostRequireCurtain /d 0 /t REG_DWORD /f | |
| reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /d 1 /t REG_DWORD /f | |
| reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v SecurityLayer /d 2 /t REG_DWORD /f | |
| reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /d 1 /t REG_DWORD /f | |
| net stop chromoting | |
| net start chromoting |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $files = Get-ChildItem -Recurse -Filter '*.ts' | |
| foreach ($file in $files) { | |
| ffmpeg.exe -i ($file) ($file -replace '\.ts$', '.mp4') | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun View.doOnWindowInsetsChanged( | |
| listenToAnimation: Boolean = false, | |
| @DispatchMode dispatchMode: Int = DISPATCH_MODE_STOP, | |
| callback: (v: View, insets: WindowInsetsCompat) -> WindowInsetsCompat, | |
| ) { | |
| var isAnimationRunning = false | |
| ViewCompat.setOnApplyWindowInsetsListener(this) { v, insets -> | |
| if (isAnimationRunning) insets else callback(v, insets) | |
| } | |
| if (listenToAnimation) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets -> | |
| val imeInsets = insets.getInsets(WindowInsetsCompat.Type.ime()) | |
| Log.d("Hiking", "onApplyWindowInsets, bottom = ${imeInsets.bottom}") | |
| insets | |
| } | |
| ViewCompat.setWindowInsetsAnimationCallback( | |
| binding.root, | |
| object : WindowInsetsAnimationCompat.Callback(DISPATCH_MODE_STOP) { | |
| override fun onPrepare(animation: WindowInsetsAnimationCompat) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val systemBarInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars()) | |
| val imeInsets = insets.getInsets(WindowInsetsCompat.Type.ime()) | |
| WindowInsetsCompat.Builder(insets) | |
| .setInsets( | |
| WindowInsetsCompat.Type.systemBars(), | |
| Insets.of(0, 0, 0, systemBarInsets.bottom) | |
| ) | |
| .setInsets( | |
| WindowInsetsCompat.Type.ime(), | |
| Insets.of(0, 0, 0, imeInsets.bottom) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| binding.root.updatePadding( | |
| left = systemWindowInsets.left, | |
| right = systemWindowInsets.right, | |
| ) | |
| binding.appBarLayout.updatePadding( | |
| top = systemWindowInsets.top, | |
| ) | |
| binding.recyclerView.updatePadding( | |
| bottom = systemWindowInsets.bottom + 8f.dpToPxSize(v.context), | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val systemWindowInsets = insets.getInsets( | |
| WindowInsetsCompat.Type.systemBars() or WindowInsetsCompat.Type.ime() | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class EdgeToEdgeActivity : ViewBindingActivity<ActivityMainBinding>() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setupWindow() | |
| } | |
| private fun setupWindow() { | |
| WindowCompat.setDecorFitsSystemWindows(window, false) | |
| ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class EdgeToEdgeActivity : ViewBindingActivity<ActivityMainBinding>() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setupWindow() | |
| } | |
| private fun setupWindow() { | |
| WindowCompat.setDecorFitsSystemWindows(window, false) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style name="Theme.App" parent="Theme.Material3.DayNight.NoActionBar"> | |
| <item name="android:statusBarColor">@android:color/transparent</item> | |
| <item name="android:navigationBarColor">@android:color/transparent</item> | |
| <item name="android:windowLightStatusBar">?isLightTheme</item> | |
| <item name="android:windowLightNavigationBar">?isLightTheme</item> | |
| </style> |
NewerOlder