Skip to content

Commit

Permalink
chore: more larger touch area(cafetria info btn)
Browse files Browse the repository at this point in the history
  • Loading branch information
HI-JIN2 committed Sep 26, 2024
1 parent 9284d2b commit 06886bd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ class MenuAdapter(
sectionModel: Section
) {


binding.btnInfo.setOnClickListener {
binding.llCafeteriaInfo.setOnClickListener {

val modalBottomSheet =
InfoBottomSheetFragment.newInstance(sectionModel.cafeteria.name)
Expand Down
18 changes: 2 additions & 16 deletions app/src/main/java/com/eatssu/android/ui/main/menu/MenuFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import android.view.View
import android.view.ViewGroup
import androidx.annotation.RequiresApi
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.fragment.app.activityViewModels
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.LinearLayoutManager
Expand Down Expand Up @@ -50,11 +50,9 @@ class MenuFragment : Fragment() {

private val totalMenuList = ArrayList<Section>()

// private lateinit var infoViewModel: InfoViewModel
private lateinit var restaurantType: Restaurant
// private lateinit var firebaseRemoteConfigRepository: FirebaseRemoteConfigRepository

private val infoViewModel: InfoViewModel by viewModels()
private val infoViewModel: InfoViewModel by activityViewModels()


companion object {
Expand All @@ -76,13 +74,6 @@ class MenuFragment : Fragment() {
savedInstanceState: Bundle?,
): View {
_binding = FragmentMenuBinding.inflate(inflater, container, false)

// firebaseRemoteConfigRepository = FirebaseRemoteConfigRepository()
// infoViewModel = ViewModelProvider(
// this,
// InfoViewModelFactory(firebaseRemoteConfigRepository)
// )[InfoViewModel::class.java]

return binding.root
}

Expand All @@ -93,11 +84,6 @@ class MenuFragment : Fragment() {
observeViewModel()
}

override fun onResume() {
super.onResume()

}

@RequiresApi(Build.VERSION_CODES.O)
fun observeViewModel() {
menuService = RetrofitImpl.retrofit.create(MenuService::class.java)
Expand Down
9 changes: 9 additions & 0 deletions app/src/main/res/layout/item_cafeteria_section.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
android:text="@string/student_cafeteria"
android:textColor="@color/black" />

<LinearLayout
android:id="@+id/ll_cafeteria_info"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="center">


<TextView
android:id="@+id/tv_cafeteria_location"
style="@style/Caption3"
Expand All @@ -49,6 +56,8 @@
android:gravity="start"
android:scaleType="fitCenter"
android:src="@drawable/ic_info_12" />
</LinearLayout>

</LinearLayout>


Expand Down

0 comments on commit 06886bd

Please sign in to comment.