rename a few things around and clean imports

This commit is contained in:
dece 2022-01-28 13:41:00 +01:00
parent 3190d608ca
commit 636a096d6f
6 changed files with 12 additions and 14 deletions

View file

@ -47,9 +47,10 @@ android {
dependencies {
def nav_version = "2.3.5"
def room_version = "2.4.1"
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation "androidx.cardview:cardview:1.0.0"
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.fragment:fragment-ktx:1.4.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
@ -59,7 +60,6 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-ktx:$room_version"
implementation "androidx.cardview:cardview:1.0.0"
implementation 'com.google.android.material:material:1.5.0'
kapt "androidx.room:room-compiler:$room_version"
testImplementation 'junit:junit:4.13.2'

View file

@ -8,8 +8,8 @@ import androidx.recyclerview.widget.RecyclerView
import dev.lowrespalmtree.comet.History.HistoryEntry
import dev.lowrespalmtree.comet.databinding.FragmentHistoryItemBinding
class HistoryItemAdapter(private val listener: HistoryItemAdapterListener) :
RecyclerView.Adapter<HistoryItemAdapter.ViewHolder>() {
class HistoryAdapter(private val listener: HistoryItemAdapterListener) :
RecyclerView.Adapter<HistoryAdapter.ViewHolder>() {
private var items = listOf<HistoryEntry>()
interface HistoryItemAdapterListener {

View file

@ -14,7 +14,7 @@ import androidx.lifecycle.viewModelScope
import androidx.navigation.fragment.findNavController
import androidx.recyclerview.widget.LinearLayoutManager
import dev.lowrespalmtree.comet.History.HistoryEntry
import dev.lowrespalmtree.comet.HistoryItemAdapter.HistoryItemAdapterListener
import dev.lowrespalmtree.comet.HistoryAdapter.HistoryItemAdapterListener
import dev.lowrespalmtree.comet.databinding.FragmentHistoryListBinding
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
@ -24,7 +24,7 @@ import kotlinx.coroutines.launch
class HistoryFragment : Fragment(), HistoryItemAdapterListener {
private val vm: HistoryViewModel by viewModels()
private lateinit var binding: FragmentHistoryListBinding
private lateinit var adapter: HistoryItemAdapter
private lateinit var adapter: HistoryAdapter
override fun onCreateView(
inflater: LayoutInflater,
@ -36,7 +36,7 @@ class HistoryFragment : Fragment(), HistoryItemAdapterListener {
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
adapter = HistoryItemAdapter(this)
adapter = HistoryAdapter(this)
binding.list.layoutManager = LinearLayoutManager(requireContext())
binding.list.adapter = adapter

View file

@ -2,16 +2,17 @@ package dev.lowrespalmtree.comet
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import dev.lowrespalmtree.comet.Identities.Identity
import dev.lowrespalmtree.comet.databinding.FragmentIdentityBinding
class IdentityAdapter : RecyclerView.Adapter<HistoryItemAdapter.ViewHolder>() {
private var identities = listOf<Unit>()
class IdentitiesAdapter : RecyclerView.Adapter<HistoryAdapter.ViewHolder>() {
private var identities = listOf<Identity>()
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): HistoryItemAdapter.ViewHolder {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): HistoryAdapter.ViewHolder {
TODO("Not yet implemented")
}
override fun onBindViewHolder(holder: HistoryItemAdapter.ViewHolder, position: Int) {
override fun onBindViewHolder(holder: HistoryAdapter.ViewHolder, position: Int) {
TODO("Not yet implemented")
}

View file

@ -1,8 +1,6 @@
package dev.lowrespalmtree.comet
import android.annotation.SuppressLint
import android.text.SpannableString
import android.text.style.UnderlineSpan
import android.util.Log
import android.view.LayoutInflater
import android.view.View

View file

@ -3,7 +3,6 @@ package dev.lowrespalmtree.comet
import android.app.Activity
import android.content.ActivityNotFoundException
import android.content.Intent
import android.graphics.Typeface
import android.net.Uri
import android.os.Bundle
import android.text.InputType