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:id="@+id/row"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="75dp"
|
android:layout_height="75dp"
|
||||||
android:background="@drawable/sel_call_first"
|
android:background="@drawable/cell_call_first"
|
||||||
android:gravity="center_vertical">
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:src="@drawable/sel_call" />
|
android:src="@drawable/cell_call" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/incoming_caller_number"
|
android:id="@+id/incoming_caller_number"
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class AudioCallFragment extends Fragment implements OnClickListener {
|
||||||
setContactName(callView, lAddress, sipUri, resources);
|
setContactName(callView, lAddress, sipUri, resources);
|
||||||
boolean hide = displayCallStatusIconAndReturnCallPaused(callView, call);
|
boolean hide = displayCallStatusIconAndReturnCallPaused(callView, call);
|
||||||
displayOrHideContactPicture(callView, pictureUri, hide);
|
displayOrHideContactPicture(callView, pictureUri, hide);
|
||||||
setRowBackgroundAndPadding(callView, resources, index);
|
setRowBackgroundAndPadding(callView, resources, index, !hide);
|
||||||
registerCallDurationTimer(callView, call);
|
registerCallDurationTimer(callView, call);
|
||||||
previousCallIsActive = !hide;
|
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) {
|
if (index == 0) {
|
||||||
callView.findViewById(R.id.row).setBackgroundResource(R.drawable.sel_call_first);
|
// backgroundResource = active ? R.drawable.cell_call_first_highlight : R.drawable.cell_call_first;
|
||||||
} else {
|
backgroundResource = R.drawable.cell_call_first;
|
||||||
callView.findViewById(R.id.row).setBackgroundResource(R.drawable.sel_call);
|
} 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) {
|
if (previousCallIsActive) {
|
||||||
callView.setPadding(0, LinphoneUtils.pixelsToDpi(resources, topMarginWithImage * index), 0, 0);
|
callView.setPadding(0, LinphoneUtils.pixelsToDpi(resources, topMarginWithImage * index), 0, 0);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -794,12 +794,12 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
try {
|
try {
|
||||||
mTimer.cancel();
|
mTimer.cancel();
|
||||||
mLc.destroy();
|
mLc.destroy();
|
||||||
mServiceContext.unregisterReceiver(instance.mKeepAliveReceiver);
|
|
||||||
}
|
}
|
||||||
catch (RuntimeException e) {
|
catch (RuntimeException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
|
mServiceContext.unregisterReceiver(instance.mKeepAliveReceiver);
|
||||||
mLc = null;
|
mLc = null;
|
||||||
instance = null;
|
instance = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue