Android - How to blur the layout that is behind - android

I m trying to making a bottom slide view and when it pops up i want to get the entire layout from behind blurred.
I couldn't do it. I read that many people recommends the Library "Blurry" but it is not working.
Blurry.with(context).radius(20).sampling(2).onto((ViewGroup)linear);
linear is my LinearLayout that is behind my Constraint. I want to blur that linear

Related

I am struggling with an Android layout with ConstraintLayout and Barrier

I am struggling with an Android layout with ConstraintLayout and Barrier
https://gist.github.com/dscoppelletti/62130db0ed773712bdfe0128b27e327b
The widgets should be rendered vertically except for some pairs the should be rendered horizontally.
It is all right from the top down to the widgets txtAddress and cmdAddress.
The next widget lblEventCategories, instead of following below, is rendered at the top and then follows the next widgets just like I want.
I think the problem concerns the Barrier widgets, but I can't solve it.
For the TextView "lblEventCategories" remove the following line:
app:layout_constraintBottom_toTopOf="#id/txtEventCategories"
Constraining the top to the bottom of the guideline should suffice. This will move things on the right direction.
There may be other issues, but this is one. I recommend going back to the top of the layout and add items one-by-one and check it out in the designer as you go.

alignment arrows do not appear in relative layout of my android-studio

i'm new to android and android studio and i'm trying to build a relative layout.
when i choose a relative layout and try to put a for example button inside the layout it sticks to the top left corner of the screen, and the arrows for aligning the element do not appear on the screen and all choosen elements stick together at the top left corner of the screen.
how do you think i can fix the problem??
Considering the picture, you cannot "align" elements in design editor using RelativeLayout.
Look, you are probably talking about ConstraintLayout.
With ConstraintLayout you can align elements and constrain elements where you need.
https://developer.android.com/training/constraint-layout Check out this tutorial.
And also, currently not many people use RelativeLayout as it a little bit complex, has more performance issues than ConstraintLayout.

How to preview ScrollView in Android Studio preview?

I have a ScrollView inside which I am using ConstraintLayout.
Now my ConstraintLayout has a lot of views inside it and user is suppose to scroll to view them (Obviously.) But I am using android studio layout editor and I am unable to place views beneath the views that are currently at the bottom.
What is the way around this issue? Other than I type them all in XML?
In design mode, you can drag and drop views directly to the android visualization panel, but if it does not fit, also you can drop them in the Component Tree panel.
You can set fix height to ScrollView, say 1000 or 2000 dp until your done with designing UI so you can add views at bottom.
Once done make it wrap_content

How can I relatively position this overlapping view?

I am finding it impossible to produce my desired layout in android studio.
I have a very simple gimmick drawing app and I'm trying to add a colour palette as a gridView. The palette is too big to not overlap the canvas, so I'd like to show it while the colour button is pressed so you can swipe to your desired colour.
Positioning the palette gridview is proving difficult. I would like it overlapping the canvas, above and horizontally centred with the 'pencil' colour selection button. I've tried two methods:
Having the gridview exist in the top-level relative layout, so it can easily overlap the canvas. This is as per the screenshot. However, I can't position it relative to the button here because the button is in a different layout.
Having the relative layout containing button and palette contained in the control view, as shown in the tree diagram. However, the palette won't draw outside its parent layout, and the relativeview can't overlap the canvas because it's in the linear layout for controls which goes beneath the canvas.
It seems like such a trivial thing - is it really impossible? Should I abandon all pretense of linear layouts and place everything in one relative layout?
Tree diagram

Is this activity designed with cardviews?

I am trying to design a layout similar to the one on the left image .
I thought this was a layout with one cardview for each section. However, I tried to put more than one cardview inside a LinearLayout orientation vertical and I only see one.
Why is that? Are cardviews are just meant to be used on RecyclerViews lists? If so, how can I achieve a layout design like these?
Reference for CardView. It is just a RelativeLayout with a rounded corners and a drop shadow. So yes, the image was probably an image of a layout designed with CardViews. At the same time, it could also just be a layout that was custom built and a shadow drawn behind it, if that developer wanted to do the work themselves. You can easily replicate the layout by creating this in xml, I can provide an example if necessary.
The CardView is not JUST designed for RecyclerView's but looks really good in a RecyclerView as the layout that is inflated IF a CardView layout makes sense to use. Again, it's just a RelativeLayout with extra features (rounded edges, and shadow)

Categories

Resources