~hokiegeek/kiddoecomm

cc4979e4b3787d28b4886a7757bac234ef748edb — HokieGeek 1 year, 1 month ago 19d6df4
Made the views a bit more consistent
M app/src/main/java/net/hokiegeek/kiddoecomm/ui/leds/LedsFragment.kt => app/src/main/java/net/hokiegeek/kiddoecomm/ui/leds/LedsFragment.kt +1 -1
@@ 42,7 42,7 @@ class LedsFragment : IMicroBitConnectionListener, Fragment() {
        }

        // Clear the LEDs
        root.findViewById<ImageButton>(R.id.button_clear).setOnClickListener {
        root.findViewById<ImageButton>(R.id.button_clear_leds).setOnClickListener {
            Log.d(logTag, "clear button clicked")
            viewModel.clear()
        }

M app/src/main/java/net/hokiegeek/kiddoecomm/ui/messaging/MessagingFragment.kt => app/src/main/java/net/hokiegeek/kiddoecomm/ui/messaging/MessagingFragment.kt +5 -0
@@ 70,6 70,11 @@ class MessagingFragment : IMicroBitConnectionListener, Fragment() {
            }.start()
        }

        root.findViewById<ImageButton>(R.id.button_clear_message).setOnClickListener {
            Log.d(logTag, "clear button clicked")
            textView.text?.clear()
        }

        return root
    }


M app/src/main/res/layout/fragment_leds.xml => app/src/main/res/layout/fragment_leds.xml +5 -4
@@ 35,15 35,16 @@
        android:id="@+id/button_send_leds"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginBottom="55dp"
        android:backgroundTint="@color/colorPrimary"
        android:contentDescription="@string/description_button_leds_send"
        android:src="@android:drawable/ic_menu_send"
        app:layout_constraintEnd_toStartOf="@id/button_clear"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/spinner_presets" />
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@id/button_clear_leds"
        app:layout_constraintStart_toStartOf="parent" />

    <ImageButton
        android:id="@+id/button_clear"
        android:id="@+id/button_clear_leds"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:backgroundTint="@android:color/holo_red_dark"

M app/src/main/res/layout/fragment_messaging.xml => app/src/main/res/layout/fragment_messaging.xml +12 -1
@@ 35,9 35,20 @@
        android:contentDescription="@string/description_message_send"
        android:src="@android:drawable/ic_menu_send"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintEnd_toStartOf="@id/button_clear_message"
        app:layout_constraintStart_toStartOf="parent" />

    <ImageButton
        android:id="@+id/button_clear_message"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:backgroundTint="@android:color/holo_red_dark"
        android:contentDescription="@string/description_button_clear_message"
        android:src="@android:drawable/ic_menu_delete"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/button_send_message"
        app:layout_constraintTop_toTopOf="@+id/button_send_message" />

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/guideline_halfway"
        android:layout_width="wrap_content"

M app/src/main/res/values/strings.xml => app/src/main/res/values/strings.xml +1 -0
@@ 19,4 19,5 @@
    <string name="message_hint">Message</string>
    <string name="btn_alert">Alert</string>
    <string name="btn_alarm">Alarm</string>
    <string name="description_button_clear_message">Clears message field</string>
</resources>