android-widget

How to change Color of the tabStrip in Android?

ⅰ亾dé卋堺 提交于 2019-12-11 05:27:06
问题 I am trying to change the color of my tabStrip to white, the code below is not working? What am I doing wrong ? getTabHost().getTabWidget().setLeftStripDrawable(Color.WHITE); getTabHost().getTabWidget().setRightStripDrawable(Color.WHITE); getTabHost().getTabWidget().setStripEnabled(true); 回答1: Use any drawable instead of color means setLeftStripDrawable is requiring a drawable resource but you are giving int as a argument. So either use a drawable image here. Or use a xml from drawable

Android i have error with exception color.parsecolor

醉酒当歌 提交于 2019-12-11 04:58:15
问题 I have a problem with an exception of parsecolor, when I go down below a value of 20, the application crashes, the rest is fine ... can you tell me why? my simple code is: public class ColoreTesto extends Activity { private SeekBar seekred, seekgreen, seekblu; private TextView seekred_txt, seekgreen_txt, seekblu_txt; private TextView esempio; private int redtxt, greentxt, blutxt; private int progressred, progressgreen, progressblu; @Override public void onCreate(Bundle savedInstanceState) {

ExpandableListView centains a link does not expand

可紊 提交于 2019-12-11 04:55:13
问题 I have an ExpandableListView contains a link, it does not expand when has a link, and i want the link is clickable. code like this: <ExpandableListView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/list" android:layout_width="fill_parent" android:layout_height="fill_parent" android:groupIndicator="@null" /> and: <TextView android:layout_below="@id/screenName" android:layout_alignLeft="@id/screenName" android:layout_height="wrap_content" android:layout

Android TextView Linkify problem with phone numbers and application version number

梦想的初衷 提交于 2019-12-11 04:47:30
问题 I have a problem with TextView and autoLink feature. I have an about screen in my application with some information like support phone number, email address, website URL and application version in form like 01.01.01 After setting autoLink="all" on the textView, all values are linked fine - except that version number 01.01.01 is linked as the phone number as well. Is there some way to exclude this text fragment from linkifing? 回答1: Place version to another TextView? 回答2: Just don't use

Is it ok to update a widget frequently for a short period of time?

房东的猫 提交于 2019-12-11 04:24:39
问题 in numerous places, it is mentioned that app widgets should not get updated often, to minimize power consumption. But, let's consider that an application is doing something important (such as audio recording) for a short period of time, say 30min. In this case, is it acceptable to update the widget every second from a service? How can it be that this would consume so much power? Please consider that this is different from a widget which would update very often during the whole day. And in my

Android certificate (can not install app by using apk file)

走远了吗. 提交于 2019-12-11 04:19:36
问题 I developed an Android app. I then transferred the bin/myapp.apk to my android phone, and try to install it. But my phone says it can not be installed. Someone told me it is probably because of the Android certificate in my app is wrong. But I do not understand what is Android certificate ? Is it something defined in AndroidManifest.xml ? 回答1: The very first thing I would check is that you allow Unknown Sources. Settings -> Applications -> Unknown Sources, be sure this box is checked before

Android foreground service being killed under certain conditions

心已入冬 提交于 2019-12-11 04:14:34
问题 I have a Service used for playing audio. It is created with START_STICKY , and calls startForeground() when it is told to play music, and stopForeground() when it is told to stop playing music. The service continues to run fine and play music, even after the app is swiped out of the task manager on 4.2.1. However, the service is inexplicably killed if the app is swiped out and the app's home/lockscreen widget is interacted with or if I try to sendBroadcast() within the service. I cannot find

Android - VideoView requires to press BACK twice, in order to exit

◇◆丶佛笑我妖孽 提交于 2019-12-11 03:38:53
问题 I have an activity with different video files displayed. When I click a video file, I'm taken to another activity, where a VideoView plays the video. My issue is that when I want to exit this activity and return back to previous, I should click twice the back button, in order to return back. If I click only once, the video starts playing once again, and only at the second attempt I'm allowed to exit the screen. Then I tried this: @Override public boolean onKeyDown(int keyCode, KeyEvent event)

How to scale a view in android using a handle?

有些话、适合烂在心里 提交于 2019-12-11 03:14:42
问题 I'm trying to implement a handle to scale a view in android. Instead of using something like multitouch I want to be able to resize an image with just one finger. Here is my activity code. I feel as though I am very close there are a five things that don't work properly. The scaling is off. It grows at a much faster rate than it should. Solved Thanks @Salauyou The view will only grow, and not shrink. Solved Thanks @Salauyou The handle view doesn't move with the image. Solved Thanks @Salauyou

Android remote view display images from the web?

╄→尐↘猪︶ㄣ 提交于 2019-12-11 02:43:19
问题 Does any know of a tutorial or something similar to help create a Remote View wigdet like this... I followed through the development guide on doing StackView widget. I did it but i dont know how to display images in the Stack like the example news 360 does. All i want to do is display images in the remote view from a url. 来源: https://stackoverflow.com/questions/6894147/android-remote-view-display-images-from-the-web