Binary file res/drawable/beem_sendim_header_1.png has changed
Binary file res/drawable/beem_sendim_textview.png has changed
--- a/res/layout/contactlistsettings.xml Wed Apr 22 15:19:42 2009 +0200
+++ b/res/layout/contactlistsettings.xml Wed Apr 22 18:50:11 2009 +0200
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical" android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+<LinearLayout
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
@@ -104,4 +107,5 @@
<requestFocus />
</Button>
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
+</ScrollView>
\ No newline at end of file
--- a/res/layout/sendim.xml Wed Apr 22 15:19:42 2009 +0200
+++ b/res/layout/sendim.xml Wed Apr 22 18:50:11 2009 +0200
@@ -4,11 +4,10 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent">
- <RelativeLayout
- android:paddingLeft="10px"
- android:paddingRight="10px"
- android:paddingTop="10px"
- android:background="@color/blue_sky"
+ <LinearLayout
+ android:paddingLeft="5px"
+ android:paddingTop="5px"
+ android:background="@drawable/beem_sendim_header_1"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
@@ -17,26 +16,40 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/avatar"/>
-
- <TextView android:id="@+id/sendimlogin"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignTop="@id/sendimavatar"
- android:layout_toRightOf="@id/sendimavatar"
- android:hint="@string/SendIMLoginHint"/>
- </RelativeLayout>
+
+ <LinearLayout
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:orientation="vertical">
+
+ <TextView android:id="@+id/sendimlogin"
+ android:paddingLeft="15px"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:hint="@string/SendIMLoginHint"/>
+
+ <TextView android:id="@+id/sendimstatus"
+ android:paddingLeft="20px"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:hint="@string/SendIMNoStatusSet"/>
+ </LinearLayout>
+ </LinearLayout>
+
<ScrollView
android:id="@+id/sendimscroll"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
+ android:background="@drawable/beem_sendim_textview"
android:layout_weight="1">
<TextView android:id="@+id/sendimlist"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
+ android:paddingLeft="10px"
+ android:paddingRight="10px"
+ android:paddingTop="10px"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
android:singleLine="false"/>
- <!--android:choiceMode="none"
- android:transcriptMode="alwaysScroll"-->
</ScrollView>
--- a/src/com/beem/project/beem/ui/SendIM.java Wed Apr 22 15:19:42 2009 +0200
+++ b/src/com/beem/project/beem/ui/SendIM.java Wed Apr 22 18:50:11 2009 +0200
@@ -33,14 +33,10 @@
* after selecting a correspondant.
*/
-public class SendIM extends Activity implements OnClickListener,
- OnKeyListener {
+public class SendIM extends Activity implements OnClickListener, OnKeyListener {
private EditText mToSend;
- //private ArrayList<String> mMessages = new ArrayList<String>();
- //private ArrayAdapter<String> mAdapter;
private SendIMDialogSmiley mSmyDialog;
private SharedPreferences mSet;
- private SharedPreferences mGlobalSettings;
private BeemApplication mBeemApplication;
private Handler mHandler;
private IXmppFacade mService = null;
@@ -77,30 +73,24 @@
mToSend = (EditText) findViewById(R.id.userText);
mSet = getSharedPreferences("lol", MODE_PRIVATE);
mSmyDialog = new SendIMDialogSmiley(this, mSet);
- mGlobalSettings = getSharedPreferences(
- getString(R.string.PreferenceFileName), MODE_PRIVATE);
- /*mAdapter = new ArrayAdapter<String>(this, R.layout.messagelist,
- mMessages);
- setListAdapter(mAdapter);*/
-
mToSend.setOnClickListener(this);
mToSend.setOnKeyListener(this);
-
+
mContact = getIntent().getParcelableExtra("contact");
setViewHeader();
mText = (TextView) findViewById(R.id.sendimlist);
mScrolling = (ScrollView) findViewById(R.id.sendimscroll);
}
-
- private void setViewHeader()
- {
+
+ private void setViewHeader() {
mLogin = (TextView) findViewById(R.id.sendimlogin);
- String status = mContact.getMsgState();
- if (status == null)
- status = getString(R.string.SendIMNoStatusSet);
- else
- status = mContact.getMsgState();
- mLogin.setText(mContact.getJID() + "\n" + status);
+ mLogin.setText(mContact.getJID());
+ TextView status = (TextView) findViewById(R.id.sendimstatus);
+ status.setTextSize(12);
+ mLogin.setTextColor(getResources().getColor(R.color.white));
+ String statmsg = mContact.getMsgState();
+ if (statmsg != null)
+ status.setText(statmsg);
}
@Override
@@ -173,7 +163,7 @@
* Callback for menu creation.
*
* @param menu
- * the menu created
+ * The created menu
* @return true on success, false otherwise
*/
@Override
@@ -201,7 +191,6 @@
public void chatCreated(IChat chat, boolean locally)
throws RemoteException {
Log.i("LOG", "chatCreated");
-
}
}
@@ -211,27 +200,23 @@
@Override
public void processMessage(IChat chat, Message msg)
throws RemoteException {
- Log.i("LOG", "processMessage");
- /*mAdapter.add(mContact.getJID() + " "
- + getString(R.string.SendIMSays) + msg.getBody());*/
-
final Message m = msg;
mHandler.post(new Runnable() {
-
- @Override
- public void run() {
- if (m.getBody() != null)
- {
- if (!mSpeak)
- mText.append(m.getBody() + "\n");
- else
- mText.append(mContact.getJID() + " "
- + getString(R.string.SendIMSays) + m.getBody() + "\n");
- mSpeak = false;
- mScrolling.fullScroll(ScrollView.FOCUS_DOWN);
- mToSend.requestFocus();
- }
- }
+
+ @Override
+ public void run() {
+ if (m.getBody() != null) {
+ if (!mSpeak)
+ mText.append(m.getBody() + "\n");
+ else
+ mText.append(mContact.getJID() + " "
+ + getString(R.string.SendIMSays)
+ + m.getBody() + "\n");
+ mSpeak = false;
+ mScrolling.fullScroll(ScrollView.FOCUS_DOWN);
+ mToSend.requestFocus();
+ }
+ }
});
}
}