homescreen

How to load items in android homescreen listview widget?

孤者浪人 提交于 2021-02-05 20:28:59
问题 I am currently developing an Android project which makes use of a Homescreen Widget to display data to the user. The view that I used in the Widget is a ListView . Below are my codes: WidgetService Class public class WidgetService extends RemoteViewsService { @Override public RemoteViewsFactory onGetViewFactory(Intent intent) { return (new WidgetRemoteViewsFactory(this.getApplicationContext(), intent)); } } WidgetProvider Class public class WidgetProvider extends AppWidgetProvider { @Override

How to load items in android homescreen listview widget?

时光怂恿深爱的人放手 提交于 2021-02-05 20:26:23
问题 I am currently developing an Android project which makes use of a Homescreen Widget to display data to the user. The view that I used in the Widget is a ListView . Below are my codes: WidgetService Class public class WidgetService extends RemoteViewsService { @Override public RemoteViewsFactory onGetViewFactory(Intent intent) { return (new WidgetRemoteViewsFactory(this.getApplicationContext(), intent)); } } WidgetProvider Class public class WidgetProvider extends AppWidgetProvider { @Override

Get the size of my homescreen widget

断了今生、忘了曾经 提交于 2020-05-24 21:40:58
问题 I just want to know how big my current widget is. I found tons of questions to set the minimum size, but I don't want to set it. Instead I want to show that informations which simply fit on the widget. If the widget is too small I need to hide some things, but I need to know the size for that. I read the source code of some classes like the AppWidgetProvider , even the documentation. There are allways just references about the minimum or maximum size, but never the current size. Please point

How to Remove Chrome Logo from PWA App Home Screen Link (Android O Preview)

帅比萌擦擦* 提交于 2020-03-17 06:45:28
问题 I just updated to Android O Preview and installed a few PWAs. On the home screen a miniature Chrome logo is placed by the icon. This wasn't there before the OS update. Ideally, I would like the PWA to look like a regular app on the home screen considering it has service workers enabled. Is it possible to remove this with some settings in the app.yaml or manifest.json? 回答1: Above answer is not accurate except for the part that Chrome had the issue of adding Chrome badge to App icon, which is

RecyclerView in Android Home Screen Widget

南笙酒味 提交于 2020-01-17 08:08:14
问题 Is there a way to put a recyclerview in an android homescreen widget. If so, how would you set the adapter and layout manager. Thanks 回答1: No, sorry, at the present time, RecyclerView is not one of the supported widgets for an app widget. 来源: https://stackoverflow.com/questions/29051733/recyclerview-in-android-home-screen-widget

Create a shortcut for APK in the Homescreen

ⅰ亾dé卋堺 提交于 2020-01-17 04:30:10
问题 I have a compiled APK and My workaround to make a shortcut at the home screen is : 1- Decode the apk with apktool.jar 2- Modify AndroidManifest (add the <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" /> ) 3- Recompile the apk and put it in the system.img 4- with yaffey tool i replaced the file and calculate the CRC. After flashing the smartphone the shortcut is not created on the Homescreen? is there any way to place the shortcut for preinstalled APK ?

Calabash Android: how to send app to the background (simulate device/hardware Home button)?

喜你入骨 提交于 2020-01-11 12:59:06
问题 Is there a way in Calabash Android where I can send my app to the background? In other words, simulate the device/hardware Home button? Secondly, can the app be brought back into the foreground? 回答1: This can be done in the following way: Then /^I go home$/ do system "#{default_device.adb_command} shell input keyevent KEYCODE_HOME" end P.S. You can also add sleep <some_value_in_seconds> if necessary, after system "..." line. 回答2: As far as I know, that action does not currently exist. You can

CSS transitions do not work on iPad after sleep/resume when run from homescreen

元气小坏坏 提交于 2020-01-06 14:12:15
问题 I recently asked this question about jQuery animation not working on iPad after sleep/resume when run from a homescreen icon. That question received zero comments and zero answers in the two weeks since I asked it. I spent some more time investigating, creating small tests to understand what works and what doesn't - and confirmed that jQuery is not at fault here, but rather the mobile Safari. I created this simple test: http://jsfiddle.net/87r3vfe1/ - which does not use jQuery at all and

How to exit current activity to homescreen (without using “Home” button)?

╄→尐↘猪︶ㄣ 提交于 2020-01-02 22:31:54
问题 I am sure this will have been answered but I proved unable to find it. So please excuse my redundancy. What I am trying to do is emulating the "Home" button which takes one back to Android's homescreen. So here is what causes me problems: I have 3 launcher activities. The first one (which is connected to the homescreen icon) is just a (password protected) configuration activity. It will not be used by the user (just admin) One of the other 2 (both accessed via an app widget) is a

Parallax effect scrolling of live wallpaper background

只愿长相守 提交于 2020-01-02 05:00:11
问题 I'm trying to get a background in a live wallpaper to behave like a regular wallpaper with regard to scrolling when the user changes homescreens. I know the method required for this is onOffestsChanged, but I can't seem to get it working. Does anyone have advice or a code snippet to get this working? 回答1: Have your engine implement onOffsetsChanged. The xOffset variable is a float value from 0 to 1 with 0 being the leftmost screen and 1 being the rightmost. Use the width of the screen (from