android-widget

Android Permission Denial: broadcasting Intent

◇◆丶佛笑我妖孽 提交于 2019-12-24 04:32:17
问题 I really do not know what is wrong, but my if widget is update by system by "APPWIDGET_UPDATE" it throws following exception. I tried several things, exporting receiver (true/false), I tried it on emulators and real phones, but it is same. I added several intent-filters , but it did not work. 11-06 20:10:10.279: W/ActivityManager(61): Permission denied: checkComponentPermission() reqUid=1000 11-06 20:10:10.279: W/ActivityManager(61): Permission Denial: broadcasting Intent { act=android

Android Permission Denial: broadcasting Intent

别等时光非礼了梦想. 提交于 2019-12-24 04:31:09
问题 I really do not know what is wrong, but my if widget is update by system by "APPWIDGET_UPDATE" it throws following exception. I tried several things, exporting receiver (true/false), I tried it on emulators and real phones, but it is same. I added several intent-filters , but it did not work. 11-06 20:10:10.279: W/ActivityManager(61): Permission denied: checkComponentPermission() reqUid=1000 11-06 20:10:10.279: W/ActivityManager(61): Permission Denial: broadcasting Intent { act=android

ListView in widget does not update

坚强是说给别人听的谎言 提交于 2019-12-24 04:21:54
问题 I want to update a ListView in a widget from a service. For this I have this code in my service: Intent intent = new Intent(ctx, ListProvider.class); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, widgetId); intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME))); remoteViews.setRemoteAdapter(widgetId, R.id.listViewWidget, intent); appWidgetManager.updateAppWidget(widgetId, remoteViews); I'm sure that the service is running and the code is executed but in the widget on the

Android Froyo WebView doesn't scroll vertically

纵然是瞬间 提交于 2019-12-24 04:13:11
问题 I have a WebView widget in my app that displays custom HTML content. This is my layout: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:id="@+id/main_article_view" > <RelativeLayout android:layout_width="fill_parent" android:layout_height="56dp" android:background="@drawable/header_background"> <Button android:id="@+id

How to inflate a activity in my case?

别说谁变了你拦得住时间么 提交于 2019-12-24 03:09:57
问题 I would like to achieve this layout : my main activity layout ( main.xml ); ( Please mouse right click the following image and view image ) I have made another ContentActivity (with content set to content_one.xml ) which is supposed to be used as part (the right part) of the above layout: I know I can inflate a layout by: LinearLayout mainLayout = (LinearLayout) findViewById(R.id.main); LayoutInflater inflater = (LayoutInflater)Home2.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

Android: Looking for different TimePicker Style

杀马特。学长 韩版系。学妹 提交于 2019-12-24 02:34:13
问题 Hello everyone a brief question - I have been hunting for this style of TimePicker to no avail so far(as shown on DroidDraw): I start doubting the existence of that style ... :P Anyone who's got a clue on how to get my hands on it - thanks in advance. Cheers, Ready4Android 来源: https://stackoverflow.com/questions/5921543/android-looking-for-different-timepicker-style

Layout for Android. Fluid layout and a fixed layout

爱⌒轻易说出口 提交于 2019-12-24 02:22:09
问题 I've to develop an Android application that needs to show data using a similar layout. I need two parts of screen: A layout with a fluid height that vary on resolution of device Second layout that show content in a fixed size How to do this? I've used relativelayout and linearlayout but I haven't found a solution. Could you help me? 回答1: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" >

How to make a custom Edittext,so that it will look like as 45 degree rotated in android

懵懂的女人 提交于 2019-12-24 02:09:05
问题 How to make a custom Edittext,so that it will look like as 45 degree rotated in android and it should editable so that th euser can enter text on that rotated Edittext.I tried it.But I am not getting any solution for it.Please give some idea to do this. 回答1: You could try overriding EditText onDraw method like so... @Override protected void onDraw(Canvas canvas) { canvas.save(); canvas.rotate(45.0f,xpivot,ypivot); //rotate around (x,y) pivot point super.onDraw(canvas); canvas.restore(); } I

Android: View by id? (from Widget Provider)

一曲冷凌霜 提交于 2019-12-24 01:25:00
问题 I know only one way to get a view by id: getViewById(R.drawable.imageButton) But how am I supposed to get this imageButton if i don't have an activity (developing a widget application) I am able to get a context. I suppose it is enough to get the view - context contains only one widget isn't it? And if not - then how to get each widget views ? 回答1: For Widgets you have to work with RemoteViews, for example RemoteViews updateViews = new RemoteViews(this.getPackageName(), R.layout.widget); Here

Buttons not displaying in linear layout

泄露秘密 提交于 2019-12-24 00:45:54
问题 Hi all my need is that buttons must show at bottom, so my code as <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:padding="12dip"> <ListView android:id="@+id/list_multiselectable" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical"> </ListView> <LinearLayout android:orientation="horizontal" android