Remove imports and make CameraActivity inherit from BaseActivity
This commit is contained in:
parent
1d4af5bffe
commit
9980d651d2
|
@ -2,7 +2,6 @@ package com.h.pixeldroid
|
|||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import kotlinx.android.synthetic.main.activity_about.*
|
||||
|
||||
class AboutActivity : BaseActivity() {
|
||||
|
|
|
@ -4,7 +4,6 @@ import android.content.Context
|
|||
import android.content.res.Configuration
|
||||
import android.content.res.Resources
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.preference.PreferenceManager
|
||||
import java.util.*
|
||||
|
@ -34,7 +33,7 @@ open class BaseActivity : AppCompatActivity() {
|
|||
.apply { setLocale(locale) }
|
||||
)
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Suppress("DEPRECATION")
|
||||
private fun updateResourcesLocaleLegacy(context: Context, locale: Locale): Context {
|
||||
val resources: Resources = context.resources
|
||||
val configuration: Configuration = resources.configuration
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package com.h.pixeldroid
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.h.pixeldroid.fragments.CameraFragment
|
||||
|
||||
class CameraActivity : AppCompatActivity() {
|
||||
class CameraActivity : BaseActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_camera)
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.h.pixeldroid
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.h.pixeldroid.db.AppDatabase
|
||||
import com.h.pixeldroid.fragments.feeds.uncachedFeeds.accountLists.AccountListFragment
|
||||
import com.h.pixeldroid.objects.Account
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.h.pixeldroid
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import kotlinx.android.synthetic.main.activity_licenses.*
|
||||
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ import android.os.Bundle
|
|||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.browser.customtabs.CustomTabsIntent
|
||||
import com.h.pixeldroid.api.PixelfedAPI
|
||||
import com.h.pixeldroid.db.AppDatabase
|
||||
|
|
|
@ -21,7 +21,6 @@ import android.view.MenuItem
|
|||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.net.toFile
|
||||
|
|
|
@ -3,8 +3,6 @@ package com.h.pixeldroid
|
|||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.h.pixeldroid.api.PixelfedAPI
|
||||
import com.h.pixeldroid.db.AppDatabase
|
||||
import com.h.pixeldroid.di.PixelfedAPIHolder
|
||||
import com.h.pixeldroid.fragments.PostFragment
|
||||
|
@ -13,7 +11,6 @@ import com.h.pixeldroid.objects.Status
|
|||
import com.h.pixeldroid.objects.Status.Companion.DISCOVER_TAG
|
||||
import com.h.pixeldroid.objects.Status.Companion.DOMAIN_TAG
|
||||
import com.h.pixeldroid.objects.Status.Companion.POST_TAG
|
||||
import com.h.pixeldroid.utils.DBUtils
|
||||
import kotlinx.android.synthetic.main.activity_post.*
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
|
|
|
@ -11,7 +11,6 @@ import android.view.View
|
|||
import android.view.ViewGroup
|
||||
import android.widget.Button
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.net.toFile
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
|
|
@ -8,7 +8,6 @@ import android.util.Log
|
|||
import android.view.View
|
||||
import android.widget.*
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.constraintlayout.motion.widget.MotionLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.h.pixeldroid
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
|
|
|
@ -4,7 +4,6 @@ import android.app.SearchManager
|
|||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter
|
||||
import androidx.viewpager2.widget.ViewPager2
|
||||
|
@ -99,18 +98,5 @@ class SearchActivity : BaseActivity() {
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
override fun onNewIntent(intent: Intent) {
|
||||
super.onNewIntent(intent)
|
||||
if (intent.action == Intent.ACTION_SEARCH) {
|
||||
intent.getStringExtra(SearchManager.QUERY)?.also { query ->
|
||||
search(query)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun search(query: String){
|
||||
Log.e("search", "")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue