# HG changeset patch # User Da Risk # Date 1240422793 -7200 # Node ID 70ceaba725d4fb9cbc577c8ccafc02df4fb3ba2d # Parent f360498285526cfd07c1d354b21b0ffc2fa457da# Parent 40a48262a67015215c56d31347f8ebad07476c5b merge with barbie diff -r f36049828552 -r 70ceaba725d4 res/drawable/beem_sendim_header_1.png Binary file res/drawable/beem_sendim_header_1.png has changed diff -r f36049828552 -r 70ceaba725d4 res/drawable/beem_sendim_textview.png Binary file res/drawable/beem_sendim_textview.png has changed diff -r f36049828552 -r 70ceaba725d4 res/layout/contactlistsettings.xml --- a/res/layout/contactlistsettings.xml Wed Apr 22 19:39:39 2009 +0200 +++ b/res/layout/contactlistsettings.xml Wed Apr 22 19:53:13 2009 +0200 @@ -1,5 +1,8 @@ - + @@ -104,4 +107,5 @@ - \ No newline at end of file + + \ No newline at end of file diff -r f36049828552 -r 70ceaba725d4 res/layout/sendim.xml --- a/res/layout/sendim.xml Wed Apr 22 19:39:39 2009 +0200 +++ b/res/layout/sendim.xml Wed Apr 22 19:53:13 2009 +0200 @@ -4,11 +4,10 @@ android:layout_width="fill_parent" android:layout_height="fill_parent"> - @@ -17,26 +16,40 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/avatar"/> - - - + + + + + + + + + - diff -r f36049828552 -r 70ceaba725d4 src/com/beem/project/beem/ui/SendIM.java --- a/src/com/beem/project/beem/ui/SendIM.java Wed Apr 22 19:39:39 2009 +0200 +++ b/src/com/beem/project/beem/ui/SendIM.java Wed Apr 22 19:53:13 2009 +0200 @@ -35,11 +35,8 @@ public class SendIM extends Activity implements OnClickListener, OnKeyListener { private EditText mToSend; - // private ArrayList mMessages = new ArrayList(); - // private ArrayAdapter mAdapter; private SendIMDialogSmiley mSmyDialog; private SharedPreferences mSet; - private SharedPreferences mGlobalSettings; private BeemApplication mBeemApplication; private Handler mHandler; private IXmppFacade mService = null; @@ -76,25 +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(this, R.layout.messagelist, mMessages); setListAdapter(mAdapter); - */ - mToSend.setOnClickListener(this); mToSend.setOnKeyListener(this); mLogin = (TextView) findViewById(R.id.sendimlogin); + mContact = getIntent().getParcelableExtra("contact"); + setViewHeader(); mText = (TextView) findViewById(R.id.sendimlist); mScrolling = (ScrollView) findViewById(R.id.sendimscroll); } private void setViewHeader() { - String status = mContact.getMsgState(); - if (status == null) - status = getString(R.string.SendIMNoStatusSet); - else - status = mContact.getMsgState(); - mLogin.setText(mContact.getJID() + "\n" + status); + mLogin = (TextView) findViewById(R.id.sendimlogin); + 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 @@ -123,6 +119,7 @@ mChat = mChatManager.createChat(mContact, mMessageListener); String text = mChat.getLastMessages(); if (!"".equals(text)) { + mText.append(mContact.getJID() + " " + getString(R.string.SendIMSays)); mText.append(text); mChat.clearLastMessages(); } @@ -137,11 +134,11 @@ @Override protected void onStop() { - // TODO Auto-generated method stub - super.onStop(); - mBeemApplication.unbindBeemService(); + // TODO Auto-generated method stub + super.onStop(); + mBeemApplication.unbindBeemService(); } - + @Override protected void onDestroy() { super.onDestroy(); @@ -207,8 +204,9 @@ } /** - * Callback for menu creation. - * @param menu the menu created + * Callback for menu creation. <<<<<<< local + * @param menu the menu created ======= + * @param menu The created menu >>>>>>> other * @return true on success, false otherwise */ @Override @@ -235,7 +233,6 @@ @Override public void chatCreated(IChat chat, boolean locally) throws RemoteException { Log.i("LOG", "chatCreated"); - } } @@ -244,13 +241,9 @@ @Override public void processMessage(IChat chat, Message msg) throws RemoteException { - Log.i("LOG", "processMessage"); - /* - * mAdapter.add(mContact.getJID() + " " + getString(R.string.SendIMSays) + msg.getBody()); - */ + if (chat != mChat) return; - final Message m = msg; mHandler.post(new Runnable() {