android-widget

Android: Listview's bounce to scrollview

回眸只為那壹抹淺笑 提交于 2019-12-20 10:01:23
问题 Any way of adding ListView's bounce effect to regular scrollview? By bounce I mean the rubber band like effect when you hit the bottom of the list. 回答1: By the looks of things in the ScrollView API you should be able to override the onOverScrolled() method if you create a custom view that extends the ScrollView class. After doing a quick Google search I came across this link and it looks as if this is what you are trying to do... I do believe this method was added in Android 2.3.1 though so

Android Circle Menu Like Catch Notes

拟墨画扇 提交于 2019-12-20 08:47:07
问题 I try to do circle menu like in this app. In "expanded" mode i draw this component like follows: <RelativeLayout android:id="@+id/bigCircle"> <!--color full borders--> <my.custom.component android:id="@+id/middleCircle"> <!--circle for buttons--> <RelativeLayout android:id="@+id/smallCircle"> <!--minus button--> </RelativeLayout> </my.custom.component> </RelativeLayout> In onDraw method of my.custom.component i divide circle on 8 parts by using android.graphics.Path with android.graphics

Why would layout_width=“wrap_content” take up the entire width of the screen?

…衆ロ難τιáo~ 提交于 2019-12-20 06:48:18
问题 With this xml: <TableRow > <Button android:id="@+id/buttonNext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Next" android:textAppearance="?android:attr/textAppearanceMedium" /> </TableRow> I would expect "wrap_content" to only be as wide as necessary to display the text on the button, but the button monopolizes the entire width of the screen...? 回答1: Your problem is that the width specification in your xml is ignored. From the docs for TableRow: The

App Widget issue while showing list of images

跟風遠走 提交于 2019-12-20 05:46:21
问题 I go through the following android documentation: "App Widgets with Collections" to create a widget which show list of text. Everything works fine and its work just as i wanted it to work. Now instead of showing list of text i want to show list of image that are stored in a sd-card. So how that can be done in my code that i have implemented. If anyone have some idea on this,Please help me to sort this out. The code i written is WidgetProvider.java public class WidgetProvider extends

Android Widget implementation

房东的猫 提交于 2019-12-20 05:38:31
问题 Hi I apologise in advance if this question is daft. I am fairly new to Android programming and I learn fast. Any ways I have just created a Task Reminder application and I would like to turn/implement that application into a widget that you can view on the home screen? Is this possible? Thanks. 回答1: Without more information about what your app does all I can really do is point you to the documentation on widgets which would be a good place to start anyway. One thing I can tell you though is

IndexOutOfBoundsException error on Android device not on emulator

◇◆丶佛笑我妖孽 提交于 2019-12-20 03:54:12
问题 Here is the problem that I am dealing with right now with my Android App. Program works fine on emulator without any error but errors out on real device running same OS. I have a App Widget Update Service that updates my Widget. This service checks whether the widget is on the screen otherwise does not go through the update process. Works fine on emulator. Every time the widget has to be updated in the OnReceive method I capture the intent in a string variable check_intent which tells me if

Using NumberPicker in Android 3

不想你离开。 提交于 2019-12-20 03:16:29
问题 I'm trying to use the NumberPicker widget in Android 3.1. I figure it is now a standard widget, part of a public API, and not an internal widget anymore. However, it doesn't work. I can see a textEdit with "0" in it, but there are no buttons, I can't scroll it, and I can't enter a new number with keyboard, either. Update: Here's the xml I used for testing: <NumberPicker android:id="@+id/numberPicker1" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout>

ViewPager for multiple Activities

心不动则不痛 提交于 2019-12-20 03:09:55
问题 I'm trying to implement a ViewPager that have multiple activities. I'm following this example but this doesnt look that uses multiple activities, but Fragments. If anyone can explain me how to implement this. What I want is to scroll between different screens, and each screen does its own job. Thanks. 回答1: I'm trying to implement a ViewPager that have multiple activities. I doubt this is possible, and to the extent that it is, it would use deprecated techniques like ActivityGroup . What I

Android Alarm manager is repeating after 5 seconds and ignoring interval time

跟風遠走 提交于 2019-12-20 01:55:19
问题 I am working on a widget application where I have to perform some task in every one minute. So, I am using AlarmManager to achieve this. But no matter whatever I set the interval time, its being repeated in every 5 seconds. I am using AlarmManager like this: final AlarmManager alarm = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE); alarm.cancel(pendingIntent); long interval = 60000; alarm.setInexactRepeating(AlarmManager.ELAPSED_REALTIME, SystemClock.elapsedRealtime(),

ClearableEdittext for xamarin android

馋奶兔 提交于 2019-12-20 01:41:15
问题 I have visited this link and many other links on the stack but I'm unable to find a similar solution for xamarin android : https://stackoverflow.com/a/14470930/7462031 I have implemented the frame layout solution but I want this solution throughout my application So the Clearable Edittext Looked interesting but the droid parts library is not available for xamarin so I am wondering if anyone has a solution for this problem in case you do kindly Help.! 回答1: I achieved it by doing the following