Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
kamgurgul committed Nov 24, 2023
1 parent 3a27725 commit 93a0620
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ import com.kgurgul.cpuinfo.R
import com.kgurgul.cpuinfo.ui.theme.CpuInfoTheme
import dagger.hilt.android.AndroidEntryPoint

/**
* Base activity which is a host for whole application.
*
* @author kgurgul
*/
@AndroidEntryPoint
class HostActivity : AppCompatActivity() {

Expand Down
24 changes: 0 additions & 24 deletions app/src/main/java/com/kgurgul/cpuinfo/utils/Extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@

package com.kgurgul.cpuinfo.utils

import android.app.Activity
import android.content.Context
import android.content.Intent
import android.net.Uri
import androidx.annotation.IdRes
import androidx.core.view.ViewCompat
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.updatePadding
import com.kgurgul.cpuinfo.R
import kotlin.math.roundToLong

Expand Down Expand Up @@ -73,21 +67,3 @@ fun Context.uninstallApp(packageName: String) {
val uninstallIntent = Intent(Intent.ACTION_UNINSTALL_PACKAGE, uri)
startActivity(uninstallIntent)
}

/**
* !Warning! It will control only top/left/right insets. Register your own one for bottom ones.
*/
fun Activity.setupEdgeToEdge(
@IdRes containerId: Int = android.R.id.content
) {
WindowCompat.setDecorFitsSystemWindows(window, false)
ViewCompat.setOnApplyWindowInsetsListener(findViewById(containerId)) { v, insets ->
val systemInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.updatePadding(
top = systemInsets.top,
left = systemInsets.left,
right = systemInsets.right
)
insets
}
}
51 changes: 0 additions & 51 deletions app/src/main/res/layout/activity_host_layout.xml

This file was deleted.

0 comments on commit 93a0620

Please sign in to comment.