Enhanced uri picker activity (image buttons)
This commit is contained in:
parent
3f9b721a48
commit
df8093eb93
5 changed files with 8 additions and 2 deletions
|
@ -44,7 +44,9 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity android:name="org.linphone.UriPickerActivity" android:theme="@android:style/Theme.NoTitleBar">
|
<activity android:name="org.linphone.UriPickerActivity"
|
||||||
|
android:theme="@android:style/Theme.NoTitleBar"
|
||||||
|
android:screenOrientation="portrait">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
BIN
res/drawable/picker_plus.png
Normal file
BIN
res/drawable/picker_plus.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 426 B |
BIN
res/drawable/picker_transfer.png
Normal file
BIN
res/drawable/picker_transfer.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
|
@ -26,10 +26,11 @@
|
||||||
<LinearLayout android:gravity="bottom"
|
<LinearLayout android:gravity="bottom"
|
||||||
android:layout_height="wrap_content" android:layout_width="fill_parent">
|
android:layout_height="wrap_content" android:layout_width="fill_parent">
|
||||||
<Button android:id="@+id/AddCallButton" android:text="@string/AddCallButtonText"
|
<Button android:id="@+id/AddCallButton" android:text="@string/AddCallButtonText"
|
||||||
|
android:gravity="bottom|center_horizontal"
|
||||||
android:layout_height="fill_parent" android:layout_width="fill_parent"
|
android:layout_height="fill_parent" android:layout_width="fill_parent"
|
||||||
android:layout_weight="1" android:background="@drawable/clavier_bg" />
|
android:layout_weight="1" android:background="@drawable/clavier_bg" />
|
||||||
<Button android:id="@+id/AddCallCancelButton" android:text="@string/CancelButtonText"
|
<Button android:id="@+id/AddCallCancelButton" android:text="@string/CancelButtonText"
|
||||||
android:layout_height="fill_parent" android:layout_width="fill_parent"
|
android:layout_height="wrap_content" android:layout_width="fill_parent"
|
||||||
android:layout_weight="1" android:background="@drawable/clavier_bg" />
|
android:layout_weight="1" android:background="@drawable/clavier_bg" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
|
@ -115,11 +115,14 @@ public class UriPickerActivity extends TabActivity implements ContactPicked {
|
||||||
mAddress = (AddressText) findViewById(R.id.SipUri);
|
mAddress = (AddressText) findViewById(R.id.SipUri);
|
||||||
|
|
||||||
addButton = (Button) findViewById(R.id.AddCallButton);
|
addButton = (Button) findViewById(R.id.AddCallButton);
|
||||||
|
// addButton.setCompoundDrawablePadding(100);
|
||||||
addButton.setOnClickListener(this);
|
addButton.setOnClickListener(this);
|
||||||
String type = getIntent().getStringExtra(EXTRA_PICKER_TYPE);
|
String type = getIntent().getStringExtra(EXTRA_PICKER_TYPE);
|
||||||
if (EXTRA_PICKER_TYPE_ADD.equals(type)) {
|
if (EXTRA_PICKER_TYPE_ADD.equals(type)) {
|
||||||
|
addButton.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.picker_plus, 0, 0);
|
||||||
addButton.setText(getString(R.string.AddCallButtonText));
|
addButton.setText(getString(R.string.AddCallButtonText));
|
||||||
} else if (EXTRA_PICKER_TYPE_TRANSFER.equals(type)) {
|
} else if (EXTRA_PICKER_TYPE_TRANSFER.equals(type)) {
|
||||||
|
addButton.setCompoundDrawablesWithIntrinsicBounds(0, R.drawable.picker_transfer, 0, 0);
|
||||||
addButton.setText(getString(R.string.TransferCallButtonText));
|
addButton.setText(getString(R.string.TransferCallButtonText));
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("unknown type");
|
throw new RuntimeException("unknown type");
|
||||||
|
|
Loading…
Reference in a new issue