Skip to content

Commit

Permalink
replace view lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokito-Kun authored and Tokito-Kun committed Jun 29, 2023
1 parent f191c91 commit fd4bac1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import androidx.core.content.ContextCompat
import androidx.core.graphics.drawable.DrawableCompat
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.ViewModelProviders
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.ItemTouchHelper.ACTION_STATE_SWIPE
import androidx.recyclerview.widget.LinearLayoutManager
Expand Down Expand Up @@ -101,7 +101,7 @@ class ProfilesFragment : ScopedFragment(),
profilesRecycler.adapter = mProfilesAdapter
profilesRecycler.layoutManager = LinearLayoutManager(mContext)

mProfilesViewModel = ViewModelProviders.of(this).get(ProfilesViewModel::class.java)
mProfilesViewModel = ViewModelProvider.of(this).get(ProfilesViewModel::class.java)

// Observe data
mProfilesViewModel.getLiveData().observe(viewLifecycleOwner, Observer { profiles ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.LinearLayoutManager
import mattecarra.accapp.activities.MainActivity
import mattecarra.accapp.adapters.OnScheduleClickListener
Expand Down Expand Up @@ -41,7 +41,7 @@ class SchedulesFragment : ScopedFragment(), OnScheduleClickListener {


activity?.let { activity ->
viewModel = ViewModelProviders.of(activity).get(SchedulesViewModel::class.java)
viewModel = ViewModelProvider.of(activity).get(SchedulesViewModel::class.java)

adapter = ScheduleProfileListAdapter(activity)
adapter.setOnClickListener(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import android.widget.Toast
import androidx.core.content.ContextCompat
import androidx.core.graphics.drawable.DrawableCompat
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProviders
import androidx.lifecycle.ViewModelProvider
import androidx.recyclerview.widget.ItemTouchHelper
import androidx.recyclerview.widget.ItemTouchHelper.ACTION_STATE_SWIPE
import androidx.recyclerview.widget.LinearLayoutManager
Expand Down Expand Up @@ -66,7 +66,7 @@ class ScriptesFragment : ScopedFragment(), OnScriptClickListener
binding.scriptsRecyclerView.adapter = mScriptesAdapter
binding.scriptsRecyclerView.layoutManager = LinearLayoutManager(mContext)

mScriptsViewModel = ViewModelProviders.of(this).get(ScriptsViewModel::class.java)
mScriptsViewModel = ViewModelProvider.of(this).get(ScriptsViewModel::class.java)

// Observe data
mScriptsViewModel.getLiveData().observe(viewLifecycleOwner, Observer { scripts ->
Expand Down

0 comments on commit fd4bac1

Please sign in to comment.