Display Design Support Library in palette - android

Is there any way to add widgets provided by Design Support Library in android studio design palette to drag & drop them in screen?
I am referring to android.support.design.widget.TextInputLayout, android.support.design.widget.TextInputEditText etc... in here:
I use some of them in my app and it compiles/runs on kitkat fine but I have to copy/paste them after googling or from old projects each time.
Am I doing something wrong on including them in my project or there is no way to display them there?

Related

What's the difference between slider and seekbar in android

I am new to Android and i am learning SeekBars. in Google material design site i found Sliders from (com.google.android.material.slider.Slider) package instead of seekbars. I wonder what the difference is between Slider and SeekBar, which should I use and which is better? What is the purpose of implementing these two? I search a lot and There is no useful content on the internet
The following may not be entirely accurate to the last detail, but it illustrates some of the history well enough:
Slider is just the MDC version of SeekBar - named a little differently and with a lot more functionality.
First, there was only SeekBar - the original framework UI component bundled with Android.
Then, AndroidX libraries, previously called Support Libraries, were created for backporting new UI components and bugfixes to older phones which OEMs refused to update anymore. The AndroidX AppCompat subproject swaps out all your framework components for the "fixed" versions whenever you use AppCompatActivity. SeekBar -> AppCompatSeekBar, TextView -> AppCompatTextView...
The old Support Libraries also had a package named design which contained some of the then-new Material 1.0 components (CardView and whatnot) which didn't have a framework counterpart. That's the reason why there is no AppCompatCardView - because there is no framework CardView, so there is nothing to "fix" with AppCompat.
If I recall correctly, the design package of the Support Libraries later became the starting point for the Android implementation of Material Components when Material 2.0 was unveiled. Material Design has its own version of SeekBar which is called Slider and it can do everything the old Android SeekBar can plus a lot more.
As for which one to use? (Neither is "better", that kind of thinking is inapplicable)
If you're using the MDC library already, or if you need some of Slider's advanced capabilities, use Slider.
If you only need a simple line with a circle sliding between two extremes, use SeekBar instead of pulling the MDC library just for that.

How to add custom component in pallete of android studio

I want to know if there any way to add custom UI components in palette.
I tried searching in documentation, but i could not find any such option.
It seems like IntelliJ IDEA has this option, but i could not see it in Android Studio.

FloatingActionButton in Android

I'm studying about the layout types in Android and I started construct a floating button and I would like to know what is the best mode to create a floating button in Android Studio. Using floatingActionButton library at Android Studio or creating without libraries.
I advise you to use the support one when it answers your needs (or at least start with it until you see a major drawback).
Most of time, if the support library covers your needs, you'll be less likely to have bugs or issues with it than you would with a third party library.

How to use Android Design Pack provided by Google with Eclipse

I am trying to use these cool set of add-ins that Google provides in the link below
http://developer.android.com/design/downloads/index.html
But I cannot understand how to integrate it with eclipse so that they are available directly as a drag and drop. Do you have any idea how to use it?
You cannot integrate into eclipse, because it only allows valid Views "linked" to your project (directly or from a library). These are just sources to make drawables. You have to create your own drawables from it. But if you're interested in holo theme, you should check the sources of android (API 11+). If you've installed, you can find it at /platforms/android-11/data/res/ . Maybe you find useful the HoloEverywhere project. But you can use the Action Bar Icon Pack, you have to copy the appropriate drawables to your project and when you drag an ImageView into the layout editor, you can choose the source from a dialog or you can enter path in xml.
EDIT
Forgot to mention, there is a very great online tool which will generate holo drawables with custom colors here.
After some digging up and watching Google IO 2012 videos on Design, the Design pack is actually a template for designers to create a UI before actually developing it. It contains a pack of action bar icons (These can be imported into your project), bunch of stencils that can be used with Adobe products to create an initial mock ups of your applications. Though, they cannot be directly imported into eclipse and used (as they are actually available already with the SDK), its a good guide to start design instead of actually coding and re-inventing afterwards.

Android ICS Skin for our applications

Is there a easy way to have our application look like ICS or JB?
Mainly the slider and the radio button. They look old when displayed in green.
Any hint about this?
There's a nice package available on github called HoloEverywhere.
One thing though, do not try pass it off as a ICS/JB Application, just because it "looks" like the user interface one would expect to see in a native ICS/JB Android set up.
Best that can be done with the project, is to target the latest SDK to guarantee your wide-market of Android usage, including GB.
Aim high, not low ;)
The best way is to use the Android Library 'Actionbar Sherlock'. This Library uses all native ICS Themes, etc for older devices.
ActionBarSherlock is an extension of the compatibility library designed to facilitate the use of the action bar design pattern across all versions of Android with a single API.

Categories

Resources