Permalink
Browse files

Add clear button to the status message TextEdit.

  • Loading branch information...
Joerg Mensmann authored and ge0rg committed May 11, 2014
1 parent eeddca2 commit 960906951530c3d4d4746941cb44f91294e5fbc9
Showing with 27 additions and 2 deletions.
  1. +19 −2 res/layout/statusview.xml
  2. +8 −0 src/org/yaxim/androidclient/dialogs/ChangeStatusDialog.java
View
@@ -21,11 +21,28 @@
android:prompt="@string/setStatusTitle"
android:layout_marginBottom="15dp"
/>
<AutoCompleteTextView android:id="@+id/statusview_message"
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
>
<AutoCompleteTextView android:id="@+id/statusview_message"
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:hint="@string/setStatusmsgHint"
android:singleLine="true"
/>
/>
<Button
android:id="@+id/statusview_message_button_clear"
android:layout_width="30dip"
android:layout_height="30dip"
android:layout_alignParentRight="true"
android:background="@android:drawable/ic_menu_close_clear_cancel"
android:layout_centerVertical="true"
android:layout_marginRight="5dip"
/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
@@ -17,6 +17,7 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Spinner;
@@ -70,6 +71,13 @@ public int compare(StatusMode object1, StatusMode object2) {
android.R.layout.simple_dropdown_item_1line, status_message_history));
mMessage.setThreshold(1);
Button messageClearButton = (Button) group.findViewById(R.id.statusview_message_button_clear);
messageClearButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
mMessage.setText("");
}
});
setTitle(R.string.statuspopup_name);
setView(group);

0 comments on commit 9609069

Please sign in to comment.