Added paused/running icon for each call
This commit is contained in:
parent
ca7c941930
commit
30becf5989
9 changed files with 28 additions and 12 deletions
BIN
res/drawable/delete_default.png
Normal file
BIN
res/drawable/delete_default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
BIN
res/drawable/delete_over.png
Normal file
BIN
res/drawable/delete_over.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2 KiB |
BIN
res/drawable/pause_default
Normal file
BIN
res/drawable/pause_default
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
res/drawable/pause_over
Normal file
BIN
res/drawable/pause_over
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
res/drawable/play_default
Normal file
BIN
res/drawable/play_default
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
res/drawable/play_over
Normal file
BIN
res/drawable/play_over
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
|
@ -15,19 +15,29 @@
|
||||||
android:id="@+id/contactNameOrNumber"
|
android:id="@+id/contactNameOrNumber"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="0.3"
|
android:layout_weight="0.4"
|
||||||
android:gravity="left"
|
android:gravity="center_vertical|left"
|
||||||
android:paddingLeft="20dp"
|
android:paddingLeft="20dp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="22dp" />
|
android:textSize="22dp" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/callStatus"
|
||||||
|
android:layout_width="35dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/pause_default" />
|
||||||
|
|
||||||
<Chronometer
|
<Chronometer
|
||||||
android:id="@+id/callTimer"
|
android:id="@+id/callTimer"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:paddingRight="20dp"
|
android:paddingRight="20dp"
|
||||||
android:gravity="right"
|
android:gravity="center_vertical|right"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="22dp" />
|
android:textSize="22dp" />
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
import org.linphone.core.LinphoneAddress;
|
import org.linphone.core.LinphoneAddress;
|
||||||
import org.linphone.core.LinphoneCall;
|
import org.linphone.core.LinphoneCall;
|
||||||
|
import org.linphone.core.LinphoneCall.State;
|
||||||
import org.linphone.core.LinphoneCoreFactory;
|
import org.linphone.core.LinphoneCoreFactory;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
@ -71,6 +72,13 @@ public class AudioCallFragment extends Fragment {
|
||||||
contact.setText(lAddress.getDisplayName());
|
contact.setText(lAddress.getDisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImageView callState = (ImageView) callView.findViewById(R.id.callStatus);
|
||||||
|
if (call.getState() == State.Paused || call.getState() == State.PausedByRemote) {
|
||||||
|
callState.setImageResource(R.drawable.pause_default);
|
||||||
|
} else {
|
||||||
|
callState.setImageResource(R.drawable.play_default);
|
||||||
|
}
|
||||||
|
|
||||||
ImageView contactPicture = (ImageView) callView.findViewById(R.id.contactPicture);
|
ImageView contactPicture = (ImageView) callView.findViewById(R.id.contactPicture);
|
||||||
if (pictureUri != null) {
|
if (pictureUri != null) {
|
||||||
LinphoneUtils.setImagePictureFromUri(callView.getContext(), contactPicture, Uri.parse(pictureUri.toString()), R.drawable.unknown_small);
|
LinphoneUtils.setImagePictureFromUri(callView.getContext(), contactPicture, Uri.parse(pictureUri.toString()), R.drawable.unknown_small);
|
||||||
|
|
|
@ -438,15 +438,13 @@ public class InCallActivity extends FragmentActivity implements
|
||||||
enableAndRefreshInCallActions();
|
enableAndRefreshInCallActions();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state == State.CallEnd || state == State.CallReleased || state == State.Error) {
|
if (audioCallFragment != null) {
|
||||||
if (audioCallFragment != null) {
|
mHandler.post(new Runnable() {
|
||||||
mHandler.post(new Runnable() {
|
@Override
|
||||||
@Override
|
public void run() {
|
||||||
public void run() {
|
audioCallFragment.refreshCallList(getResources());
|
||||||
audioCallFragment.refreshCallList(getResources());
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue