Rework disabled images and call activity button
BIN
res/drawable-xhdpi/backspace_disabled.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
res/drawable-xhdpi/camera_disabled.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
res/drawable-xhdpi/contact_add_disabled.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
res/drawable-xhdpi/delete_disabled.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
res/drawable-xhdpi/edit_list_disabled.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
res/drawable-xhdpi/menu_disabled.png
Normal file
After Width: | Height: | Size: 405 B |
BIN
res/drawable-xhdpi/micro_disabled.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
res/drawable-xhdpi/options_add_call_disabled.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
res/drawable-xhdpi/options_disabled.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
res/drawable-xhdpi/options_start_conference_disabled.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
res/drawable-xhdpi/options_transfer_call_disabled.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
res/drawable-xhdpi/speaker_disabled.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
res/drawable-xhdpi/valid_disabled.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bitmap
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/backspace_default"
|
||||
android:alpha="0.2" />
|
7
res/drawable/camera_button.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_enabled="false"
|
||||
android:drawable="@drawable/camera_disabled" />
|
||||
<item
|
||||
android:drawable="@drawable/camera_default" />
|
||||
</selector>
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bitmap
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/contact_add"
|
||||
android:alpha="0.2" />
|
7
res/drawable/delete_button.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_enabled="false"
|
||||
android:drawable="@drawable/delete_disabled" />
|
||||
<item
|
||||
android:drawable="@drawable/delete" />
|
||||
</selector>
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bitmap
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/edit_list"
|
||||
android:alpha="0.2" />
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bitmap
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:src="@drawable/menu"
|
||||
android:alpha="0.3" />
|
7
res/drawable/options_add_call_button.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_enabled="false"
|
||||
android:drawable="@drawable/options_add_call_disabled" />
|
||||
<item
|
||||
android:drawable="@drawable/options_add_call" />
|
||||
</selector>
|
7
res/drawable/options_start_conference_button.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_enabled="false"
|
||||
android:drawable="@drawable/options_start_conference_disabled" />
|
||||
<item
|
||||
android:drawable="@drawable/options_start_conference" />
|
||||
</selector>
|
7
res/drawable/options_transfer_call_button.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_enabled="false"
|
||||
android:drawable="@drawable/options_transfer_call_disabled" />
|
||||
<item
|
||||
android:drawable="@drawable/options_transfer_call" />
|
||||
</selector>
|
|
@ -62,6 +62,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="5dp"
|
||||
android:gravity="center"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_gravity="center"/>
|
||||
|
||||
|
@ -206,7 +207,7 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/video"
|
||||
android:src="@drawable/camera_default"
|
||||
android:src="@drawable/camera_button"
|
||||
android:background="@drawable/button_background"
|
||||
android:padding="20dp"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -331,7 +332,7 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/add_call"
|
||||
android:src="@drawable/options_add_call"
|
||||
android:src="@drawable/options_add_call_button"
|
||||
android:background="@drawable/button_background"
|
||||
android:padding="15dp"
|
||||
android:visibility="invisible"
|
||||
|
@ -372,7 +373,7 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/transfer"
|
||||
android:src="@drawable/options_transfer_call"
|
||||
android:src="@drawable/options_transfer_call_button"
|
||||
android:background="@drawable/button_background"
|
||||
android:padding="15dp"
|
||||
android:visibility="invisible"
|
||||
|
@ -412,7 +413,7 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/conference"
|
||||
android:src="@drawable/options_start_conference"
|
||||
android:src="@drawable/options_start_conference_button"
|
||||
android:background="@drawable/button_background"
|
||||
android:visibility="invisible"
|
||||
android:padding="15dp"
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:gravity="center"
|
||||
android:paddingTop="5dp"/>
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:gravity="center"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:paddingTop="5dp"/>
|
||||
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
android:inputType="textMultiLine"
|
||||
android:maxLines="3"
|
||||
android:padding="5dp"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/delete"
|
||||
android:src="@drawable/delete"
|
||||
android:src="@drawable/delete_button"
|
||||
android:background="@drawable/toolbar_button"
|
||||
android:contentDescription="@string/content_description_valid"
|
||||
android:layout_width="0dp"
|
||||
|
|
|
@ -457,25 +457,9 @@ public class CallActivity extends Activity implements OnClickListener, SensorEve
|
|||
}
|
||||
|
||||
private void refreshIncallUi(){
|
||||
int confsize = 0;
|
||||
|
||||
if(LinphoneManager.getLc().isInConference()) {
|
||||
confsize = LinphoneManager.getLc().getConferenceSize() - (LinphoneManager.getLc().isInConference() ? 1 : 0);
|
||||
}
|
||||
|
||||
//Enabled transfer button
|
||||
if(isTransferAllowed)
|
||||
enabledTransferButton(true);
|
||||
|
||||
//Enable conference button
|
||||
if(LinphoneManager.getLc().getCallsNb() > 1 && LinphoneManager.getLc().getCallsNb() > confsize) {
|
||||
enabledConferenceButton(true);
|
||||
} else {
|
||||
enabledConferenceButton(false);
|
||||
}
|
||||
|
||||
refreshInCallActions();
|
||||
refreshCallList(getResources());
|
||||
enableAndRefreshInCallActions();
|
||||
}
|
||||
|
||||
private void refreshInCallActions() {
|
||||
|
@ -527,13 +511,32 @@ public class CallActivity extends Activity implements OnClickListener, SensorEve
|
|||
}
|
||||
|
||||
private void enableAndRefreshInCallActions() {
|
||||
addCall.setEnabled(LinphoneManager.getLc().getCallsNb() < LinphoneManager.getLc().getMaxCalls());
|
||||
transfer.setEnabled(getResources().getBoolean(R.bool.allow_transfers));
|
||||
int confsize = 0;
|
||||
|
||||
if(LinphoneManager.getLc().isInConference()) {
|
||||
confsize = LinphoneManager.getLc().getConferenceSize() - (LinphoneManager.getLc().isInConference() ? 1 : 0);
|
||||
}
|
||||
|
||||
//Enabled transfer button
|
||||
if(isTransferAllowed && !LinphoneManager.getLc().soundResourcesLocked())
|
||||
enabledTransferButton(true);
|
||||
|
||||
//Enable conference button
|
||||
if(LinphoneManager.getLc().getCallsNb() > 1 && LinphoneManager.getLc().getCallsNb() > confsize && !LinphoneManager.getLc().soundResourcesLocked()) {
|
||||
enabledConferenceButton(true);
|
||||
} else {
|
||||
enabledConferenceButton(false);
|
||||
}
|
||||
|
||||
addCall.setEnabled(LinphoneManager.getLc().getCallsNb() < LinphoneManager.getLc().getMaxCalls() && !LinphoneManager.getLc().soundResourcesLocked());
|
||||
options.setEnabled(!getResources().getBoolean(R.bool.disable_options_in_call) && (addCall.isEnabled() || transfer.isEnabled()));
|
||||
|
||||
if(LinphoneManager.getLc().getCurrentCall() != null && LinphonePreferences.instance().isVideoEnabled() && !LinphoneManager.getLc().getCurrentCall().mediaInProgress()) {
|
||||
if(LinphoneManager.getLc().getCurrentCall() != null && LinphonePreferences.instance().isVideoEnabled() && !LinphoneManager.getLc().soundResourcesLocked()) {
|
||||
enabledVideoButton(true);
|
||||
}
|
||||
if(LinphoneManager.getLc().getCurrentCall() != null && !LinphoneManager.getLc().soundResourcesLocked()){
|
||||
enabledPauseButton(true);
|
||||
}
|
||||
micro.setEnabled(true);
|
||||
if(!isTablet()){
|
||||
speaker.setEnabled(true);
|
||||
|
@ -541,7 +544,6 @@ public class CallActivity extends Activity implements OnClickListener, SensorEve
|
|||
transfer.setEnabled(true);
|
||||
pause.setEnabled(true);
|
||||
dialer.setEnabled(true);
|
||||
enabledConferenceButton(true);
|
||||
}
|
||||
|
||||
public void updateStatusFragment(StatusFragment statusFragment) {
|
||||
|
@ -636,10 +638,8 @@ public class CallActivity extends Activity implements OnClickListener, SensorEve
|
|||
private void enabledVideoButton(boolean enabled){
|
||||
if(enabled) {
|
||||
video.setEnabled(true);
|
||||
video.setAlpha(1f);
|
||||
} else {
|
||||
video.setEnabled(false);
|
||||
video.setAlpha(0.2f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -656,20 +656,16 @@ public class CallActivity extends Activity implements OnClickListener, SensorEve
|
|||
private void enabledTransferButton(boolean enabled){
|
||||
if(enabled) {
|
||||
transfer.setEnabled(true);
|
||||
transfer.setImageAlpha(250);
|
||||
} else {
|
||||
transfer.setEnabled(false);
|
||||
transfer.setImageAlpha(50);
|
||||
}
|
||||
}
|
||||
|
||||
private void enabledConferenceButton(boolean enabled){
|
||||
if (enabled) {
|
||||
conference.setEnabled(true);
|
||||
conference.setImageAlpha(250);
|
||||
} else {
|
||||
conference.setEnabled(false);
|
||||
conference.setImageAlpha(50);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1357,10 +1353,6 @@ public class CallActivity extends Activity implements OnClickListener, SensorEve
|
|||
mSensorManager.registerListener(this, mProximity, SensorManager.SENSOR_DELAY_NORMAL);
|
||||
removeCallbacks();
|
||||
}
|
||||
|
||||
if(LinphoneManager.getLc().getCurrentCall() != null && !LinphoneManager.getLc().getCurrentCall().mediaInProgress()){
|
||||
enabledPauseButton(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void handleViewIntent() {
|
||||
|
|
|
@ -325,11 +325,9 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
|
|||
public void enabledDeleteButton(Boolean enabled){
|
||||
if(enabled){
|
||||
delete.setEnabled(true);
|
||||
delete.setAlpha(1f);
|
||||
} else {
|
||||
if (getNbItemsChecked() == 0){
|
||||
delete.setEnabled(false);
|
||||
delete.setAlpha(0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -158,11 +158,9 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte
|
|||
public void enabledDeleteButton(Boolean enabled){
|
||||
if(enabled){
|
||||
delete.setEnabled(true);
|
||||
delete.setAlpha(1f);
|
||||
} else {
|
||||
if (getNbItemsChecked() == 0){
|
||||
delete.setEnabled(false);
|
||||
delete.setAlpha(0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -178,11 +178,9 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
|
|||
public void enabledDeleteButton(Boolean enabled){
|
||||
if(enabled){
|
||||
delete.setEnabled(true);
|
||||
delete.setAlpha(1f);
|
||||
} else {
|
||||
if (getNbItemsChecked() == 0){
|
||||
delete.setEnabled(false);
|
||||
delete.setAlpha(0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -156,11 +156,9 @@ public class HistoryListFragment extends Fragment implements OnClickListener, On
|
|||
public void enabledDeleteButton(Boolean enabled){
|
||||
if(enabled){
|
||||
delete.setEnabled(true);
|
||||
delete.setAlpha(1f);
|
||||
} else {
|
||||
if (getNbItemsChecked() == 0){
|
||||
delete.setEnabled(false);
|
||||
delete.setAlpha(0.2f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|