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);
}
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();
CallParams params = lc.createCallParams(null);

View file

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

View file

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

View file

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

View file

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

View file

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