Skip to content

Commit

Permalink
Merge pull request android#171 from android/fix_lint
Browse files Browse the repository at this point in the history
Fix the CI failure
  • Loading branch information
thagikura authored Aug 18, 2020
2 parents 6169ad1 + aa205b7 commit e0c3eb0
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions ConstraintLayoutExamples/motionlayout/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ android {
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import android.content.Context
import android.graphics.Canvas
import android.graphics.Paint
import android.util.AttributeSet
import android.widget.ImageView
import androidx.appcompat.widget.AppCompatImageView

class BoundsImageView @JvmOverloads constructor(
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : ImageView(context, attrs, defStyleAttr) {
) : AppCompatImageView(context, attrs, defStyleAttr) {

private var paint = Paint()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_add_a_photo_24dp"/>
app:srcCompat="@drawable/ic_add_a_photo_24dp"/>

</androidx.constraintlayout.motion.widget.MotionLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_add_a_photo_24dp"/>
app:srcCompat="@drawable/ic_add_a_photo_24dp"/>

</androidx.constraintlayout.motion.widget.MotionLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
android:layout_width="0dp"
android:layout_height="0dp"
android:scaleType="centerCrop"
android:src="@drawable/cat_1"
app:srcCompat="@drawable/cat_1"
app:layout_constraintTop_toTopOf="@id/top_image_container"
app:layout_constraintBottom_toBottomOf="@id/top_image_container"
app:layout_constraintStart_toStartOf="@id/top_image_container"
Expand All @@ -51,8 +51,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:src="@drawable/ic_play_arrow_gray_32dp"
android:alpha="0"
app:srcCompat="@drawable/ic_play_arrow_gray_32dp"
app:layout_constraintEnd_toStartOf="@id/image_clear"
app:layout_constraintTop_toTopOf="@id/top_image_container"
app:layout_constraintBottom_toBottomOf="@id/top_image_container"
Expand All @@ -63,8 +63,8 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:src="@drawable/ic_clear_gray_32dp"
android:alpha="0"
app:srcCompat="@drawable/ic_clear_gray_32dp"
app:layout_constraintEnd_toEndOf="@id/top_image_container"
app:layout_constraintBottom_toBottomOf="@id/top_image_container"
app:layout_constraintTop_toTopOf="@id/top_image_container"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:src="@drawable/ic_add_a_photo_24dp"
app:srcCompat="@drawable/ic_add_a_photo_24dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
android:id="@+id/arrow_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_keyboard_arrow_right"
app:srcCompat="@drawable/ic_keyboard_arrow_right"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -35,7 +35,7 @@
android:id="@+id/arrow_up"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_keyboard_arrow_up"
app:srcCompat="@drawable/ic_keyboard_arrow_up"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class Entrance : AppCompatActivity() {
}
}

override fun onRestoreInstanceState(savedInstanceState: Bundle?) {
override fun onRestoreInstanceState(savedInstanceState: Bundle) {
super.onRestoreInstanceState(savedInstanceState)
val motionLayoutState = savedInstanceState?.getBundle(SIS_MOTION_LAYOUT_STATE)
val motionLayoutState = savedInstanceState.getBundle(SIS_MOTION_LAYOUT_STATE)
motionLayoutState?.let {
binding.motionLayout.transitionState = motionLayoutState
}
Expand Down

0 comments on commit e0c3eb0

Please sign in to comment.