How to create a stretchy header in Kotlin? - android

i'm looking for ways to create a stretchy header in Kotlin, for now I came across multiple solutions for Swift.

So I ended up using this library for the bouncy effect, close enough!

Related

Implementing ATM Numeric input behaviour in Android EditText

How can I implement the following input behaviour using EditText in Android. Is there a existing library to implement this behaviour or if else, what would the logic be like? This behaviour can be seen on ATM machines as well.
Here's a gif that demonstrates this behaviour in an Android app:
As observed, the input starts with the last digit and proceeds to the left while appending necessary commas and decimal separation (2 decimals). I couldn't find any library that implements this behaviour.
Can you point me in the right direction with an existing implementation or a library?
I resolved this and built a custom library based on Subhechhu Khanal's link to a resolved thread. Anyone who needs this behaviour can use the custom library and customise it as required.
ATM-EditText Library: https://github.com/dinukapj/ATM-EditText
I encourage the community to make this library better. Thanks!

ListView with a gridView within infinite height

This is one of the implementations that I have the most difficulty in actually finding the best way to solve.
There are a lot of techniques and ways, but the last answers I found did not really seem to me to solve the problem. Another point is that they are usually very old techniques and libraries.
What I want to do is this:
How do I create this ListView with a GridView inside and the screen has infinite height without using ScrollView, so we know that it is not recommended to use ListView within ScrollView.
I am not asking you to develop the code, but rather recommend me the correct architecture that I should use to implement this (ScrollView, ListView, GridView), or memo a library that has new development concepts that can help me.
This question arises because many of the existing responses are too old and have outdated ideas.
I know the question is of a slightly higher level of complexity, but I accept everyone's help.
Thank you very much.
It is very easy to solve this using a RecyclerView.
The documentation is pretty clear and explains all the details necessary for the development of the functionality.
I will leave the necessary documentation links to implement:
RecyclerView
GridLayoutManager
ItemsViewHolder
We know that it is always better to use native components in the development, I recommend, but if you prefer to use a library ready to solve your problem, here are some interesting:
Sticky Headers
recyclerview-stickyheaders
StickyListHeaders

How to create a piece of UI that can be used across multiple activities without duplicating the layout and business logic?

How to create a piece of UI that can be used across multiple activities without duplicating the layout and business logic? Please provide some kind of example. Thank you.
You can reuse layout like this. Also, see this answer.
This is relatively simple and there are a few ways to do it, but essentially you want to create a custom UI component. The Documentation describes it a few approaches here, and there are a few tutorials out there as well as SO questions:
http://www.anotherandroidblog.com/2011/05/26/custom-composite-android-component/
How can I create custom controls in Android?
Android - Writing a custom (compound) component
In addition to the other answers, fragments can fill the role you are seeking.

Android: Is that possible to implement a flip/page curl from top to bottom like iphone?

I am implementing an app in which i need to flip/pagecurl a pageview? how can i do that? I didnot find a solution for this. I searched a lot in google? Can any one help me on this?
Three possibilities I can think of.
You can implement it using cocos2d-x. There are a lot of scene's transitions which also contains the page curl animation you describe.
There is an open source project called android_page_curl which does this.
Depending on the android versions you are supporting, you can try RenderScript to create that animation.

making custom component in android

I am new in android, I dont have that much of experience. I want to know making a custom component. I followed http://developer.android.com/guide/topics/ui/custom-components.html. But many things are not getting cleared. Recently I visited a link http://code.google.com/p/android-wheel/source/browse/trunk/wheel/src/kankan/wheel/widget/WheelView.java?r=4. There they have made custom component.
Please suggest me a well documented tutorial where I will get a clear picture about making custom component where onMeasure(int,int), onDraw(Canvas) all methods will be used and all the things will be documented well, why we are using this?
Please suggest me such a link or tutorial. I really want to be confident in it.
The question is somewhat unclear. What kind of custom components do you want to make. Just regular views? Viewgroups or perhaps custom adapters? You will probably find plenty of good material if you search more precise.
But to start you of with some:
http://www.anddev.org/creating_custom_views_-_the_togglebutton-t310.html
http://www.anddev.org/advanced-tutorials-f21/custom-views-t1891.html
Since I am a new user I can't post more links.

Categories

Resources