android-background

Alpha background on FAB clicked

妖精的绣舞 提交于 2019-12-04 23:09:50
问题 I'm using the library https://github.com/futuresimple/android-floating-action-button to create the fab buttons that works pretty well. I tried several libraries but none use the effect used in most application with a fab (or Google apps like keep, inbox) that when the fab is clicked the background of entire application becames semi-transparent white or black, it depends. I can't find any way to do it. Is it possible have an example or something like that to do this kind of effect? You can see

Gray out fragment in background

孤者浪人 提交于 2019-12-04 21:02:46
I have one main Fragment which is in the background when the second Fragment gets called with getFragmentManager().beginTransaction().add . Right now the user can see the main Fragment behind the second Fragment like it should be. But i want it to be like in a grayed look. When the Second Fragment gets called, the main Fragment should gray out. Im not sure what to google (have tried a lot of keywords) to describe this. My idea was to take a screenshot of the main fragment (bitmap) and make it gray. Is this the right direction? Just put a View in between the Fragments so that it overlays the

Using ImageView as background for an Android Layout

拟墨画扇 提交于 2019-12-04 11:41:31
问题 I want to take advantage of the scaleType property, which I cannot use if I set my image using the background property on the LinearLayout . I've tried using a LinearLayout with 2 children: the first is an ImageView (for the background image) and the second child is another LinearLayout containing TextViews , Buttons, etc. But the result is just the image followed by the other views. Is it possible to float the nested LinearLayout over the ImageView somehow? I know that there's lots of

Changing TextView background color on click android

↘锁芯ラ 提交于 2019-12-04 04:30:55
I'm trying to change the background of a textview when clicked. For instance, if the textview is click it the background changes to yellow and remains yellow until it is click again. Then it returns to its default background. Currently textview the background changes on pressed down, but returns to default on release. I have search the internet for solutions and look at most of all the solution on stackoverflow, still no solution. Drawable/selector.xml: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/circle_on" android:state_enabled="true

Alpha background on FAB clicked

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 14:10:53
I'm using the library https://github.com/futuresimple/android-floating-action-button to create the fab buttons that works pretty well. I tried several libraries but none use the effect used in most application with a fab (or Google apps like keep, inbox) that when the fab is clicked the background of entire application becames semi-transparent white or black, it depends. I can't find any way to do it. Is it possible have an example or something like that to do this kind of effect? You can see what i mean in this image: The semi-black background <?xml version="1.0" encoding="utf-8"?>

Using ImageView as background for an Android Layout

≯℡__Kan透↙ 提交于 2019-12-03 08:16:51
I want to take advantage of the scaleType property, which I cannot use if I set my image using the background property on the LinearLayout . I've tried using a LinearLayout with 2 children: the first is an ImageView (for the background image) and the second child is another LinearLayout containing TextViews , Buttons, etc. But the result is just the image followed by the other views. Is it possible to float the nested LinearLayout over the ImageView somehow? I know that there's lots of variations on this question around, but I haven't found anything that's helped me yet. If I've missed

SearchView remove blue focus line and show cursor at certain position

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 02:09:41
I have been trying to remove the blue focus line in the SearchView .I am casting it to a AutoCompleteTextView so that I can use customized icons for my searchView. int id = searchView.getContext().getResources().getIdentifier("android:id/search_src_text", null, null); searchtextView = (AutoCompleteTextView) searchView.findViewById(id); I have tried using searchtextView.setBackGroundColor(0) and manually setting the background to #0000000 in my xml but I can still seee the blue line at the bottom. The second problem I am facing is that the cursor does not show up on the text initially.I want to

Android: Background image resize on keyboard pop up

吃可爱长大的小学妹 提交于 2019-12-02 21:53:40
I am developing an application in which the background image get shrink on keyboard pop-up. My .xml is as follows : <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:facebook="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/background" > <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent" > <RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" > /** Other stuff

Bind to service from new Context for configuration changes or bind from app context?

不想你离开。 提交于 2019-12-02 19:37:24
I'm trying to work out if bound service is appropriate for doing background work in my app. The requirements are that various application components can make web requests through it of varying priority. (Thus the service must maintain some sort of queue and be able to cancel it's ongoing requests for others of higher priority). I'd like the service to be relatively unobtrusive to the user such that they don't find it running after they are done with the application - if I want to do something more important that continues while the application is closed I can use startForeground() to push a

How to fix app go to background after reorder to front and back

青春壹個敷衍的年華 提交于 2019-12-02 17:04:28
问题 I currently managed to allow user switch between two distinct acitivties groups (let's said 4 activity classes A/B group and X/Y group) and switch by FLAG_ACTIVITY_REORDER_TO_FRONT flag, but I noticed there are some strange behaviour: A ->(start activity) X X ->(reorder to front) A X , A ->(start) B ->(start) B2 A , B , B2 ->(reorder to front) X ->(start) Y X , Y ->(reorder to front) A , B , B2 X , Y , A , B <-(press back, app hide to background, B2 destroyed) B2 X , Y , A , B (click to