Browse Source

remove floating label on EditorView

pull/45/head
Thodoris1999 6 years ago
parent
commit
f54974ed7f
  1. 2
      app/src/main/java/gr/thmmy/mthmmy/editorview/EditorView.java
  2. 11
      app/src/main/res/layout/editor_view.xml

2
app/src/main/java/gr/thmmy/mthmmy/editorview/EditorView.java

@ -59,7 +59,7 @@ public class EditorView extends LinearLayout {
TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.EditorView, 0, 0); TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.EditorView, 0, 0);
try { try {
edittextWrapper.setHint(a.getString(R.styleable.EditorView_hint)); editText.setHint(a.getString(R.styleable.EditorView_hint));
} finally { } finally {
a.recycle(); a.recycle();
} }

11
app/src/main/res/layout/editor_view.xml

@ -134,14 +134,17 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="horizontal"
android:layout_marginTop="4dp">
<android.support.design.widget.TextInputLayout <android.support.design.widget.TextInputLayout
android:id="@+id/editor_edittext_wrapper" android:id="@+id/editor_edittext_wrapper"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:orientation="vertical" > android:layout_gravity="center"
android:orientation="vertical"
app:hintEnabled="false">
<android.support.design.widget.TextInputEditText <android.support.design.widget.TextInputEditText
android:id="@+id/editor_edittext" android:id="@+id/editor_edittext"
@ -154,7 +157,7 @@
android:id="@+id/emoji_keyboard_button" android:id="@+id/emoji_keyboard_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="center"
android:padding="4dp" android:padding="4dp"
app:srcCompat="@drawable/ic_tag_faces_24dp" app:srcCompat="@drawable/ic_tag_faces_24dp"
android:background="?android:selectableItemBackground"/> android:background="?android:selectableItemBackground"/>
@ -163,7 +166,7 @@
android:id="@+id/submit_button" android:id="@+id/submit_button"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="center"
android:contentDescription="@string/submit" android:contentDescription="@string/submit"
android:padding="4dp" android:padding="4dp"
app:srcCompat="@drawable/ic_send_accent_24dp" app:srcCompat="@drawable/ic_send_accent_24dp"

Loading…
Cancel
Save