Resources cleanup
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 478 B |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 7.3 KiB |
BIN
res/drawable-xhdpi/call_start_default.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.7 KiB |
BIN
res/drawable-xhdpi/chat_file_default.png
Normal file
After Width: | Height: | Size: 960 B |
BIN
res/drawable-xhdpi/chat_file_over.png
Normal file
After Width: | Height: | Size: 670 B |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 449 B |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 628 B |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 6.2 KiB |
BIN
res/drawable-xhdpi/chat_start_default.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1,015 B |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1,015 B |
Before Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 995 B |
Before Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item
|
||||
android:bottom="40dp"
|
||||
android:left="20dp"
|
||||
android:right="20dp"
|
||||
android:top="40dp">
|
||||
|
||||
<bitmap android:src="@drawable/cancel_edit"/>
|
||||
</item>
|
||||
</layer-list>
|
5
res/drawable/chat_attachment.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||
<solid android:color="@color/colorA"/>
|
||||
<size android:width="120dp" android:height="120dp"/>
|
||||
</shape>
|
7
res/drawable/chat_file.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?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" />
|
||||
</selector>
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<solid android:color="@android:color/darker_gray" />
|
||||
|
||||
<padding
|
||||
android:top="10dp"
|
||||
android:left="10dp"
|
||||
android:right="10dp"
|
||||
android:bottom="10dp"/>
|
||||
</shape>
|
|
@ -1,9 +0,0 @@
|
|||
<?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/line"/>-->
|
||||
|
||||
<!--<item-->
|
||||
<!--android:drawable="@drawable/line"/>-->
|
||||
</selector>
|
|
@ -1,7 +0,0 @@
|
|||
<?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/delete_field_over" />
|
||||
<item
|
||||
android:drawable="@drawable/delete_field_default" />
|
||||
</selector>
|
|
@ -1,8 +1,7 @@
|
|||
<?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_attachment_over" />
|
||||
android:drawable="@drawable/round_button_background_over" />
|
||||
<item
|
||||
android:drawable="@drawable/chat_attachment_default" />
|
||||
android:drawable="@drawable/round_button_background_default" />
|
||||
</selector>
|
||||
|
5
res/drawable/round_button_background_default.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||
<solid android:color="@color/colorF"/>
|
||||
<size android:width="30dp" android:height="30dp"/>
|
||||
</shape>
|
5
res/drawable/round_button_background_over.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||
<solid android:color="@color/colorA"/>
|
||||
<size android:width="30dp" android:height="30dp"/>
|
||||
</shape>
|
7
res/drawable/round_orange_button_background.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?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/round_orange_button_background_over" />
|
||||
<item
|
||||
android:drawable="@drawable/round_orange_button_background_default" />
|
||||
</selector>
|
5
res/drawable/round_orange_button_background_default.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||
<solid android:color="@color/colorA"/>
|
||||
<size android:width="30dp" android:height="30dp"/>
|
||||
</shape>
|
5
res/drawable/round_orange_button_background_over.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||
<solid android:color="@color/colorL"/>
|
||||
<size android:width="30dp" android:height="30dp"/>
|
||||
</shape>
|
|
@ -132,7 +132,8 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/send_picture"
|
||||
android:src="@drawable/chat_send_file"
|
||||
android:src="@drawable/chat_file"
|
||||
android:background="@drawable/round_button_background"
|
||||
android:contentDescription="@string/content_description_send_file"
|
||||
android:padding="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -157,6 +158,7 @@
|
|||
<ImageView
|
||||
android:id="@+id/send_message"
|
||||
android:src="@drawable/chat_send_message"
|
||||
android:background="@drawable/round_button_background"
|
||||
android:contentDescription="@string/content_description_send_message"
|
||||
android:padding="5dp"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/lastMessageFileTransfer"
|
||||
android:src="@drawable/chat_file_message"
|
||||
android:src="@drawable/chat_file"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
|
|
|
@ -65,7 +65,8 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/contact_call"
|
||||
android:src="@drawable/call_start_body_default"
|
||||
android:src="@drawable/call_start_default"
|
||||
android:background="@drawable/round_orange_button_background"
|
||||
android:contentDescription="@string/content_description_call"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
|
@ -75,7 +76,8 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/contact_chat"
|
||||
android:src="@drawable/chat_start_body_default"
|
||||
android:src="@drawable/chat_start_default"
|
||||
android:background="@drawable/round_orange_button_background"
|
||||
android:contentDescription="@string/content_description_chat"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
|
|
|
@ -181,11 +181,12 @@
|
|||
<ImageView
|
||||
android:id="@+id/add_address_field"
|
||||
android:src="@drawable/add_field_default"
|
||||
android:background="@drawable/round_orange_button_background"
|
||||
android:contentDescription="@string/content_description_add"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:paddingLeft="5dp"/>
|
||||
android:layout_marginLeft="5dp"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -221,11 +222,12 @@
|
|||
<ImageView
|
||||
android:id="@+id/add_number_field"
|
||||
android:src="@drawable/add_field_default"
|
||||
android:background="@drawable/round_orange_button_background"
|
||||
android:contentDescription="@string/content_description_add"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:paddingLeft="5dp"/>
|
||||
android:layout_marginLeft="5dp"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
|
|
@ -106,7 +106,8 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/call"
|
||||
android:src="@drawable/call_start_body_default"
|
||||
android:src="@drawable/call_start_default"
|
||||
android:background="@drawable/round_orange_button_background"
|
||||
android:contentDescription="@string/content_description_call"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
|
@ -114,7 +115,8 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/chat"
|
||||
android:src="@drawable/chat_start_body_default"
|
||||
android:src="@drawable/chat_start_default"
|
||||
android:background="@drawable/round_orange_button_background"
|
||||
android:contentDescription="@string/content_description_chat"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/account_status"
|
||||
android:src="@drawable/status_available"
|
||||
android:src="@drawable/led_connected"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:padding="5dp"
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/main_account_status"
|
||||
android:src="@drawable/status_available"
|
||||
android:src="@drawable/led_connected"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:padding="5dp"
|
||||
|
|
|
@ -642,12 +642,12 @@ public final class LinphoneService extends Service {
|
|||
mChatNotifMap.put(conferenceAddress, notif);
|
||||
}
|
||||
|
||||
Bitmap bm = null;
|
||||
Bitmap bm;
|
||||
if (fromPictureUri != null) {
|
||||
try {
|
||||
bm = MediaStore.Images.Media.getBitmap(getContentResolver(), fromPictureUri);
|
||||
} catch (Exception e) {
|
||||
bm = BitmapFactory.decodeResource(getResources(), R.drawable.topbar_avatar);
|
||||
bm = BitmapFactory.decodeResource(getResources(), R.drawable.chat_group_avatar);
|
||||
}
|
||||
} else {
|
||||
bm = BitmapFactory.decodeResource(getResources(), R.drawable.topbar_avatar);
|
||||
|
@ -680,7 +680,7 @@ public final class LinphoneService extends Service {
|
|||
mChatNotifMap.put(fromSipUri, notif);
|
||||
}
|
||||
|
||||
Bitmap bm = null;
|
||||
Bitmap bm;
|
||||
if (fromPictureUri != null) {
|
||||
try {
|
||||
bm = MediaStore.Images.Media.getBitmap(getContentResolver(), fromPictureUri);
|
||||
|
|
|
@ -464,12 +464,7 @@ public class ChatEventsAdapter extends SelectableAdapter<ChatBubbleViewHolder> {
|
|||
|
||||
private void loadBitmap(String path, ImageView imageView) {
|
||||
if (cancelPotentialWork(path, imageView)) {
|
||||
if (LinphoneUtils.isExtensionImage(path)) {
|
||||
mDefaultBitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.chat_attachment_over);
|
||||
} else {
|
||||
mDefaultBitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.chat_attachment);
|
||||
}
|
||||
|
||||
mDefaultBitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.chat_file);
|
||||
BitmapWorkerTask task = new BitmapWorkerTask(imageView);
|
||||
final AsyncBitmap asyncBitmap = new AsyncBitmap(mContext.getResources(), mDefaultBitmap, task);
|
||||
imageView.setImageDrawable(asyncBitmap);
|
||||
|
|