Complex curved background for an Android view - android

I want to make a multi-layered background with the gray layer being on top of the red one so that it can be movable up and down the y-scale. My issue is with the way I can achieve the complex curve that is on the top of the gray layer.
Any ideas where can I look for solution for my problem?

You can make a collapsing toolbar like this : Collapsing Toolbar Layout Guide
and set the background gray, and the "giraffe" image (look in the link) as the picture you put in your question.

Related

Android Toolbar buttons shadow

I added this translucent gradient background to a Toolbar so buttons are noticeable on any background, but I wonder how to make a shadow just under the button itself instead of what I did?
Thank You
EDIT
So I realized the easiest way to achieve that is by setting a Drawable Resources.
getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_home);
and
<style name="AppTheme" parent="parent_theme">
<item name="actionModeShareDrawable">#drawable/ic_share</item>
</style>
I downloaded Material Vector assets, added shadow in Adobe Illustrator, imported it to PNG. But the Android Studio's Image Asset/Action Bar and Tab Icons mess up with it I didn't get why - it removed the shadow and colors went different even with Custom 'Theme' so I did different dpi image sizes by myself and that's what I got. That's quite what I wanted
http://imgur.com/vnR98H5
Well, I don't know how to do it with simple button, if you could change Button with FloatingActionButton you may use elevation for making a shadow.
Floating Action Button (FAB) is simply a circle button with some drop shadow that unbelieveably could change the world of design. No
surprise why it becomes a signature of Material Design. So let's start
with this thing. Add FAB in layout file with FloatingActionButton and wrap it with FrameLayout since it needs some parent to make it aligned at bottom right position of the screen.
and
The shadow depth is automatically set to the best practices one, 6dp
at idle state and 12dp at pressed state. Anyway you are allowed to
override these values by defining app:elevation for idle state's
shadow depth and app:pressedTranslationZ for press state's.
From: http://inthecheesefactory.com/blog/android-design-support-library-codelab/en
Of course, you can customize by adding your icon. I'm pretty sure, that play icon as you have on button is in Material Design library.
You can also grab it here: https://design.google.com/icons/
To resume, I advice you learn something more about FloatingActionButton, which alows you to add some nice effect like elevation/shadow and others good things from Material library.
Hope it make your development easier and your app more beautiful.

How do I apply drop Shadow right and bottom of transparent view in Android?

I want to apply drop shadow right and bottom on view (TextView/LinearLayout) with transparent background.
I have draw shadow using Layer-list as said in this link:
Add shadow on right and bottom side of the layout
but it is not giving me desired transparency.
can any one help me out?
Thanks

How to create a custom ActionBar with a background and a pattern image?

I have to create an ActionBar with a background and another image on top of the background (with opacity) which displays like a pattern.
I have found the way to set the background image for my ActionBar, by using setBackgrounddrawable().
But how can I set the pattern image on top of background image?
Can anyone please suggest?
A great SO Post for making a custom action bar. To set the opacity, use View.setAlpha(float) 0f to 1f.
This may help you "http://www.londatiga.net/it/how-to-create-quickaction-dialog-in-android/"
,this example having types of action bars.

android-how to make a layout on top of every thing and not transpranet

I am working on a bottom toolbar for android by forking the SlidingUpPanel at:
https://github.com/umano/AndroidSlidingUpPanel
I want to make it always on top of every thing not defined in my sliding up panel. But when I slide it up, if there is something behind it, my layout is acting like it's transparent. How can I fix it to act like a real toolbar ?
before sliding :
after sliding :
source : http://www.4shared.com/rar/jeA2gbZy/androidslidinguppanel-master.html
Add a onClickListener to the root view of sliding up pannel.I did that and it works well, hope it works for you too.
Set a background to the button and change text color.
I dont think they are transparent but the text just has the same color and the button has a transparent background by default.

How to make the instagram actionbar style for android?

I know how to make the gradient and the logo. But I don`t know how to add all that different borders and how to add the refresh icon (that also has some custom border around it).
Instagram Action Bar:
How is that possible?
You can do it by using a horizontal LinearLayout with 2 children, the left hand column with the logo and the right hand column with the refresh button. You can create a background drawable using the Shape XML:
http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape
I'd look at the provided ActionBar and ActionBarCompat. It has hooks for producing basic, as well as complex action bars.

Categories

Resources