|
|
|
@ -52,8 +52,6 @@ import android.support.v13.view.inputmethod.InputContentInfoCompat; |
|
|
|
|
import android.support.v4.app.ActivityCompat; |
|
|
|
|
import android.support.v4.content.ContextCompat; |
|
|
|
|
import android.support.v4.content.FileProvider; |
|
|
|
|
import android.support.v4.view.ViewCompat; |
|
|
|
|
import android.support.v4.widget.TextViewCompat; |
|
|
|
|
import android.support.v7.app.ActionBar; |
|
|
|
|
import android.support.v7.app.AlertDialog; |
|
|
|
|
import android.support.v7.content.res.AppCompatResources; |
|
|
|
@ -360,10 +358,10 @@ public final class ComposeActivity |
|
|
|
|
int textColor = ThemeUtils.getColor(this, android.R.attr.textColorTertiary); |
|
|
|
|
|
|
|
|
|
Drawable cameraIcon = new IconicsDrawable(this, GoogleMaterial.Icon.gmd_camera_alt).color(textColor).sizeDp(18); |
|
|
|
|
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(actionPhotoTake, cameraIcon, null, null, null); |
|
|
|
|
actionPhotoTake.setCompoundDrawablesRelativeWithIntrinsicBounds(cameraIcon, null, null, null); |
|
|
|
|
|
|
|
|
|
Drawable imageIcon = new IconicsDrawable(this, GoogleMaterial.Icon.gmd_image).color(textColor).sizeDp(18); |
|
|
|
|
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(actionPhotoPick, imageIcon, null, null, null); |
|
|
|
|
actionPhotoPick.setCompoundDrawablesRelativeWithIntrinsicBounds(imageIcon, null, null, null); |
|
|
|
|
|
|
|
|
|
actionPhotoTake.setOnClickListener(v -> initiateCameraApp()); |
|
|
|
|
actionPhotoPick.setOnClickListener(v -> onMediaPick()); |
|
|
|
@ -466,7 +464,7 @@ public final class ComposeActivity |
|
|
|
|
Drawable arrowDownIcon = new IconicsDrawable(this, GoogleMaterial.Icon.gmd_arrow_drop_down).sizeDp(12); |
|
|
|
|
|
|
|
|
|
ThemeUtils.setDrawableTint(this, arrowDownIcon, android.R.attr.textColorTertiary); |
|
|
|
|
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(replyTextView, null, null, arrowDownIcon, null); |
|
|
|
|
replyTextView.setCompoundDrawablesRelativeWithIntrinsicBounds(null, null, arrowDownIcon, null); |
|
|
|
|
|
|
|
|
|
replyTextView.setOnClickListener(v -> { |
|
|
|
|
TransitionManager.beginDelayedTransition((ViewGroup)replyContentTextView.getParent()); |
|
|
|
@ -476,11 +474,10 @@ public final class ComposeActivity |
|
|
|
|
Drawable arrowUpIcon = new IconicsDrawable(this, GoogleMaterial.Icon.gmd_arrow_drop_up).sizeDp(12); |
|
|
|
|
|
|
|
|
|
ThemeUtils.setDrawableTint(this, arrowUpIcon, android.R.attr.textColorTertiary); |
|
|
|
|
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(replyTextView, null, null, arrowUpIcon, null); |
|
|
|
|
replyTextView.setCompoundDrawablesRelativeWithIntrinsicBounds(null, null, arrowUpIcon, null); |
|
|
|
|
} else { |
|
|
|
|
replyContentTextView.setVisibility(View.GONE); |
|
|
|
|
|
|
|
|
|
TextViewCompat.setCompoundDrawablesRelativeWithIntrinsicBounds(replyTextView, null, null, arrowDownIcon, null); |
|
|
|
|
replyTextView.setCompoundDrawablesRelativeWithIntrinsicBounds(null, null, arrowDownIcon, null); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
@ -662,14 +659,14 @@ public final class ComposeActivity |
|
|
|
|
Snackbar.LENGTH_SHORT); |
|
|
|
|
bar.setAction(actionId, listener); |
|
|
|
|
//necessary so snackbar is shown over everything
|
|
|
|
|
ViewCompat.setElevation(bar.getView(), getResources().getDimensionPixelSize(R.dimen.compose_activity_snackbar_elevation)); |
|
|
|
|
bar.getView().setElevation(getResources().getDimensionPixelSize(R.dimen.compose_activity_snackbar_elevation)); |
|
|
|
|
bar.show(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void displayTransientError(@StringRes int stringId) { |
|
|
|
|
Snackbar bar = Snackbar.make(findViewById(R.id.activity_compose), stringId, Snackbar.LENGTH_LONG); |
|
|
|
|
//necessary so snackbar is shown over everything
|
|
|
|
|
ViewCompat.setElevation(bar.getView(), getResources().getDimensionPixelSize(R.dimen.compose_activity_snackbar_elevation)); |
|
|
|
|
bar.getView().setElevation(getResources().getDimensionPixelSize(R.dimen.compose_activity_snackbar_elevation)); |
|
|
|
|
bar.show(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|