android-widget

Android customize stackview

南楼画角 提交于 2019-12-05 21:58:25
问题 I"m trying to customize the StackView widget to look a little bit different. The stackview default order and view is this : And i"m trying to get to something more like this : Any help will be appreciated Shimi 回答1: try checking out the source code of StackView . as a first step , you can play with the parameter called "PERSPECTIVE_SHIFT_FACTOR_X" and "PERSPECTIVE_SHIFT_FACTOR_Y" . 来源: https://stackoverflow.com/questions/14029048/android-customize-stackview

Android Appwidget textview not updating

断了今生、忘了曾经 提交于 2019-12-05 19:34:16
Hi im having a very weird problem with my android widget, ive looked extensivly in many places but I cant seem to figure out whats wrong. basically im calling a pendingintent broadcast in my widget and in sucessfully catching that intent in the onrecivie method. However in the onRecive method, when I try to set the text using RemoteViews for my component, the text does not update nor is any error called. I have attached my code below, any help would be great. Thanks, M package com.android.FirstWidget;import android.app.PendingIntent; import android.appwidget.AppWidgetManager; import android

Update issue of an app widget using collection

自作多情 提交于 2019-12-05 19:28:15
问题 I have created an app widget using collection for my app, The widget shows date and list of item on that particular date. Everything works fine and the widget are updating as required, But sometimes what happen while changing the date in the widget by clicking next and previous button, the list is not refresh means the items are not updated on that particular date. This behaviour is random and its occur sometimes only. So why this happen, anything wrong in my code. Code that i have use is:

Update app widget on click in android

落花浮王杯 提交于 2019-12-05 17:38:32
I am working on Android Widget my widget is like following diagram, [prev] event name [next] prev, next are the buttons on the widget.So i want to update the event name on click of next and prev button.On start of the service i loaded the data and stored it in array list. Now i want to iterate through the array list by clicking the next and prev buttons on the widget. So how can i achieve this.Please help me with proper solution. Here is my xml layout <LinearLayout android:id="@+id/lytWidget2" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop=

How to set custom list view item's height…?

六月ゝ 毕业季﹏ 提交于 2019-12-05 15:45:41
I have a custom list view which contains two text views and on button. I have customized the button style. In the list view each row is not fit to show my button properly. I want to change the list item's height. How can i do that..? This is my list view. <ListView android:layout_width="fill_parent" android:scrollbars="none" android:footerDividersEnabled="false" android:minHeight="50dp" android:listSelector="#00000000" android:dividerHeight="0px" android:divider="#00000000" android:layout_height="fill_parent" android:layout_marginLeft="5dp" android:layout_marginTop="5dp" android:layout

how to launch activity after widget button is pressed?

℡╲_俬逩灬. 提交于 2019-12-05 15:16:42
Following this tutorial I quickly created a simple widget which displays the current time on the home screen: I've modified the code so that the widget also comes with a button. My goal is to launch an activity, once the button get's pressed. Unfortunately, I do not really understand where to listen to the button click. Does this have to go into the broadcast receiver section of the manifest file? <!-- Broadcast Receiver --> <receiver android:name=".WifiSSIDWidget" android:label="@string/app_name"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE"/> </intent

How to make animated GIFs work from Android WebView

浪尽此生 提交于 2019-12-05 14:27:36
问题 Animated GIF images rendered by Android's WebView do not seem to animate. Has anyone figured out how to make them work? I'm testing on an N1 with 2.1-u1. None of the web settings available seem applicable. 回答1: Not supported YET. Read more about this here: http://code.google.com/p/android/issues/detail?id=3422 For large memory phones like Droid and Nexus One, the two-line change has been made in Froyo (unreleased) to enable animated GIFs. For small memory phones, the change is not trivial and

RadioGroup onCheckedChanged function won't fire

依然范特西╮ 提交于 2019-12-05 13:18:24
My app keeps track of restaurant servers' shift sales to help them budget. In the activity that displays past shifts, I've created a RadioGroup under the ListView so the user can choose to display lunch, dinner, or both. I've implemented in the activity RadioGroup.onCheckedChangeListener, but onCheckedChanged never gets called. I also tried using an anonymous inner class as listener, same result. I tried to copy/modify code from this answer: https://stackoverflow.com/a/9595528 ...but when I added the @Override to the callback function, the Eclipse compiler gave me an error (not warning) that

Sending Intent inside of another Intent

狂风中的少年 提交于 2019-12-05 13:08:36
Perhaps I am going about this the wrong way, but I want to respond to my Android AppWidget's click event within my own app AND launch an Activity. At the time I set the PendingIntent I have another Intent which I want to launch when clicked. My onStartCommand uses this line: final Intent mLaunchIntent = (Intent) intent.getParcelableExtra(Widget.EXTRA_INTENT); When I call setOnClickPendingIntent I have this line prior: mSendingIntent.putExtra(Widget.EXTRA_INTENT, (Parcelable) mLaunchIntent); So even though mLaunchIntent is a valid Intent in both lines, the first line is missing a great deal of

How to correctly handle click events on Widget

别来无恙 提交于 2019-12-05 11:39:41
There is a task to make smt like todo list on widget (with dynamic number of elements), how to organize this list for click support on this elements. I only found how add click event on one widget layout element (with setOnClickPendingIntent ), and how send text to widget element TextView. But it's unclear how handle click events for sub-elements, or how get click coordinates(or item) where was click event. I saw widget " Agenda widget " - and it work fine with clicking on different calendar rows. I will be very much appreciated for help. But it's unclear how handle click events for sub