Improved popup messages

This commit is contained in:
Sylvain Berfini 2012-09-19 09:59:22 +02:00
parent 9b32fe8608
commit deb577f0e2
34 changed files with 15 additions and 21 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 931 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 3 KiB

BIN
res/drawable/popup.9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 B

View file

@ -3,20 +3,15 @@
android:id="@+id/toastRoot" android:id="@+id/toastRoot"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/zrtp_popup" android:background="@drawable/popup"
android:orientation="vertical" > android:orientation="vertical" >
<TextView <TextView
android:id="@+id/toastTitle" android:id="@+id/toastMessage"
android:textColor="@android:color/white"
android:padding="5dp"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textAppearance="?android:attr/textAppearanceMedium" />
<TextView
android:id="@+id/toastMessage"
android:textColor="@android:color/black"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout> </LinearLayout>

View file

@ -132,12 +132,18 @@ public class IncomingCallActivity extends Activity implements LinphoneOnCallStat
// the above method takes care of Samsung Galaxy S // the above method takes care of Samsung Galaxy S
Toast.makeText(this, R.string.couldnt_accept_call, Toast.LENGTH_LONG).show(); Toast.makeText(this, R.string.couldnt_accept_call, Toast.LENGTH_LONG).show();
} else { } else {
if (mCall.getCurrentParamsCopy().getVideoEnabled()) if (!LinphoneActivity.isInstanciated()) {
return;
}
if (mCall.getCurrentParamsCopy().getVideoEnabled()) {
LinphoneActivity.instance().startVideoActivity(mCall); LinphoneActivity.instance().startVideoActivity(mCall);
else }
else {
LinphoneActivity.instance().startIncallActivity(mCall); LinphoneActivity.instance().startIncallActivity(mCall);
} }
} }
}
@Override @Override
public void onLeftHandleTriggered() { public void onLeftHandleTriggered() {

View file

@ -691,7 +691,7 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
@Override @Override
public void onCallStateChanged(LinphoneCall call, State state, String message) { public void onCallStateChanged(LinphoneCall call, State state, String message) {
if (state == State.Error) { if (state == State.Error) {
displayCustomToast(null, message, Toast.LENGTH_LONG); displayCustomToast(message, Toast.LENGTH_LONG);
} }
if (state == State.IncomingReceived) { if (state == State.IncomingReceived) {
@ -710,20 +710,13 @@ public class LinphoneActivity extends FragmentActivity implements OnClickListene
displayMissedCalls(missedCalls); displayMissedCalls(missedCalls);
} }
private void displayCustomToast(final String title, final String message, final int duration) { private void displayCustomToast(final String message, final int duration) {
mHandler.post(new Runnable() { mHandler.post(new Runnable() {
@Override @Override
public void run() { public void run() {
LayoutInflater inflater = getLayoutInflater(); LayoutInflater inflater = getLayoutInflater();
View layout = inflater.inflate(R.layout.toast, (ViewGroup) findViewById(R.id.toastRoot)); View layout = inflater.inflate(R.layout.toast, (ViewGroup) findViewById(R.id.toastRoot));
TextView toastTitle = (TextView) layout.findViewById(R.id.toastTitle);
if (title == null) {
toastTitle.setVisibility(View.GONE);
} else {
toastTitle.setText(title);
}
TextView toastText = (TextView) layout.findViewById(R.id.toastMessage); TextView toastText = (TextView) layout.findViewById(R.id.toastMessage);
toastText.setText(message); toastText.setText(message);