UI small fixes

This commit is contained in:
Sylvain Berfini 2019-03-13 17:38:56 +01:00
parent 7a93660d12
commit 76b9dd976a
6 changed files with 33 additions and 15 deletions

View file

@ -58,7 +58,8 @@ public class CallManager {
inviteAddress(lAddress, false); inviteAddress(lAddress, false);
} }
public void inviteAddress(Address lAddress, boolean videoEnabled, boolean lowBandwidth, boolean forceZRTP) { public void inviteAddress(
Address lAddress, boolean videoEnabled, boolean lowBandwidth, boolean forceZRTP) {
Core lc = LinphoneManager.getLc(); Core lc = LinphoneManager.getLc();
CallParams params = lc.createCallParams(null); CallParams params = lc.createCallParams(null);

View file

@ -406,7 +406,7 @@ public class ChatMessagesFragment extends Fragment
if (data != null) { if (data != null) {
if (requestCode == ADD_PHOTO && resultCode == Activity.RESULT_OK) { if (requestCode == ADD_PHOTO && resultCode == Activity.RESULT_OK) {
String fileToUploadPath = null; String fileToUploadPath = null;
if (data != null && data.getData() != null) { if (data.getData() != null) {
if (data.getData().toString().contains("com.android.contacts/contacts/")) { if (data.getData().toString().contains("com.android.contacts/contacts/")) {
if (FileUtils.getCVSPathFromLookupUri(data.getData().toString()) != null) { if (FileUtils.getCVSPathFromLookupUri(data.getData().toString()) != null) {
fileToUploadPath = fileToUploadPath =
@ -448,10 +448,13 @@ public class ChatMessagesFragment extends Fragment
} }
} else { } else {
if (FileUtils.isExtensionImage(mImageToUploadUri.getPath())) { if (FileUtils.isExtensionImage(mImageToUploadUri.getPath())) {
File file = new File(mImageToUploadUri.getPath());
if (file.exists()) {
addImageToPendingList(mImageToUploadUri.getPath()); addImageToPendingList(mImageToUploadUri.getPath());
} }
} }
} }
}
@Override @Override
public void onDeleteSelection(Object[] objectsToDelete) { public void onDeleteSelection(Object[] objectsToDelete) {

View file

@ -1,7 +1,15 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" <item android:state_pressed="true">
android:drawable="@drawable/chat_file_over" /> <bitmap android:src="@drawable/chat_file_over"
<item android:tint="?attr/drawableTintOverColor"/>
android:drawable="@drawable/chat_file_default" /> </item>
<item android:state_enabled="false">
<bitmap android:src="@drawable/chat_file_over"
android:tint="?attr/drawableTintDisabledColor"/>
</item>
<item>
<bitmap android:src="@drawable/chat_file_over"
android:tint="?attr/drawableTintColor"/>
</item>
</selector> </selector>

View file

@ -1,8 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" <item android:state_pressed="true">
android:drawable="@drawable/chat_send_over" /> <bitmap android:src="@drawable/chat_send_over"
<item android:tint="?attr/drawableTintOverColor"/>
android:drawable="@drawable/chat_send_default" /> </item>
<item android:state_enabled="false">
<bitmap android:src="@drawable/chat_send_over"
android:tint="?attr/drawableTintDisabledColor"/>
</item>
<item>
<bitmap android:src="@drawable/chat_send_over"
android:tint="?attr/drawableTintColor"/>
</item>
</selector> </selector>

View file

@ -13,8 +13,7 @@
<FrameLayout <FrameLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent">
android:layout_marginTop="40dp">
<LinearLayout <LinearLayout
android:id="@+id/fragmentContainer" android:id="@+id/fragmentContainer"

View file

@ -128,13 +128,13 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:gravity="center_vertical"
android:background="?attr/backgroundColor"
android:orientation="horizontal"> android:orientation="horizontal">
<ImageView <ImageView
android:id="@+id/send_picture" android:id="@+id/send_picture"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/round_button_background"
android:contentDescription="@string/content_description_send_file" android:contentDescription="@string/content_description_send_file"
android:padding="5dp" android:padding="5dp"
android:src="@drawable/chat_file" /> android:src="@drawable/chat_file" />
@ -159,7 +159,6 @@
android:id="@+id/send_message" android:id="@+id/send_message"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/round_button_background"
android:contentDescription="@string/content_description_send_message" android:contentDescription="@string/content_description_send_message"
android:padding="5dp" android:padding="5dp"
android:src="@drawable/chat_send_message" /> android:src="@drawable/chat_send_message" />