diff --git a/app/build.gradle b/app/build.gradle index e56b2ce..bbf6100 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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' diff --git a/app/src/main/java/dev/lowrespalmtree/comet/HistoryItemAdapter.kt b/app/src/main/java/dev/lowrespalmtree/comet/HistoryAdapter.kt similarity index 91% rename from app/src/main/java/dev/lowrespalmtree/comet/HistoryItemAdapter.kt rename to app/src/main/java/dev/lowrespalmtree/comet/HistoryAdapter.kt index d101844..995ad17 100644 --- a/app/src/main/java/dev/lowrespalmtree/comet/HistoryItemAdapter.kt +++ b/app/src/main/java/dev/lowrespalmtree/comet/HistoryAdapter.kt @@ -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() { +class HistoryAdapter(private val listener: HistoryItemAdapterListener) : + RecyclerView.Adapter() { private var items = listOf() interface HistoryItemAdapterListener { diff --git a/app/src/main/java/dev/lowrespalmtree/comet/HistoryFragment.kt b/app/src/main/java/dev/lowrespalmtree/comet/HistoryFragment.kt index 274f556..71df557 100644 --- a/app/src/main/java/dev/lowrespalmtree/comet/HistoryFragment.kt +++ b/app/src/main/java/dev/lowrespalmtree/comet/HistoryFragment.kt @@ -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 diff --git a/app/src/main/java/dev/lowrespalmtree/comet/IdentityAdapter.kt b/app/src/main/java/dev/lowrespalmtree/comet/IdentitiesAdapter.kt similarity index 63% rename from app/src/main/java/dev/lowrespalmtree/comet/IdentityAdapter.kt rename to app/src/main/java/dev/lowrespalmtree/comet/IdentitiesAdapter.kt index 398a3f4..473b0c1 100644 --- a/app/src/main/java/dev/lowrespalmtree/comet/IdentityAdapter.kt +++ b/app/src/main/java/dev/lowrespalmtree/comet/IdentitiesAdapter.kt @@ -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() { - private var identities = listOf() +class IdentitiesAdapter : RecyclerView.Adapter() { + private var identities = listOf() - 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") } diff --git a/app/src/main/java/dev/lowrespalmtree/comet/PageAdapter.kt b/app/src/main/java/dev/lowrespalmtree/comet/PageAdapter.kt index f29649e..0e37337 100644 --- a/app/src/main/java/dev/lowrespalmtree/comet/PageAdapter.kt +++ b/app/src/main/java/dev/lowrespalmtree/comet/PageAdapter.kt @@ -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 diff --git a/app/src/main/java/dev/lowrespalmtree/comet/PageFragment.kt b/app/src/main/java/dev/lowrespalmtree/comet/PageFragment.kt index 9be03e7..86f9d7a 100644 --- a/app/src/main/java/dev/lowrespalmtree/comet/PageFragment.kt +++ b/app/src/main/java/dev/lowrespalmtree/comet/PageFragment.kt @@ -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