Skip to content

Commit

Permalink
Rename ViewPagerCarousel.kt to ViewPagerIntegration.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
objcode committed Aug 25, 2020
1 parent 6203822 commit f05c424
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".ViewPagerCarousel"
<activity android:name=".ViewPagerIntegration"
android:exported="true"
android:theme="@style/Theme.MaterialComponents.DayNight.NoActionBar"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MainActivity : AppCompatActivity() {
startActivity(intent)
}
binding.viewPagerButton.setOnClickListener {
val intent = Intent(this, ViewPagerCarousel::class.java)
val intent = Intent(this, ViewPagerIntegration::class.java)
startActivity(intent)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
import androidx.viewpager.widget.ViewPager
import com.example.androidstudio.motionlayoutintegrations.databinding.ActivityViewPagerCarouselBinding
import com.example.androidstudio.motionlayoutintegrations.databinding.ActivityViewPagerIntegrationBinding

class ViewPagerCarousel : AppCompatActivity() {
class ViewPagerIntegration : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val binding = ActivityViewPagerCarouselBinding.inflate(layoutInflater)
val binding = ActivityViewPagerIntegrationBinding.inflate(layoutInflater)
setContentView(binding.root)

val adapter = ViewPagerAdapter(supportFragmentManager)
Expand Down Expand Up @@ -62,7 +62,10 @@ class ViewPagerCarousel : AppCompatActivity() {
}


class ViewPagerAdapter(fragmentManager: FragmentManager) : FragmentPagerAdapter(fragmentManager, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT) {
class ViewPagerAdapter(fragmentManager: FragmentManager) : FragmentPagerAdapter(
fragmentManager,
BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT
) {

private val fragmentList = ArrayList<Fragment>()
private val fragmentTitleList = ArrayList<String>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ViewPagerCarousel"
tools:context=".ViewPagerIntegration"
android:orientation="vertical">

<androidx.constraintlayout.motion.widget.MotionLayout
Expand Down

0 comments on commit f05c424

Please sign in to comment.