I'm getting white lines on some android devices.
Background screen is black but wherever some buttons or lottie animation, this line gets visible as vertical line of 2/3px, to the left part of the screen.
Shared screenshot below:
In some devices, right part of ui gets visible in left part as vertical line of 2/3px.
There is no information on internet around it, Is there any solution/workaround for these?
as there is no sample code i would look into these places:
the image itself may have a background and not fully transparent
check the xml file for items of recyclerview if there is a paddingRight or some sort of margin with white background
3.check for cardview elevation
Once I faced the same issue caused by the layout holding a button or an image view. The layout's background color was different from its parent layout, & I had to declare that layout to keep my Views & alignments. The solution to that problem was to add this attribute:
android:background="#android:color/transparent"
And why isn't there any source code?
Related
The touch ripple effect here expands past its bounds. How is this done?
EDIT: I am okay with this working on 5.0+ only.
I've read from a few places that:
If you want to apply the standard ripple effect on Android 5.0: API 21
or more, which should not be limited to your view (unbounded ripple),
just apply to your View background :
android:background="?android:attr/selectableItemBackgroundBorderless"
I have tested it, what is happening here is that the ripple is not on the buttons, but on the background object. So the ripple is not actually extending past the buttons bounds here, but rather extending to the bounds of the background wrapper card object.
To replicate what you see in the picture,
1. Make a new layout. I would use either a relative layout or linearlayout
2. Add the upper EditText ("Add a quick note"), and then and the four lower buttons, all with clear backgrounds, but with gray borders like above.
3. Set your ripple animation on the background of the layout you put the buttons in, and be sure to set android:clickable="true"on your layout!
That gave me the same effect as your picture.
doc already mentioned it
//An unbounded red ripple.
<ripple android:color="#ffff0000" />
https://developer.android.com/reference/android/graphics/drawable/RippleDrawable.html
In android is there anything thing like we can create a hidden button or image and it is still clickable.or alternately is there any way to achieve this functionality in Android.
In ios we have the benefit of placing a clickable hidden button.
Everything can be achieved in Android
<Button...
android:background="#null">
You can make the button transparent or translucent by using the background property:
android:background="#ARGB"
where A is the transparency, which can be set between 0-F i.e., 0 means transparent and F means opaque.
The remaining colours are R-Red, G-Green, B-Blue.
so an eg. might be:
android:background="#200B"
which gives a tinge of blue colour.
This way you can provide transparency as well as a tinge of transparent colour to your view.
This works with any view.
Also you can apply this through code:
button.setBackgroundColour(0x220000BB);
Probably use a transparent Image to the button.
How can I wrap the content inside a box? Just like twitter.
Check how is Twitter and how is mine:
http://img17.imageshack.us/img17/8241/stackoverflow.png
To get the effect your trying to go far, you're going to have to use a 9patch png as your background image for your ListView and set padding on your ListView to match the size of your border on your 9patch.
The 9patch should look exactly like the background as it shows in the Twitter example.
You can learn more about 9patches here.
It's an optical illusion. You really want to create three 9-patches - top item, middle item, bottom item. Then dynamically set the background drawable for each item based on its position in the list. Just make sure your borders line up properly between the drawables and you should be fine.
In a listview or many of the scrollable views, there are on top and buttom a shading effect.
I am not talking about the fading effect: It is the black color that appears on the top along with the fading effect.
Actually even if i am not scrolling seems like this black color will stay! please check the image
How can this effect be removed? (maybe manipulate the color or sth)
http://img28.imageshack.us/img28/4035/badtl.png
this is a list
thanks
You can manipulate the color of the fading edge with the android:cacheColorHint attribute, if thats what you're talking about and you haven't figured it out in the past 2 months - see This post in the android docs for details.
I am getting stuck with making android screen layout same like i have in my iPhone application. The iPhone screen layout is given in below image. Please anyone can help me out to make same screen for android. You can give me some idea with having some code snippet please.
Thanks in advance.
First off, you should be creating an XML-based layout. The Android SDK has a graphical layout tool that will help you with that.
Start looking into 9-patch images for your custom button graphics and setting your android:background attribute to them within a <Button />. Make sure you use actual text for the buttons, not graphics of the text. You should probably use a <RelativeLayout /> for the main layout, as that will let you target multiple screen sizes easily without a mess of nested <LinearLayout />s.
For the tinted area, just use a translucent PNG (with an alpha channel) instead of attempting to line up graphics.
use relative layout to design this screen like use image for navigation bar and align it as parent top (use no title bar in mainfest) add its listener
similarly you can align other text and image view