@@ -20,9 +20,7 @@ import android.view.ViewGroup
2020import android.widget.LinearLayout
2121import androidx.annotation.RequiresApi
2222import androidx.appcompat.widget.AppCompatTextView
23- import androidx.appcompat.widget.LinearLayoutCompat
2423import androidx.biometric.BiometricPrompt
25- import androidx.constraintlayout.widget.ConstraintLayout
2624import androidx.core.content.ContextCompat
2725import androidx.fragment.app.Fragment
2826import androidx.fragment.app.viewModels
@@ -48,7 +46,6 @@ import com.github.droidworksstudio.launcher.helper.PreferenceHelper
4846import com.github.droidworksstudio.launcher.listener.OnItemClickedListener
4947import com.github.droidworksstudio.launcher.listener.OnSwipeTouchListener
5048import com.github.droidworksstudio.launcher.listener.ScrollEventListener
51- import com.github.droidworksstudio.launcher.listener.ViewSwipeTouchListener
5249import com.github.droidworksstudio.launcher.ui.bottomsheetdialog.AppInfoBottomSheetFragment
5350import com.github.droidworksstudio.launcher.utils.Constants
5451import com.github.droidworksstudio.launcher.viewmodel.AppViewModel
@@ -234,16 +231,6 @@ class HomeFragment : Fragment(),
234231 clock.setOnClickListener { context.launchClock() }
235232 date.setOnClickListener { context.launchCalendar() }
236233 battery.setOnClickListener { context.openBatteryManager() }
237-
238- val appListViews =
239- layoutInflater.inflate(R .layout.item_home, null ) as ConstraintLayout
240- appListViews.apply {
241- // Find the TextView by its ID
242- val appLayout = findViewById<LinearLayoutCompat >(R .id.linear_layout)
243-
244- // Set the OnTouchListener on the TextView
245- appLayout.setOnTouchListener(getHomeAppsGestureListener(context, this ))
246- }
247234 }
248235 }
249236
@@ -378,46 +365,6 @@ class HomeFragment : Fragment(),
378365 }
379366 }
380367
381- private fun getHomeAppsGestureListener (context : Context , view : View ): View .OnTouchListener {
382- return object : ViewSwipeTouchListener (context, view) {
383- override fun onLongClick (view : View ) {
384- super .onLongClick(view)
385- trySettings()
386- return
387- }
388-
389- @RequiresApi(Build .VERSION_CODES .P )
390- override fun onDoubleClick () {
391- super .onDoubleClick()
392- handleOtherAction(preferenceHelper.doubleTapAction, Constants .Swipe .DoubleTap )
393- }
394-
395- @RequiresApi(Build .VERSION_CODES .P )
396- override fun onSwipeUp () {
397- super .onSwipeUp()
398- handleOtherAction(preferenceHelper.swipeUpAction, Constants .Swipe .Up )
399- }
400-
401- @RequiresApi(Build .VERSION_CODES .P )
402- override fun onSwipeDown () {
403- super .onSwipeDown()
404- handleOtherAction(preferenceHelper.swipeDownAction, Constants .Swipe .Down )
405- }
406-
407- @RequiresApi(Build .VERSION_CODES .P )
408- override fun onSwipeLeft () {
409- super .onSwipeLeft()
410- handleOtherAction(preferenceHelper.swipeLeftAction, Constants .Swipe .Left )
411- }
412-
413- @RequiresApi(Build .VERSION_CODES .P )
414- override fun onSwipeRight () {
415- super .onSwipeRight()
416- handleOtherAction(preferenceHelper.swipeRightAction, Constants .Swipe .Right )
417- }
418- }
419- }
420-
421368 private fun openApp (packageName : String ) {
422369 val context = binding.root.context
423370 val pm: PackageManager = context.packageManager
0 commit comments