From ae871f8a1fff5f33e21dd18dd33306eecd0abea7 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Mon, 13 Jun 2011 22:48:25 +0200 Subject: [PATCH] AddChannelActivity: Always set cursor at the end of the input field --- application/src/org/yaaic/activity/AddChannelActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/application/src/org/yaaic/activity/AddChannelActivity.java b/application/src/org/yaaic/activity/AddChannelActivity.java index fd60f62..e031c3d 100644 --- a/application/src/org/yaaic/activity/AddChannelActivity.java +++ b/application/src/org/yaaic/activity/AddChannelActivity.java @@ -31,14 +31,14 @@ import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.view.View; -import android.view.View.OnClickListener; import android.view.Window; +import android.view.View.OnClickListener; import android.widget.AdapterView; -import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.ListView; +import android.widget.AdapterView.OnItemClickListener; /** * Adding auto join channels to a server @@ -64,6 +64,7 @@ public class AddChannelActivity extends Activity implements OnClickListener, OnI setContentView(R.layout.channeladd); channelInput = (EditText) findViewById(R.id.channel); + channelInput.setSelection(1); adapter = new ArrayAdapter(this, R.layout.channelitem); @@ -97,6 +98,7 @@ public class AddChannelActivity extends Activity implements OnClickListener, OnI channels.add(channel); adapter.add(channel); channelInput.setText("#"); + channelInput.setSelection(1); okButton.setEnabled(true); break;