Skip to content

Commit

Permalink
It builds
Browse files Browse the repository at this point in the history
  • Loading branch information
gpeal committed Sep 25, 2018
1 parent a9a1d61 commit 342dfed
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ import com.airbnb.lottie.samples.model.CompositionArgs

class PlayerActivity : AppCompatActivity() {

// override fun onCreate(savedInstanceState: Bundle?) {
// super.onCreate(savedInstanceState)
// setContentView(R.layout.activity_player)
//
// if (savedInstanceState == null) {
// val args = intent.getParcelableExtra(PlayerFragment.EXTRA_ANIMATION_ARGS) ?:
// CompositionArgs(fileUri = intent.data)
// supportFragmentManager.beginTransaction()
// .add(R.id.content, PlayerFragment.forAsset(args))
// .commit()
// }
// }
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_player)

if (savedInstanceState == null) {
val args = intent.getParcelableExtra(PlayerFragment.EXTRA_ANIMATION_ARGS) ?:
CompositionArgs(fileUri = intent.data)
supportFragmentManager.beginTransaction()
.add(R.id.content, PlayerFragment.forAsset(args))
.commit()
}
}

companion object {
fun intent(context: Context, args: CompositionArgs): Intent {
return Intent(context, PlayerActivity::class.java).apply {
// putExtra(PlayerFragment.EXTRA_ANIMATION_ARGS, args)
putExtra(PlayerFragment.EXTRA_ANIMATION_ARGS, args)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.google.android.material.bottomsheet.BottomSheetBehavior
import com.google.android.material.snackbar.Snackbar
import androidx.transition.AutoTransition
import androidx.transition.TransitionManager
import androidx.core.view.children
import androidx.fragment.app.Fragment
import androidx.core.content.ContextCompat
import androidx.appcompat.app.AppCompatActivity
Expand Down Expand Up @@ -46,6 +47,7 @@ import kotlinx.android.synthetic.main.control_bar_speed.*
import kotlinx.android.synthetic.main.control_bar_trim.*
import kotlinx.android.synthetic.main.fragment_player.*
import kotlin.math.min
import kotlin.math.roundToInt

class PlayerFragment : BaseMvRxFragment() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:background="@android:color/white"
app:behavior_hideable="true"
app:behavior_peekHeight="80dp"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior">
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

<View
android:layout_width="match_parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:background="@android:color/white"
app:behavior_hideable="true"
app:behavior_peekHeight="80dp"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior">
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

<View
android:layout_width="match_parent"
Expand Down
2 changes: 1 addition & 1 deletion LottieSample/src/main/res/layout/bottom_sheet_warnings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
android:background="@android:color/white"
app:behavior_hideable="true"
app:behavior_peekHeight="80dp"
app:layout_behavior="android.support.design.widget.BottomSheetBehavior">
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

<View
android:layout_width="match_parent"
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
}
dependencies {
classpath 'org.ajoberstar:grgit:1.9.3'
classpath 'com.android.tools.build:gradle:3.2.0-rc03'
classpath 'com.android.tools.build:gradle:3.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlinVersion"
classpath 'org.ajoberstar:grgit:1.9.3'
Expand Down

0 comments on commit 342dfed

Please sign in to comment.