android-widget

Keep dialog/activity always on the top

假如想象 提交于 2019-12-06 02:58:20
How to keep a dialog/activity on the top of other activities, no matter if user switch between activities,it should be alive all the time. You can use Relative layout as a parent, by using Relative Layout, you can overlap the other layout. So, you have to use to two child layout of relative layout. In the one child you will have popup, and in another layout you have to keep changing your layout.. If you want this across multiple activities. You must create a separate layout and include that in all activities, and create an interface to handle the button events in the popup. or You can create a

Multiple Android Widget instances only updating last widget

倾然丶 夕夏残阳落幕 提交于 2019-12-06 02:26:37
问题 I tried solving my problem using this link update - I figured out that there is something wrong with the setter of the pending intent- every time I click on the imageview- the intent sends the extre details of the last defined widget- meaning that the other pending intents that where defined on the pre-added widgets were run-over by the newer widgets I have an app widget that shows a picture chosen by the user.(many widgets- many pictures) my problem is: no matter which widget on screen I

How to share data between activity and widget?

穿精又带淫゛_ 提交于 2019-12-06 02:02:36
问题 I read the hellowidget tutorial and Dev Guide' App Widgets. Then I know how to create a widget which contains button or text or something. But what I really want to do is making it interact with my app. For example, I want to create a widget that has a text view, and when I click it, it sends a PendingIntent to my activity in which I can edit the text. I can do the step "sends a PendingIntent". But after I edit text in acitivy, how does the widget read it? 回答1: What you need to do is register

How to import the Android App project source code in Eclipse?

吃可爱长大的小学妹 提交于 2019-12-06 01:41:00
I downloaded the android source code for callLog UI for the Contacts, Call log, and Dialer applications using this link https://android.googlesource.com/platform/packages/apps/Contacts/ Now, I want to use it on eclipse. But when I try to import the project,it says it didnt found the project. Then I tried to set all the configurations manually, but it show a lot of errors with the importing, the AndroidManifest.xml, with the R.java, etc. So is there any way of import this directly as a project to eclipse? Thanks. File->New Project ->Android Project In the dialog, choose the option "Existing

How to update an app widget on midnight?

倖福魔咒の 提交于 2019-12-06 01:21:50
问题 My app has a widget that shows today's date and need to be updated on midnight. The widget is defined in the manifest as <manifest> ... <application> ... <receiver android:name=".MyWidgetProviderClass" android:label="MyLabel" > <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_icon_info" /> </receiver> </application> </manifest> And the widget info file is

ExpandabeListView not support ChildClickListener in android

拈花ヽ惹草 提交于 2019-12-06 01:13:37
I am using expandable listview to show states of india according to south,north,east,centeral.States list show like that ,but when apply onChildclickListener to expandableListView no response.I want when click state of india a new activity open. expandable listview <ExpandableListView android:id="@+id/indiaParts" android:layout_width="fill_parent" android:layout_height="wrap_content" android:groupIndicator="@null" android:listSelector="@null" android:scrollbars="none" /> list_group.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res

ListView widget with multiple pending intents

吃可爱长大的小学妹 提交于 2019-12-06 00:48:09
问题 I'm using widget with listview that has 3 types of items. For each type of item I should use different pending intents. Currently I'm using following code: public class MyWidgetProvider extends AppWidgetProvider { @Override public void onUpdate(Context context, AppWidgetManager widgetManager, int[] widgetIds) { for (int widgetId : widgetIds) { RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget_view); bindEmptyView(remoteViews); bindRemoteAdapter(context,

XML Error in Eclipse while viewing Graphical Layout of Xml

烈酒焚心 提交于 2019-12-05 23:59:59
This is the error I'm getting in my layout XML files: Exception raised during rendering: 0 Exception details are logged in Window > Show View > Error Log The following classes could not be found: - View (Change to android.view.View, Fix Build Path, Edit XML) My Xml File is : <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/list_view_main_lin_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#00FFFFFF" android:orientation="vertical" > <ViewFlipper android:id="@+id

Is there a way to launch voice input on the softkeyboard programatically?

丶灬走出姿态 提交于 2019-12-05 22:27:26
The idea is to take a user voice input on the press of a button and pass it to the search inside the app. Because of device limitations we are using the SearchViewCompat instead of the useful SearchView. I have been able to grab the voice output using this link , but there is not a simple way to pass the text to the search bar this way. The search view itself shows as a view (so no setText()), but if I can just say "use mic key on keyboard" or something as soon as the searchbar comes up, I think it might work. Any help would be greatly appreciated. Thanks, SGB. No, it's not possible. At least,

How to know when gallery widget stop scrolling?

浪尽此生 提交于 2019-12-05 22:25:38
I need to start a process only when the gallery stop scrolling. "onItemSelected" doesn't cut it as it will be called continuously as if scroll by. So how to detect or callback when the gallery stop scrolling? Janusz You can tune the behaviour of the galleryview a little bit with calling setCallbackDuringFling(false) . This should limit the calls to onItemSelected to cases where the user stopped scrolling. 来源: https://stackoverflow.com/questions/4733798/how-to-know-when-gallery-widget-stop-scrolling