Removed un-used UI layout & related code.

This commit is contained in:
PWRxPSYCHO 2022-03-09 10:24:03 -05:00
parent 0cb30171c1
commit 0df9f8f587
2 changed files with 0 additions and 82 deletions

View file

@ -12,12 +12,10 @@ import androidx.core.graphics.drawable.toBitmap
import androidx.core.view.isVisible
import androidx.fragment.app.activityViewModels
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.RecyclerView
import com.geeksville.android.GeeksvilleApplication
import com.geeksville.android.Logging
import com.geeksville.mesh.NodeInfo
import com.geeksville.mesh.R
import com.geeksville.mesh.databinding.AdapterRegionLayoutBinding
import com.geeksville.mesh.databinding.MapNotAllowedBinding
import com.geeksville.mesh.databinding.MapViewBinding
import com.geeksville.mesh.model.UIViewModel
@ -630,51 +628,6 @@ class MapFragment : ScreenFragment("Map"), Logging {
}
}
}
class ViewHolder(itemView: AdapterRegionLayoutBinding) :
RecyclerView.ViewHolder(itemView.root) {
val offlineRegion: ImageView = itemView.offlineRegion
val regionName: TextView = itemView.regionName
}
private val offlineRegionAdapter = object : RecyclerView.Adapter<ViewHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val inflater = LayoutInflater.from(requireContext())
val regionViewBinding = AdapterRegionLayoutBinding.inflate(inflater, parent, false)
return ViewHolder(regionViewBinding)
}
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
var regionList = mutableListOf<TileRegion>()
val region = regionList[position]
val name = ""
tileStore.getAllTileRegions { expected ->
if (expected.isValue) {
expected.value?.let { tileRegionList ->
regionList = tileRegionList
}
}
}
}
override fun getItemCount(): Int {
var count = 0
tileStore.getAllTileRegions { expected ->
if (expected.isValue) {
expected.value?.let { tileRegionList ->
count = tileRegionList.size
}
}
expected.error?.let { tileRegionError ->
debug("TileRegionError: $tileRegionError")
}
}
return count
}
}
}

View file

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/offline_region"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="@drawable/ic_baseline_settings_input_antenna_24" />
<TextView
android:id="@+id/region_name"
android:layout_width="wrap_content"
android:layout_gravity="center"
android:layout_height="wrap_content"
android:maxWidth="150dp"
android:text="region name"
android:textIsSelectable="true" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>