Reputation: 1025
I'm working on a voip/sip based application which is capable of making calls from a dialpad widget which has the four buttons at the bottom
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<ImageButton
android:id="@+id/ibtn_handsfree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/selector_dialpad_action_button"
android:src="@drawable/selector_handsfree" />
<ImageButton
android:id="@+id/ibtn_headset"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/selector_dialpad_action_button"
android:src="@drawable/selector_headset" />
<ImageButton
android:id="@+id/ibtn_copyToDir"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/selector_dialpad_action_button"
android:src="@drawable/selector_copytodir" />
<ImageButton
android:id="@+id/ibtn_keyboard"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/selector_dialpad_action_button"
android:src="@drawable/selector_keyboard" />
<ImageButton
android:id="@+id/ibtn_sendkey_widget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/selector_dialpad_action_button"
android:src="@drawable/selector_send_key_dialer"
/>
</LinearLayout>
Appreciate your thoughts and help.
Upvotes: 0
Views: 892
Reputation: 21183
I don't know the answer for the first question, but in order to toggle visibility of a button in a widget:
setOnClickPendingIntent
for the buttonAppWidgetProvider
's onReceive
updateAppWidget
Upvotes: 1