Commit fa07e7ff authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Update files to follow the code style.

parent bff56d0d
......@@ -23,8 +23,8 @@ public class MessageFormLayout extends LinearLayout {
protected ViewGroup composer;
private ImageButton attachmentImageButton;
private ImageButton sendImageButton;
private ImageButton attachButton;
private ImageButton sendButton;
private ExtraActionSelectionClickListener extraActionSelectionClickListener;
private SubmitTextListener submitTextListener;
......@@ -55,18 +55,18 @@ public class MessageFormLayout extends LinearLayout {
composer = (ViewGroup) LayoutInflater.from(getContext())
.inflate(R.layout.message_composer, this, false);
attachmentImageButton = composer.findViewById(R.id.attachmentImageButton);
attachButton = composer.findViewById(R.id.button_attach);
attachmentImageButton.setOnClickListener(new OnClickListener() {
attachButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
onExtraActionSelectionClick();
}
});
sendImageButton = composer.findViewById(R.id.sendImageButton);
sendButton = composer.findViewById(R.id.button_send);
sendImageButton.setOnClickListener(new OnClickListener() {
sendButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
String messageText = getText();
......@@ -76,9 +76,9 @@ public class MessageFormLayout extends LinearLayout {
}
});
sendImageButton.setScaleX(0);
sendImageButton.setScaleY(0);
sendImageButton.setVisibility(GONE);
sendButton.setScaleX(0);
sendButton.setScaleY(0);
sendButton.setVisibility(GONE);
ImageKeyboardEditText editText = composer.findViewById(R.id.editor);
......@@ -94,11 +94,11 @@ public class MessageFormLayout extends LinearLayout {
@Override
public void afterTextChanged(Editable s) {
if (TextUtils.getTrimmedLength(s) > 0) {
animateHide(attachmentImageButton);
animateShow(sendImageButton);
animateHide(attachButton);
animateShow(sendButton);
} else {
animateShow(attachmentImageButton);
animateHide(sendImageButton);
animateShow(attachButton);
animateHide(sendButton);
}
}
});
......
......@@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/colorShadow" />
<solid android:color="@color/color_shadow" />
</shape>
</item>
......
......@@ -22,11 +22,11 @@
android:background="@null"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/imageButtonContainer"
app:layout_constraintRight_toLeftOf="@+id/container"
app:layout_constraintBottom_toBottomOf="parent"/>
<android.support.constraint.ConstraintLayout
android:id="@+id/imageButtonContainer"
android:id="@+id/container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
......@@ -39,18 +39,18 @@
app:layout_constraintBottom_toBottomOf="@+id/editor">
<ImageButton
android:id="@+id/attachmentImageButton"
android:id="@+id/button_attach"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tint="@color/colorDefaultMessageComposerIcon"
android:tint="@color/color_icon_composer"
app:srcCompat="@drawable/ic_attach_file_black_24dp"
android:background="?attr/selectableItemBackgroundBorderless"/>
<ImageButton
android:id="@+id/sendImageButton"
android:id="@+id/button_send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:tint="@color/colorAccent"
android:tint="@color/color_accent"
app:srcCompat="@drawable/ic_send_black_24dp"
android:background="?attr/selectableItemBackgroundBorderless"/>
</android.support.constraint.ConstraintLayout>
......
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorAccent">#FF2D91FA</color>
<color name="colorShadow">#FFE6E6E7</color>
<color name="colorDefaultMessageComposerIcon">#FFA8A8A8</color>
<color name="color_accent">#FF2D91FA</color>
<color name="color_shadow">#FFE6E6E7</color>
<color name="color_icon_composer">#FFA8A8A8</color>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment