android-ui

Android Split Action Bar-icons only in the bottom bar

做~自己de王妃 提交于 2020-01-01 20:23:19
问题 I want to force the icons to be placed in the Bottom bar of Android's split action bar, while making sure that the top action bar remains empty. I have experimented a lot, but have not been able to figure out how to do this. I am sure it is possible, because I have seen it in the Google Maps app. See the image below: split action bar with icons http://imageshack.us/a/img856/3592/portraito.png 回答1: The split action bar is only used on -small / -normal screens in portrait orientation -- in all

Android - Button with rotating/spinning 'loading' image when pressed

对着背影说爱祢 提交于 2020-01-01 08:59:29
问题 I have a big 'Log in' button on my app. When the user taps this button, I want to replace the text with 'Logging in...', align it to the left instead of center and put a spinning circle on the right (but still inside the button). I'd like to use essentially the same button (but with different initial and loading text) in other places in my app. What's the neatest way to do this? For the actual spinning graphic, I was planning to use the @drawable/spinner_white_16 that comes with Android.

Overlay Status bar on android 4.2.2+

故事扮演 提交于 2020-01-01 06:33:07
问题 I want to overlay android status bar. In my case it is on top. I do not want to overlay or hide navigation bar. Note : Solution must work on android 4.2.2+. I prefer answers for non-rooted device. I have searched many SO questions and answers, but none works on 4.2.2. Below is my code, but it does not consume touch events. That's why status bar opens its panel. And I do not want this. @Override public void onCreate() { super.onCreate(); windowManager = (WindowManager) getSystemService(WINDOW

Update UI from an AsyncTaskLoader

时间秒杀一切 提交于 2020-01-01 03:21:10
问题 I've converted my AsyncTask to an AsyncTaskLoader (mostly to deal with configuration changes). I have a TextView I am using as a progress status and was using onProgressUpdate in the AsyncTask to update it. It doesn't look like AsyncTaskLoader has an equivalent, so during loadInBackground (in the AsyncTaskLoader ) I'm using this: getActivity().runOnUiThread(new Runnable() { public void run() { ((TextView)getActivity().findViewById(R.id.status)).setText("Updating..."); } }); I am using this in

remove notification bar shadow in android app

你。 提交于 2019-12-31 09:47:11
问题 In android, the notification bar at the top has a shadow most of the time. However, sometimes, such as when an app has it's title-bar showing, or in some other cases (such as in the twitter app or the market) that shadow effect is gone. My guess is that the shadow is supposed to be there when the content underneath can scroll. In my app, however, the content underneath can't scroll, and I think the shadow looks bad on the top part of my logo. Does anyone know how to disable it? 回答1: <!--

Change ActionBarSherlock background color

痞子三分冷 提交于 2019-12-28 02:32:27
问题 I'm trying to implement ActionBarSherlock because I was told it is relatively easy to implement and customize. I've found it was pretty easy to implement, but I'm trying to change the background color of the ActionBar and it's proving difficult. According to the the site (link), it seems you can inherit one of the ActionBarSherlock's themes and then override the properties you need. This is what I have so far: <?xml version="1.0" encoding="UTF-8"?> <resources> <style name="Theme.ActionBar"

How to populate dynamically created imageview through urls asyncronously…In Android

旧城冷巷雨未停 提交于 2019-12-25 04:55:12
问题 I am using horizontal pager https://github.com/ysamlan/horizontalpager/blob/master/src/com/github/ysamlan/horizontalpager/HorizontalPager.java to make dynamic views,and making dynamic images in it.... And using fedor imageloader to pupulate imageviews from urls... https://github.com/thest1/LazyList/blob/master/src/com/fedorvlasov/lazylist/ImageLoader.java but i am getting that annoying stid image.... here is my code... Any help or suggestion will be highly appropriated Thanx in advance public

Update ListView Textview vom Asyntask

早过忘川 提交于 2019-12-25 02:47:29
问题 i need to update a textView from my asynctask. I have an custom adapter for the listview and there i want to have a countdown for each entry. I will start the asynctask for each entry from my Adapter. How can i update the textview each second from the asynctask? Thanks for help :) 回答1: If you post your code, I can give you a better answer. However, a common way to update views periodically is by using Handlers. private final Handler mHandler = new Handler(); //intialize in main thread public

Update ListView Textview vom Asyntask

☆樱花仙子☆ 提交于 2019-12-25 02:47:06
问题 i need to update a textView from my asynctask. I have an custom adapter for the listview and there i want to have a countdown for each entry. I will start the asynctask for each entry from my Adapter. How can i update the textview each second from the asynctask? Thanks for help :) 回答1: If you post your code, I can give you a better answer. However, a common way to update views periodically is by using Handlers. private final Handler mHandler = new Handler(); //intialize in main thread public

Prevent Reload Activity / Webview when go Back to app and when press the turn off button

两盒软妹~` 提交于 2019-12-25 02:37:37
问题 I have a fragment inside of an Activity and then, inside of this fragment I also have a webview. Problem : After lock my screen and unlock pressing the turn off button, my Activity is recreated or my webview is reloaded (not sure what happens). The same problem occurs when I switch apps in my device. I tried to change my configChanges and my launchMode. Here is part of my activity in android manifest file: <activity android:name=".MainActivity" android:label="@string/app_name" android