diff --git a/res/layout-small/main.xml b/res/layout-small/main.xml
new file mode 100644
index 000000000..48c1969d8
--- /dev/null
+++ b/res/layout-small/main.xml
@@ -0,0 +1,157 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout-small/menu_about_chat_button.xml b/res/layout-small/menu_about_chat_button.xml
new file mode 100644
index 000000000..2281d3aad
--- /dev/null
+++ b/res/layout-small/menu_about_chat_button.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout-small/menu_about_settings_button.xml b/res/layout-small/menu_about_settings_button.xml
new file mode 100644
index 000000000..94b0e5774
--- /dev/null
+++ b/res/layout-small/menu_about_settings_button.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout-small/menu_chat_button.xml b/res/layout-small/menu_chat_button.xml
new file mode 100644
index 000000000..95810bf35
--- /dev/null
+++ b/res/layout-small/menu_chat_button.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout-small/menu_contact_button.xml b/res/layout-small/menu_contact_button.xml
new file mode 100644
index 000000000..3f4703f41
--- /dev/null
+++ b/res/layout-small/menu_contact_button.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout-small/menu_history_button.xml b/res/layout-small/menu_history_button.xml
new file mode 100644
index 000000000..f9eac5f2b
--- /dev/null
+++ b/res/layout-small/menu_history_button.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout-small/menu_settings_button.xml b/res/layout-small/menu_settings_button.xml
new file mode 100644
index 000000000..6a596742d
--- /dev/null
+++ b/res/layout-small/menu_settings_button.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout-small/status.xml b/res/layout-small/status.xml
new file mode 100644
index 000000000..d3cc1c1ec
--- /dev/null
+++ b/res/layout-small/status.xml
@@ -0,0 +1,236 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/raw/linphonerc b/res/raw/linphonerc
index 184453451..d4c151f80 100644
--- a/res/raw/linphonerc
+++ b/res/raw/linphonerc
@@ -38,6 +38,7 @@ remote_ring=/data/data/org.linphone/files/ringback.wav
local_ring=/data/data/org.linphone/files/oldphone_mono.wav
ec_tail_len=120
ec_framesize=128
+dtmf_player_amp=0.1
el_type=mic
el_thres=0.03
diff --git a/src/org/linphone/ui/AddressText.java b/src/org/linphone/ui/AddressText.java
index a0b0a3c35..e731edd09 100644
--- a/src/org/linphone/ui/AddressText.java
+++ b/src/org/linphone/ui/AddressText.java
@@ -81,7 +81,7 @@ public class AddressText extends EditText implements AddressType {
if (resizedText.equals("") && getHint() != null) {
resizedText = getHint().toString();
}
- refitText(resizedText, getWidth());
+ refitText(resizedText, getWidth(), getHeight());
if (dialer != null) {
dialer.enableDisableAddContact();
@@ -97,16 +97,17 @@ public class AddressText extends EditText implements AddressType {
if (resizedText.equals("") && getHint() != null) {
resizedText = getHint().toString();
}
- refitText(resizedText, getWidth());
+ refitText(resizedText, getWidth(), getHeight());
}
}
- private void refitText(String text, int textWidth) {
+ private void refitText(String text, int textWidth, int textHeight) {
if (textWidth <= 0) {
return;
}
int targetWidth = textWidth - getPaddingLeft() - getPaddingRight();
+ int targetHeight = textHeight - getPaddingTop() - getPaddingBottom();
float hi = 90;
float lo = 2;
final float threshold = 0.5f;
@@ -116,7 +117,7 @@ public class AddressText extends EditText implements AddressType {
while ((hi - lo) > threshold) {
float size = (hi + lo) / 2;
mTestPaint.setTextSize(size);
- if (mTestPaint.measureText(text) >= targetWidth) {
+ if (mTestPaint.measureText(text) >= targetWidth || size >= targetHeight) {
hi = size;
}
else {
@@ -136,7 +137,7 @@ public class AddressText extends EditText implements AddressType {
if (resizedText.equals("") && getHint() != null) {
resizedText = getHint().toString();
}
- refitText(resizedText, parentWidth);
+ refitText(resizedText, parentWidth, height);
setMeasuredDimension(parentWidth, height);
}