diff --git a/res/layout/chat.xml b/res/layout/chat.xml
index b43ce632c..b43eecd88 100644
--- a/res/layout/chat.xml
+++ b/res/layout/chat.xml
@@ -143,20 +143,18 @@
android:layout_marginBottom="10dp"
android:layout_below="@+id/top_bar"/>
-
+
\ No newline at end of file
diff --git a/res/layout/chat_bubble_incoming.xml b/res/layout/chat_bubble_incoming.xml
index 91739a4ec..3fe587400 100644
--- a/res/layout/chat_bubble_incoming.xml
+++ b/res/layout/chat_bubble_incoming.xml
@@ -69,8 +69,7 @@
android:visibility="gone"
android:layout_width="150dp"
android:layout_height="150dp"
- android:scaleType="center"
- android:layout_centerInParent="true"
+ android:scaleType="centerInside"
android:maxWidth="250dp"
android:maxHeight="250dp" />
@@ -83,8 +82,10 @@
+ android:scaleType="centerInside"
+ android:layout_centerInParent="true" />
@@ -84,7 +84,6 @@
android:contentDescription="@string/content_description_validate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginTop="10dp"
android:layout_below="@id/progress_bar"/>
diff --git a/res/layout/search_contact_cell.xml b/res/layout/search_contact_cell.xml
index 69de1b610..5fedcf401 100644
--- a/res/layout/search_contact_cell.xml
+++ b/res/layout/search_contact_cell.xml
@@ -2,7 +2,8 @@
@@ -19,6 +20,7 @@
About
Deny
No account configured
+ Search
free SIP VOIP client
@@ -44,7 +45,6 @@
Enter your login
Connection
-
Enter a number or an address
diff --git a/src/org/linphone/ChatFragment.java b/src/org/linphone/ChatFragment.java
index 279fdeea0..f4cde3cb9 100644
--- a/src/org/linphone/ChatFragment.java
+++ b/src/org/linphone/ChatFragment.java
@@ -194,6 +194,8 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
messagesList.setVisibility(View.GONE);
searchContactField.setVisibility(View.VISIBLE);
searchContactField.setAdapter(new SearchContactsListAdapter(ContactsManager.getInstance().getAllContacts(), null, inflater));
+ searchContactField.showDropDown();
+ searchContactField.requestFocus();
edit.setVisibility(View.INVISIBLE);
startCall.setVisibility(View.INVISIBLE);
contactName.setVisibility(View.INVISIBLE);
@@ -506,12 +508,18 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
LinphoneAddress lAddress = null;
try {
- lAddress = LinphoneCoreFactory.instance().createLinphoneAddress(sipUri);
- contact = ContactsManager.getInstance().findContactWithAddress(getActivity().getContentResolver(), lAddress);
+ lAddress = LinphoneManager.getLc().interpretUrl(sipUri);
+ if(contact == null)
+ contact = ContactsManager.getInstance().findContactWithAddress(getActivity().getContentResolver(), lAddress);
} catch (Exception e){
Log.w("error");
}
+ if(lAddress == null){
+ //TODO SHOW POPUP
+ LinphoneActivity.instance().displayChatList();
+ }
+
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
if (lc != null) {
chatRoom = lc.getOrCreateChatRoom(sipUri);
@@ -959,7 +967,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
if (message.getText() != null && message.getText().length() > 0) {
sendTextMessage(message.getText());
} else {
- sendImageMessage(message.getAppData(),0);
+ sendImageMessage(message.getAppData(), 0);
}
}
@@ -1017,10 +1025,12 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
newChatConversation = false;
chatRoom = LinphoneManager.getLc().getOrCreateChatRoom(address);
- if(c != null)
+ if(c != null) {
+ contact = c;
changeDisplayedChat(address,c.getName(),null);
- else
+ } else {
changeDisplayedChat(address,username,null);
+ }
dispayMessageList();
}
@@ -1119,7 +1129,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
if(constraint != null) {
for (ContactAddress c : contacts) {
String address = c.address;
- if(address.startsWith("sip")) address.substring(4);
+ if(address.startsWith("sip:")) address = address.substring(4);
if (c.contact.getName().toLowerCase().startsWith(constraint.toString()) || address.toLowerCase().startsWith(constraint.toString())) {
result.add(c);
}
diff --git a/src/org/linphone/ui/BubbleChat.java b/src/org/linphone/ui/BubbleChat.java
index b0822a134..d100e2245 100644
--- a/src/org/linphone/ui/BubbleChat.java
+++ b/src/org/linphone/ui/BubbleChat.java
@@ -382,7 +382,6 @@ public class BubbleChat implements LinphoneChatMessage.LinphoneChatMessageListen
final BitmapWorkerTask bitmapWorkerTask = getBitmapWorkerTask(imageView);
if (this == bitmapWorkerTask && imageView != null) {
imageView.setImageBitmap(bitmap);
- imageView.setScaleType(ImageView.ScaleType.FIT_XY);
imageView.setTag(path);
imageView.setOnClickListener(new OnClickListener() {
@Override