Few changes
This commit is contained in:
parent
be5414481a
commit
a72411f3c8
8 changed files with 15 additions and 8 deletions
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
BIN
res/drawable-hdpi/cell_call_first_highlight.png
Normal file
BIN
res/drawable-hdpi/cell_call_first_highlight.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
BIN
res/drawable-hdpi/cell_call_highlight.png
Normal file
BIN
res/drawable-hdpi/cell_call_highlight.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
|
@ -9,7 +9,7 @@
|
|||
android:id="@+id/row"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="75dp"
|
||||
android:background="@drawable/sel_call_first"
|
||||
android:background="@drawable/cell_call_first"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/sel_call" />
|
||||
android:src="@drawable/cell_call" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/incoming_caller_number"
|
||||
|
|
|
@ -79,7 +79,7 @@ public class AudioCallFragment extends Fragment implements OnClickListener {
|
|||
setContactName(callView, lAddress, sipUri, resources);
|
||||
boolean hide = displayCallStatusIconAndReturnCallPaused(callView, call);
|
||||
displayOrHideContactPicture(callView, pictureUri, hide);
|
||||
setRowBackgroundAndPadding(callView, resources, index);
|
||||
setRowBackgroundAndPadding(callView, resources, index, !hide);
|
||||
registerCallDurationTimer(callView, call);
|
||||
previousCallIsActive = !hide;
|
||||
}
|
||||
|
@ -127,11 +127,18 @@ public class AudioCallFragment extends Fragment implements OnClickListener {
|
|||
}
|
||||
}
|
||||
|
||||
private void setRowBackgroundAndPadding(LinearLayout callView, Resources resources, int index) {
|
||||
private void setRowBackgroundAndPadding(LinearLayout callView, Resources resources, int index, boolean active) {
|
||||
int backgroundResource;
|
||||
if (index == 0) {
|
||||
callView.findViewById(R.id.row).setBackgroundResource(R.drawable.sel_call_first);
|
||||
} else {
|
||||
callView.findViewById(R.id.row).setBackgroundResource(R.drawable.sel_call);
|
||||
// backgroundResource = active ? R.drawable.cell_call_first_highlight : R.drawable.cell_call_first;
|
||||
backgroundResource = R.drawable.cell_call_first;
|
||||
} else {
|
||||
// backgroundResource = active ? R.drawable.cell_call_highlight : R.drawable.cell_call;
|
||||
backgroundResource = R.drawable.cell_call;
|
||||
}
|
||||
callView.findViewById(R.id.row).setBackgroundResource(backgroundResource);
|
||||
|
||||
if (index != 0) {
|
||||
if (previousCallIsActive) {
|
||||
callView.setPadding(0, LinphoneUtils.pixelsToDpi(resources, topMarginWithImage * index), 0, 0);
|
||||
} else {
|
||||
|
|
|
@ -794,12 +794,12 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
try {
|
||||
mTimer.cancel();
|
||||
mLc.destroy();
|
||||
mServiceContext.unregisterReceiver(instance.mKeepAliveReceiver);
|
||||
}
|
||||
catch (RuntimeException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
finally {
|
||||
mServiceContext.unregisterReceiver(instance.mKeepAliveReceiver);
|
||||
mLc = null;
|
||||
instance = null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue