android-widget

Show Dialog nearly full screen in my case (With ActionBar & overlay)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 12:38:39
问题 I am working with Android Support package. I have created a dialog: Dialog dialog = new Dialog(activity, android.R.style.Theme_Translucent_NoTitleBar_Fullscreen); Since I would like the dialog show in a full screen, so I applied the theme Theme_Translucent_NoTitleBar_Fullscreen to it & it works. I have following two questions: I would like my dialog to show like full screen still but leave the top ActionBar not be covered by it, what Theme should I use then? How to have an gray color overlay

How to ensure RemoteViewsService is run in the background in Oreo?

放肆的年华 提交于 2019-12-21 10:43:19
问题 Android 8 has its background execution limits, so when we started targeting Oreo we changed our services to using JobIntentSerivce to be able to get work done. However, we have a widget that updates every few minutes with live score data. The widget's service extends the good old RemoteViewsService. How can we make sure that the widget is updated even when the app is in the background? I've taken a look at the suggestions in another SO question, but they all seem to have some caveats:

How to ensure RemoteViewsService is run in the background in Oreo?

我是研究僧i 提交于 2019-12-21 10:43:06
问题 Android 8 has its background execution limits, so when we started targeting Oreo we changed our services to using JobIntentSerivce to be able to get work done. However, we have a widget that updates every few minutes with live score data. The widget's service extends the good old RemoteViewsService. How can we make sure that the widget is updated even when the app is in the background? I've taken a look at the suggestions in another SO question, but they all seem to have some caveats:

App Widget does not appear in the widget list on Honeycomb devices until Launcher is restarted [duplicate]

瘦欲@ 提交于 2019-12-21 09:25:18
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Android AppWidget does not show up in the menu in honeycomb until reboot It seems like the default launcher in Android 3 (Honeycomb) has a bug. It doesn't seem to refresh the widget list when you install a new application. When you restart the launcher (or restart the whole tablet) the widget will be there, as it should be. Seems like the widget list there is cached, while on earlier versions of Android, and in

ActionbarSherlock action bar custom style

混江龙づ霸主 提交于 2019-12-21 06:45:10
问题 I am developing Android 2.1 API 7 app. To implement action bar , I am using ActionbarSherlock library. I have successfully imported sherlock library to my project, and created the action bar in my app. Then, I would like to customize the style of sherlock action bar. So, I defined the following style file: <?xml version="1.0" encoding="utf-8"?> <resources> <style name="ActionBarTheme" parent="android:style/Theme.Sherlock"> <item name="android:background">@drawable/action_bar_background</item>

multiple images in a one single image

和自甴很熟 提交于 2019-12-21 06:08:18
问题 I want to create a bitmap / image which has many images like "Collage" which has more then one images in a single picture. I have stored all my images in a grid view but now i want to create a single image from all those images. And even i want to make few images click able so what can be the road map to do this ? any sort of help / example will be helpful. reference image 回答1: Bitmap pic1 = BitmapFactory.decodeResource(getResources(), R.drawable.pic1); Bitmap pic2 = BitmapFactory

BitmapDrawable cannot be cast to RoundRectDrawableWithShadow

孤者浪人 提交于 2019-12-21 06:00:35
问题 I am trying to extend a cardview to set the background image. I know that this can not be done with normal cardview. I have searched net and found plenty of solutions for setting a background color to the card view but none for image. My code to do so: public class CCView extends CardView { public CCView (Context context) { super(context); init(); } public CCView (Context context, AttributeSet attrs) { super(context, attrs); init(); } public CCView (Context context, AttributeSet attrs, int

Why I can not set onClickListener for a button in a dialog view?

拥有回忆 提交于 2019-12-21 05:36:14
问题 I have a custom dialog which described below. My Custom Dialog layout ( *my_dialog.xml* ) which only contain a "dismiss" button: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" > <Button android:id="@+id/dismiss_btn" android:layout_width="100dip" android:layout_height="30dip" android:layout_centerHorizontal="true"

Does an android widget run in the same process as it's app

风格不统一 提交于 2019-12-21 04:29:28
问题 I want to create a bound service for my app and would like it to be available for a widget to use in the future should i decide to create one. In order to decide whether to use a Messenger or extend Binder i need to know whether a widget and its corresponding app run in the same process? Thanks David 回答1: Yes. Unless you specify otherwise in the manifest (using android:process="..." ), all components of an application (widget providers, services, activities, broadcast receivers) run in the

Updating a widget only when device is on AND widget is visible on home screen

无人久伴 提交于 2019-12-21 04:25:30
问题 As far as I understood the official documentation about Widgets I am a little bit confused. The "standard" way would be to define a BroadcastReceiver and define the update frequency in milliseconds - this way allows a minimum update interval of 30 minutes to save battery power. Sounds reasonable. The "manual" way I found reading the Google documentation would be to handle the update of widgets yourself using the AlarmManager . Using this method higher update intervals are possible (though of