Only open the activity in certain areas on the widget

This commit is contained in:
Christopher Eby 2010-06-02 00:30:39 -05:00
parent 24f55f76f5
commit f43bb58a65
2 changed files with 3 additions and 2 deletions

View File

@ -17,7 +17,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="horizontal"
@ -37,6 +36,7 @@
android:layout_height="fill_parent"
android:layout_weight="1">
<LinearLayout
android:id="@+id/text"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"

View File

@ -128,7 +128,8 @@ public class FourLongWidget extends AppWidgetProvider {
intent = new Intent(context, LaunchActivity.class);
pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
views.setOnClickPendingIntent(R.id.layout, pendingIntent);
views.setOnClickPendingIntent(R.id.cover, pendingIntent);
views.setOnClickPendingIntent(R.id.text, pendingIntent);
intent = new Intent(PlaybackService.ACTION_PREVIOUS_SONG).setComponent(service);
pendingIntent = PendingIntent.getService(context, 0, intent, 0);