Merge.
--- a/AndroidManifest.xml Sun Sep 27 20:11:47 2009 +0200
+++ b/AndroidManifest.xml Sun Sep 27 20:16:58 2009 +0200
@@ -54,6 +54,12 @@
android:name="com.beem.project.beem.service.XmppConnectionAdapter.CONNECTION_CLOSED" />
</intent-filter>
</activity>
+ <activity android:name=".ui.UserInfo" android:label="@string/user_info_name">
+ <intent-filter android:label="Beem Connection">
+ <action
+ android:name="com.beem.project.beem.service.XmppConnectionAdapter.CONNECTION_CLOSED" />
+ </intent-filter>
+ </activity>
<activity android:name=".jingle.demo.JingleCallActivity"
android:label="JingleDemoCall">
<intent-filter>
--- a/res/layout/contactlist.xml Sun Sep 27 20:11:47 2009 +0200
+++ b/res/layout/contactlist.xml Sun Sep 27 20:16:58 2009 +0200
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout android:id="@+id/linlayoutBase"
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
- android:orientation="vertical" xmlns:android="http://schemas.android.com/apk/res/android">
+ android:orientation="vertical">
<Gallery xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gallery" android:layout_width="fill_parent"
--- a/res/layout/contactlistgroup.xml Sun Sep 27 20:11:47 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="horizontal"
- android:layout_width="fill_parent"
- android:layout_height="50sp"
- android:paddingTop="5sp"
- android:gravity="center_vertical">
-
- <TextView android:id="@+id/textgroup"
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:minHeight="30sp"
- android:paddingLeft="40sp" />
-
-</LinearLayout>
\ No newline at end of file
--- a/res/layout/contactlistsettings.xml Sun Sep 27 20:11:47 2009 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<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">
-
- <TextView android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:text="@string/CLSServerConnection"
- android:textSize="18sp" />
- <LinearLayout android:orientation="horizontal"
- android:layout_width="fill_parent" android:layout_height="wrap_content">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:text="@string/CLSUserid"
- android:minWidth="90dp" android:textSize="14sp" />
- <EditText android:id="@+id/userid" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:singleLine="true"
- android:textSize="14sp" android:autoText="false" android:capitalize="none"
- android:scrollHorizontally="true" />
- </LinearLayout>
-
- <LinearLayout android:orientation="horizontal"
- android:layout_width="fill_parent" android:layout_height="wrap_content">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:text="@string/CLSHostPort"
- android:minWidth="90dp" android:textSize="14sp" />
- <EditText android:id="@+id/host" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:singleLine="true"
- android:textSize="14sp" android:autoText="false" android:capitalize="none"
- android:layout_weight="2" android:scrollHorizontally="true" />
- <EditText android:id="@+id/port" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:singleLine="true"
- android:textSize="14sp" android:autoText="false" android:capitalize="none"
- android:layout_weight="3" android:scrollHorizontally="true" />
- </LinearLayout>
-
- <LinearLayout android:orientation="horizontal"
- android:layout_width="fill_parent" android:layout_height="wrap_content">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:text="@string/CLSPassword"
- android:minWidth="90dp" android:textSize="14sp" />
- <EditText android:id="@+id/password" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:singleLine="true"
- android:password="true" android:textSize="14sp" android:autoText="false"
- android:capitalize="none" android:scrollHorizontally="true" />
- </LinearLayout>
-
- <TextView android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:text=""
- android:textSize="18sp" />
-
- <Spinner android:id="@+id/proxy_type" android:layout_width="fill_parent"
- android:layout_height="wrap_content" />
-
- <LinearLayout android:id="@+id/proxy_layout"
- android:orientation="vertical" android:layout_width="fill_parent"
- android:layout_height="0sp">
-
- <TextView android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:text="@string/CLSProxyInfo"
- android:textSize="18sp" />
-
- <LinearLayout android:orientation="horizontal"
- android:layout_width="fill_parent" android:layout_height="wrap_content">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:text="@string/CLSHostPort"
- android:minWidth="90dp" android:textSize="14sp" />
- <EditText android:id="@+id/proxy_host"
- android:layout_width="fill_parent" android:layout_height="wrap_content"
- android:singleLine="true" android:textSize="14sp" android:autoText="false"
- android:capitalize="none" android:layout_weight="2"
- android:scrollHorizontally="true" />
- <EditText android:id="@+id/proxy_port"
- android:layout_width="fill_parent" android:layout_height="wrap_content"
- android:singleLine="true" android:textSize="14sp" android:autoText="false"
- android:capitalize="none" android:layout_weight="3"
- android:scrollHorizontally="true" />
- </LinearLayout>
-
- <LinearLayout android:orientation="horizontal"
- android:layout_width="fill_parent" android:layout_height="wrap_content">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:text="@string/CLSLogin"
- android:minWidth="90dp" android:textSize="14sp" />
- <EditText android:id="@+id/proxy_login"
- android:layout_width="fill_parent" android:layout_height="wrap_content"
- android:singleLine="true" android:textSize="14sp" android:autoText="false"
- android:capitalize="none" android:scrollHorizontally="true" />
- </LinearLayout>
-
- <LinearLayout android:orientation="horizontal"
- android:layout_width="fill_parent" android:layout_height="wrap_content">
- <TextView android:layout_width="wrap_content"
- android:layout_height="wrap_content" android:text="@string/CLSPassword"
- android:minWidth="90dp" android:textSize="14sp" />
- <EditText android:id="@+id/proxy_pwd" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:singleLine="true"
- android:password="true" android:textSize="14sp" android:autoText="false"
- android:capitalize="none" android:scrollHorizontally="true" />
- </LinearLayout>
- </LinearLayout>
- <Button android:id="@+id/ok" android:layout_width="fill_parent"
- android:layout_height="wrap_content" android:layout_gravity="center_horizontal"
- android:text="@string/CLSOkButton">
- <requestFocus />
- </Button>
- </LinearLayout>
-</ScrollView>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/res/layout/userinfo.xml Sun Sep 27 20:16:58 2009 +0200
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical" android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
+ <ListView android:id="@+id/userinfo" android:layout_width="fill_parent"
+ android:layout_height="fill_parent" />
+</LinearLayout>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/res/layout/userinfo_alias.xml Sun Sep 27 20:16:58 2009 +0200
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical" android:layout_width="fill_parent"
+ android:layout_height="wrap_content">
+ <TextView android:id="@+id/userinfo_alias_label"
+ android:layout_width="fill_parent" android:layout_height="wrap_content"
+ android:paddingLeft="20sp" android:singleLine="true" android:maxLines="1"
+ android:textSize="30px" android:text="Alias" />
+ <TextView android:id="@+id/userinfo_alias_def"
+ android:layout_width="fill_parent" android:layout_height="wrap_content"
+ android:paddingLeft="20sp" android:singleLine="true"
+ android:text="Modifier le nom affiche de votre contact" />
+</LinearLayout>
\ No newline at end of file
--- a/res/values-en/strings.xml Sun Sep 27 20:11:47 2009 +0200
+++ b/res/values-en/strings.xml Sun Sep 27 20:16:58 2009 +0200
@@ -20,7 +20,8 @@
<!-- Preferences informations -->
<string name="PreferenceStatus">status</string>
<string name="PreferenceStatusText">status_text</string>
- <string name="PreferenceIsConfigured">preference_is_configured</string>
+ <string name="PreferenceIsConfigured">preference_is_configured
+ </string>
<!-- ContactListSettings class -->
<string name="CLSServerConnection">Server connection</string>
@@ -44,7 +45,7 @@
</string>
<string name="CDSure2DeleteYes">Yes</string>
<string name="CDSure2DeleteNo">No</string>
-
+
<!-- AddContact class -->
<string name="AddCActTitle">Beem - Add contact</string>
@@ -107,15 +108,13 @@
Activities
-->
<string name="login_tag">BEEM - Login Activity</string>
-
<string name="edit_settings_name">BEEM - Settings</string>
- <string name="edit_settings_tag">BEEM - EditSettings Activity</string>
-
+ <string name="edit_settings_tag">BEEM - EditSettings Activity</string>
<string name="create_account_name">BEEM - Create an account</string>
<string name="create_account_tag">BEEM - CreateAccount Activity</string>
-
<string name="contact_list_name">BEEM - Contacts</string>
<string name="contact_list_tag">BEEM - ContactList Activity</string>
+ <string name="user_info_name">BEEM - User Info</string>
<!--
--- a/res/values-fr/strings.xml Sun Sep 27 20:11:47 2009 +0200
+++ b/res/values-fr/strings.xml Sun Sep 27 20:16:58 2009 +0200
@@ -111,6 +111,7 @@
<string name="create_account_tag">BEEM - CreateAccount Activity</string>
<string name="contact_list_name">BEEM - Contacts</string>
<string name="contact_list_tag">BEEM - ContactList Activity</string>
+ <string name="user_info_name">BEEM - Informations</string>
<!--
Buttons
--- a/src/com/beem/project/beem/ui/ContactDialog.java Sun Sep 27 20:11:47 2009 +0200
+++ b/src/com/beem/project/beem/ui/ContactDialog.java Sun Sep 27 20:16:58 2009 +0200
@@ -49,10 +49,10 @@
button.setOnClickListener(new deleteListener());
button = (Button) findViewById(R.id.CDResend);
button.setOnClickListener(new resendListener());
+ button = (Button) findViewById(R.id.CDBlock);
+ button.setOnClickListener(new blockListener());
button = (Button) findViewById(R.id.CDInfos);
button.setOnClickListener(new infosListener());
- button = (Button) findViewById(R.id.CDBlock);
- button.setOnClickListener(new blockListener());
button = (Button) findViewById(R.id.CDCall);
button.setOnClickListener(new CallListener());
@@ -149,7 +149,11 @@
class infosListener implements View.OnClickListener {
@Override
- public void onClick(View v) {
+ public void onClick(View v) {
+ Activity a = ContactDialog.this.getOwnerActivity();
+ Intent i = new Intent(mContext, UserInfo.class);
+ i.setData(mContact.toUri());
+ a.startActivity(i);
dismiss();
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/com/beem/project/beem/ui/UserInfo.java Sun Sep 27 20:16:58 2009 +0200
@@ -0,0 +1,116 @@
+package com.beem.project.beem.ui;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import android.app.Activity;
+import android.content.Context;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.BaseAdapter;
+import android.widget.ListView;
+import android.widget.AdapterView.OnItemClickListener;
+
+import com.beem.project.beem.R;
+import com.beem.project.beem.service.Contact;
+
+/**
+ * This activity class provides the view for user infos after long click on a correspondant.
+ * @author marseille
+ */
+public class UserInfo extends Activity {
+
+ private Contact mContact;
+ private static final List<String> mInfo = new ArrayList<String>();
+
+ static {
+ mInfo.add("alias");
+ }
+
+ /**
+ * Constructor.
+ */
+ public UserInfo() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.userinfo);
+ mContact = new Contact(getIntent().getData());
+ setTitle(mContact.getName());
+ ListView listview = (ListView) findViewById(R.id.userinfo);
+ listview.setAdapter(new BeemUserInfo(this));
+ listview.setOnItemClickListener(new BeemUserInfoClick());
+ }
+
+ /**
+ * Event simple click on item of the user info.
+ */
+ public class BeemUserInfoClick implements OnItemClickListener {
+ @Override
+ public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
+ Log.i("OOO", mInfo.get(arg2));
+ }
+ }
+
+ /**
+ * Adapter user info list.
+ */
+ public class BeemUserInfo extends BaseAdapter {
+ private LayoutInflater mInflater;
+
+ /**
+ * Constructor.
+ * @param c context activity.
+ */
+ public BeemUserInfo(final Context c) {
+ mInflater = LayoutInflater.from(c);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int getCount() {
+ return mInfo.size();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Object getItem(int position) {
+ return position;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public long getItemId(int position) {
+ return position;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public View getView(int position, View convertView, ViewGroup parent) {
+ View v = convertView;
+ if (convertView == null) {
+ if (position == 0)
+ v = mInflater.inflate(R.layout.userinfo_alias, null);
+ }
+ return v;
+ }
+ }
+
+}