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