tite modification sur l'activity subscription.
Reste a faire en sorte que pour l'ajout d'un contact tous les champs ne sont
pas obligatoire.
--- a/res/layout/subscription.xml Tue May 19 14:20:46 2009 +0200
+++ b/res/layout/subscription.xml Tue May 19 22:45:03 2009 +0200
@@ -3,6 +3,10 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
+
+ <TextView android:layout_width="wrap_content" android:layout_height="fill_parent" android:autoLink="none"
+ android:id="@+id/SubscriptionText" android:text="@string/SubscriptText" android:layout_weight="1" />
+
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_height="wrap_content">
@@ -14,4 +18,5 @@
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:layout_weight="1" android:text="@string/RefuseButton" />
</LinearLayout>
+
</LinearLayout>
\ No newline at end of file
--- a/res/values/strings.xml Tue May 19 14:20:46 2009 +0200
+++ b/res/values/strings.xml Tue May 19 22:45:03 2009 +0200
@@ -96,6 +96,7 @@
<string name="SubscriptAccept">Subscription accepted</string>
<string name="SubscriptError">Subscription error</string>
<string name="SubscriptRefused">Subscription refused</string>
+ <string name="SubscriptText">You have received a request for add by %s. Do you want to accept it ?</string>
<!-- ContactList class -->
<string name="ConListNotConnected">Not connected</string>
--- a/src/com/beem/project/beem/ui/Subscription.java Tue May 19 14:20:46 2009 +0200
+++ b/src/com/beem/project/beem/ui/Subscription.java Tue May 19 22:45:03 2009 +0200
@@ -16,6 +16,7 @@
import android.os.RemoteException;
import android.view.View;
import android.view.View.OnClickListener;
+import android.widget.TextView;
import android.widget.Toast;
/**
@@ -34,6 +35,9 @@
findViewById(R.id.SubscriptionAccept).setOnClickListener(mClickListener);
findViewById(R.id.SubscriptionRefuse).setOnClickListener(mClickListener);
mContact = getIntent().getStringExtra("from");
+ TextView tv = (TextView) findViewById(R.id.SubscriptionText);
+ String str = String.format(getString(R.string.SubscriptText), mContact);
+ tv.setText(str);
mService = BeemApplication.getApplication(this).getXmppFacade();
}