diff options
Diffstat (limited to 'Software/Android_Studio')
3 files changed, 12 insertions, 2 deletions
diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragmentVM.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragmentVM.java index 5ce70e284..169f553a7 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragmentVM.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/capture/CaptureFragmentVM.java @@ -2,6 +2,8 @@ package com.twine.colorcapture.views.capture; import android.graphics.Bitmap; import android.media.MediaActionSound; +import android.os.Handler; +import android.os.Looper; import android.util.Log; import com.squareup.otto.Bus; @@ -143,8 +145,11 @@ public class CaptureFragmentVM extends ViewModelBase<ICaptureFragment> implement //ToneGenerator toneGen1 = new ToneGenerator(AudioManager.STREAM_MUSIC, 100); //toneGen1.startTone(ToneGenerator.TONE_CDMA_PIP, 150); - MediaActionSound sound = new MediaActionSound(); - sound.play(MediaActionSound.SHUTTER_CLICK); + new Handler(Looper.getMainLooper()).post(() -> + { + MediaActionSound sound = new MediaActionSound(); + sound.play(MediaActionSound.SHUTTER_CLICK); + }); isCardDetected.set(true); preventDetection = true; diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtoemail/SendToEmailFragmentVM.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtoemail/SendToEmailFragmentVM.java index 2a89f706e..4cb2896fa 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtoemail/SendToEmailFragmentVM.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtoemail/SendToEmailFragmentVM.java @@ -104,6 +104,8 @@ public class SendToEmailFragmentVM extends ViewModelBase<ISendToEmailFragment> i @Override public void onNavigationObjectReceived(ColorResult colorResult) { + this.to.set(""); + this.message.set(""); this.colorResult = colorResult; } } diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/color_result_item.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/color_result_item.xml index 139ddc5b3..cc35b0f55 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/color_result_item.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/color_result_item.xml @@ -63,10 +63,13 @@ android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginTop="5dp" + android:paddingRight="100dp" android:fontFamily="@font/flexo_medium" android:letterSpacing="0.07" android:text="@{result.result.name}" android:textSize="@dimen/medium_font_size" + android:maxLines="1" + android:ellipsize="end" tools:text="Nike 100" /> |
