android-widget Questions

41

I have added an image right of the text in an EditText widget, using the following XML: <EditText android:id="@+id/txtsearch" ... android:layout_gravity="center_vertical" android:background...

9

Solved

I'm using a drawable for seekbar thumb with android:thumb="@drawable/thumb" How can I set the size of this thumb in dip unit? Because I use a style for seekbar like <style name="CustomSeek...
Rabbit asked 14/3, 2012 at 10:18

10

Solved

I have a cell with a fixed width and height, let it be 100x100px. Inside that cell I want to display an ImageView with a border around. My first idea was to put a background resource to the ImageVi...

1

Solved

I'm trying to build a stackview widget, which should display differnt data when swiping through it. So far everything is working, but when I want to receive the index of the clicked card in the wid...
Babble asked 11/3, 2022 at 12:48

31

Solved

In my application, there is a registration screen, where i do not want the user to be able to copy/paste text into the EditText field. I have set an onLongClickListener on each EditText so that the...
Disarticulate asked 8/6, 2011 at 7:5

10

Solved

When I create my activity, I setup a Spinner, assigning it a listener and an initial value. I know that the onItemSelected callback is called automatically during application initialization. What I...
Circumstantial asked 28/1, 2013 at 11:10

11

Solved

Hello i need to put some text inside the searchView and focus/expand the searchView widget. this is what i tried but it doesn't work @Override public boolean onCreateOptionsMenu(final Menu menu) ...
Ellene asked 10/4, 2012 at 13:44

4

Solved

I'm doing a simple program using MultiAutoCompleteTextView to prompt the common words when I input several letters. code: ArrayAdapter<String> adapter = new ArrayAdapter<String>( t...
An asked 14/8, 2010 at 10:55

16

Solved

I am generating a string from database dynamically which has the same name of image in drawable folder. Now I want to set that value for ImageView using setImageDrawable(R.id.StringGenerated) dyna...
Padua asked 27/12, 2011 at 9:6

5

Solved

I have a web service which give me a byte[] array according to image id . I want to convert these byte[] to file and store a file on android where user want like save file dialog box with file same...
Dandiprat asked 21/12, 2011 at 8:8

1

I am trying to create a widget and as stated in this guide, …If your widget setup process can take several seconds (perhaps while performing web requests) and you require that your process continu...

5

Solved

I have created a simple custom view that contains a RelativeLayout and an EditText: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_pare...

5

I'm stumped. I know this question has already been answered a hundred times but nothing I've tried works. My question: I made an Android widget that needs to refresh precisely at each minute, much...
Hydrotherapy asked 30/7, 2016 at 20:34

8

Solved

i wanted to access Room DB inside my widget class to update the widget according to the stored data. the problem here is the ViewModelProvider require a fragment or activity to work with.. View...

4

Solved

With swift, widgets can be written using SwiftUI, but I have not seen any statements regarding whether Jetpack Compose can be used to build Android App Widgets. Is there any information where I can...
Ido asked 28/8, 2020 at 13:58

4

I'm working with the emulator using the debugger and I've noticed that onUpdate() is not getting called. When I add the widget to the emulator homescreen I see my breakpoint being hit in the onRece...
Gazette asked 14/7, 2010 at 4:49

4

Solved

I have a main.xml file describing the layout of my main activity: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:...
Benumb asked 26/1, 2012 at 2:28

11

Solved

AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("Title"); builder.setItems(items, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog...
Andradite asked 10/12, 2010 at 8:4

8

Solved

I've had my application out in the store for a while, but it seems it crashes occasionally according to the crash reports in the Developer Console, saying: java.lang.ClassCastException in android.w...
Madeira asked 8/3, 2013 at 16:3

7

I am using code sample from Making Sense of Multitouch for zooming image view. On ScaleListener I added ScaleGestureDetector.getFocusX() and getFocusY()for content to zoom about the focal poi...
Woodring asked 17/5, 2012 at 5:37

1

In Android API from API level 21 field label is deprecated and advised to use loadLabel(android.content.pm.PackageManager) instead. Just curious if anybody happen to find any example of how to us...
Shelah asked 13/9, 2015 at 4:39

6

Solved

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 wid...
Antonelli asked 6/8, 2014 at 6:29

11

Solved

I have already added a style <style name="myRatingBar" parent="@android:style/Widget.RatingBar"> <item name="android:minHeight">32dp</item> <item name="android:maxHeight"&g...
Wilscam asked 12/9, 2012 at 6:52

1

I just want a simple RadioBttun without text and I did the code below but what I get is a radiobutton widget with little space that is I think reserved to the text. So How should get rid of this sp...
Kilar asked 9/9, 2020 at 9:15

25

Solved

I am using a web view in which I am adding an image view. How can I set the background of this image view to transparent? I have tried this: mImageview.setBackgroundResource(R.color.trans); Whe...
Saintjust asked 29/9, 2009 at 13:27

© 2022 - 2024 — McMap. All rights reserved.