소스 검색

Merge branch 'refactor'

Wayne 5 년 전
부모
커밋
4f2c1d793c

+ 2 - 2
reader/src/main/java/com/kdanmobile/reader/view/AnnotationAttributeView.kt

@@ -143,7 +143,7 @@ class AnnotationAttributeView @JvmOverloads constructor(
     }
 
     private fun setupColorButtons() {
-        viewGroup_readerAnnotationProperty_color.onColorSelectedListener = object : ColorSelectView.OnColorSelectedListener {
+        colorSelectView_readerAnnotationProperty.onColorSelectedListener = object : ColorSelectView.OnColorSelectedListener {
             override fun onColorSelected(color: Int) {
                 AnnotationColor.values().forEach { annotationColor ->
                     val c = resources.getColor(annotationColor.colorResId)
@@ -265,7 +265,7 @@ class AnnotationAttributeView @JvmOverloads constructor(
 
     private fun updateColorButtons() {
         val c = resources.getColor(colorEnum.colorResId)
-        viewGroup_readerAnnotationProperty_color.setSelectedColor(c)
+        colorSelectView_readerAnnotationProperty.setSelectedColor(c)
     }
 
     interface OnChangeListener {

+ 3 - 3
reader/src/main/res/layout/view_reader_annotation_property.xml

@@ -128,7 +128,7 @@
         android:layout_height="wrap_content" />
 
     <com.kdanmobile.reader.screen.view.ColorSelectView
-        android:id="@+id/viewGroup_readerAnnotationProperty_color"
+        android:id="@+id/colorSelectView_readerAnnotationProperty"
         app:layout_constraintTop_toBottomOf="@id/seekBar_readerAnnotationProperty_opacity"
         app:layout_constraintLeft_toLeftOf="parent"
         app:layout_constraintRight_toRightOf="parent"
@@ -139,7 +139,7 @@
     <ImageView
         android:id="@+id/iv_readerAnnotationProperty_triangle1"
         android:src="@drawable/ic_freehand_triangle"
-        app:layout_constraintTop_toBottomOf="@id/viewGroup_readerAnnotationProperty_color"
+        app:layout_constraintTop_toBottomOf="@id/colorSelectView_readerAnnotationProperty"
         app:layout_constraintLeft_toLeftOf="@id/iv_readerAnnotationProperty_brush1"
         app:layout_constraintRight_toRightOf="@id/iv_readerAnnotationProperty_brush1"
         android:layout_width="24dp"
@@ -158,7 +158,7 @@
     <ImageView
         android:id="@+id/iv_readerAnnotationProperty_triangle2"
         android:src="@drawable/ic_freehand_triangle"
-        app:layout_constraintTop_toBottomOf="@id/viewGroup_readerAnnotationProperty_color"
+        app:layout_constraintTop_toBottomOf="@id/colorSelectView_readerAnnotationProperty"
         app:layout_constraintLeft_toLeftOf="@id/iv_readerAnnotationProperty_brush2"
         app:layout_constraintRight_toRightOf="@id/iv_readerAnnotationProperty_brush2"
         android:layout_width="24dp"