Questions tagged [android-widget]

Either relates to Home Screen widgets, or to general UI elements used on an Android Application screen.

From Android Documentation

Widgets are an essential aspect of home screen customization. You can imagine them as "at-a-glance" views of an app's most important data and functionality that is accessible right from the user's home screen. Users can move widgets across their home screen panels, and, if supported, resize them to tailor the amount of information within a widget to their preference.

Common elements are :

  • AbsoluteLayout
  • AnalogClock
  • AutoCompleteTextView
  • Button
  • CalendarView
  • CheckBox
  • CheckedTextView
  • Chronometer
  • CompoundButton
  • DatePicker
  • DigitalClock
  • EditText
  • ExpandableListView
  • FrameLayout
  • Gallery
  • GridView
  • HorizontalScrollView
  • ImageButton
  • ImageSwitcher
  • ImageView
  • LinearLayout
  • ListView
  • MediaController
  • NumberPicker
  • ProgressBar
  • QuickContactBadge
  • RadioButton
  • RadioGroup
  • RatingBar
  • RelativeLayout
  • ScrollView
  • SearchView
  • SeekBar
  • SlidingDrawer
  • Spinner
  • StackView
  • TabHost
  • TableLayout
  • TableRow
  • TabWidget
  • TextSwitcher
  • TextView
  • TimePicker
  • Toast
  • ToggleButton
  • VideoView
  • ViewAnimator
  • ViewFlipper
  • ViewSwitcher
  • ZoomButton
  • ZoomControls
5711 questions
2
votes
1 answer

Android Widget not responding

I have an issue I can't seem to figure out... I have a widget for my app that I'm using with a configure option to control what/how the widget launches the app. When the user adds the widget, it shows a listview of options allowing the user to…
JLB
  • 242
  • 3
  • 8
2
votes
1 answer

Linkedin Api Queries for Android Apps

I want to send data through my android application on LinkedIn update section. Can anyone tell me suggestion which API i should ask from linkedIn and how it possible to post on UPDATES Section. I have made connection with LinkedIn API and got…
Rana.S
  • 2,265
  • 3
  • 20
  • 19
2
votes
4 answers

Android Intent getExtras

I am passing values between two activities and fetching the values like this: Bundle extras = getIntent().getExtras(); if (extras != null) { initialUrl = extras.getString("initialUrl"); isFollow =…
Sultan Saadat
  • 2,268
  • 6
  • 28
  • 38
2
votes
2 answers

Can we create a back button like iOS in Android using the custom shape API

I would like to know if we can customise a button to show like the Apple iOS button in Android? The button that I would like to draw is If this is possible, can someone give me the pointers to it. Thanks.
Sana
  • 9,895
  • 15
  • 59
  • 87
2
votes
1 answer

How to reload screen on future data

I have TabBarView with six tabs. I'm trying to show all the installed apps in first tab. Even after apps is filled CircularProgressIndicator is displayed. Apps are listed once the first tab is revisited. AppScreenC is called for first tab. final…
shanthosh
  • 57
  • 7
2
votes
0 answers

Widget 1x1 - original Android style of label

Does anyone know the exact style of the Icon and Label on the Homescreen? I want to create a widget with 1x1 with a counter badge. So i need the exact style of the label with the background color. I've found this question, but this style is not…
chrisonline
  • 6,949
  • 11
  • 42
  • 62
2
votes
1 answer

How can you create Shortcuts from an Android Widget?

I'm trying to add a new widget functionality to my app, which allows you to create pinned shortcuts from a 'shortcut widget.' Normally shortcuts in Android are created like in the video below. You long-press the application, select a shortcut, and…
vkataria
  • 113
  • 1
  • 5
2
votes
1 answer

How can I track down the origin of this exception?

It's happening inside the Android framework, and so hard to understand either what's causing it, or how to fix it or workaround it. The exceptions are being logged from customer usage - I cannot reproduce the error, and customer reports are…
Ollie C
  • 28,313
  • 34
  • 134
  • 217
2
votes
2 answers

How to change text size of EditText widget dynamically in android?

I want to change text size of EditText as text entered. It means initially text is large but when user enters text (increase length of text) then the size of text should be decreased gradually. Is there any inbuilt style or theme for EditText…
Khushbu Shah
  • 1,603
  • 3
  • 27
  • 45
2
votes
0 answers

Widget launching a second instance of application - different activities

After reading more than 30 articles and testing more than 15 suggested solutions - i came out empty and my problem persists. My problem is very similar to the issue discussed in: Widget launching a second instance of application I have activity A -…
Croc
  • 485
  • 5
  • 14
2
votes
0 answers

Updating a widget more frequently than 30 minutes

Lots of answers, none of which work. Should you use a service or an alarm or a timer? All of the answers seem to just be a random guess. In this example in onDisable what is the point of creating a new instance of AppWidgetAlarm and then calling…
Richard Barraclough
  • 2,625
  • 3
  • 36
  • 54
2
votes
3 answers

Checkbox label should not be clickable

I am using checkbox in android and the state of checkbox is changing once i click on the text of the checkbox. "[CB] Text ". Is there any way to change this behaviour so that the state of checkbox will be changed once i click on the box and not the…
Ron
  • 359
  • 6
  • 21
2
votes
2 answers

Updating time of clock widget

I am looking at creating a clock widget that tell the current time but if the minimum time you can set for the widget is 15 minutes thats obviously not going to work. I also see suggestions on using AlarmManager but then I worry about the battery…
tyczj
  • 71,600
  • 54
  • 194
  • 296
2
votes
1 answer

Android ndk binder thread causing problems in app

I have this app (Only one activity) that use some android UI and some native C++ lib to do OpenGl drawing and calculation. It seems like the activity creates some "binder thread" on it's own, and I'm pretty sure it causes some corruption amongs my…
2
votes
2 answers

Dialog with custom view, setCanceledOnTouchOutside doesn't work

am using a Dialog with a custom view. That view's layout is 300dp x 300dp is size and centered on the screen. Now i want it to be dismissed when the user touches outside the dialog. I thought: great! there is a function for this:…
Goddchen
  • 4,459
  • 4
  • 33
  • 54