How to do advance "listing" for android views - android

I've been searching for a while now how to do some "Advance" lists like the facebook news feed and I don't think I am using the right keywords to search how to do that. I'm still quite new to android environment.
This is what I am trying to achieve:
How would I achieve a kind of list like that? Can I just do somekind of layout with a scrollbar and feed in some custom views? Do I need to do some kind of advance list?
Thank you for refering me to some useful information

For simplicity's sake, I would recommend maybe you should use a ScrollView nesting a Vertical LinearLayout and dynamically add all your child items in there.
I know...it's not the right way, but this is coming from a (somewhat) beginner's point of view here myself. (I've been coding all my life, but I was immediately not a fan of Lists and "Adapters" when I got into Android.)
So, if/when you need to search through/categorize/sort/manage your items I would suggest maybe using View.setTag() to store key information about each child, and either a) loop through all your child elements for deep searching, or b) use View.findViewsWithText() or findViewWithTag() for quick searching/categorizing.
It can get dirty pretty quick if you have to do extensive sorting, but in my head (and maybe yours) I would rather use what I know rather than learn what I don't know.
I didn't intend this to be an rock-solid answer, but it's a lot of info to cover in the comments.
Happy programming

Related

material design two line list in android

this might be a duplicate question but I'm wondering how to use the two-line list from "material design" on a recycler view. I can't figure it out, and I can't find anything on Youtube and Stackoverflow after searching for about an hour.
I want to create something like the picture below.
This image is directly from the website itself: https://material.io/components/lists
Thanks!
Well, in order to do so, it would suffice to use android.R.layout.simple_list_item_2 as the row layout in your Adapter. Although it won't have the overflow menu icon. I don't know if you are trying to replicate that exact same list you posted.
But honestly, I don't know what's your Android experience. Do you have a working understanding of RecyclerViews and Adapters?
The link you provided shows Material Design guidelines. It doesn't necessarily mean that those lists and functionalities are ready to use with any basic Adapter you implement. For complex rows, you need to provide the layout, as well as implement functionality to user-initiated events such as click listeners, swipes, drags, etc.
For me, codelabs are always a good place to start with some hands-on exercise.
RecyclerView codelab:
https://developer.android.com/codelabs/kotlin-android-training-recyclerview-fundamentals?index=..%2F..android-kotlin-fundamentals&authuser=1#0

How to find a relative element based on another one by using Appium[Android]?

I try to use Appium to get one Wifi Adapter(Let's call it *AP*)'s status(such like 'Saved, Secured') in the system Wi-Fi UI(Android Platform), but they are different elements.
Is there a way we can find the element('Saved, Secured') based on another one(AP)? I know they are the children elements of one RelativeLayout element which is the container.
Sorry I don't have enough points to post an image, or it will give you guys a clearer description.
If you guys think the question is useful, please vote it, then I can get some basic points.
:-)
Thanks!
If I well understood your problem, you should drop an eye on the xpath function.
(here is a tutorial to use it well http://software-testing-tutorials-automation.blogspot.fr/2013/06/xpath-tutorials-identifying-xpath-for.html)
And with it and the function named source, you should be able to do want you want.
(those function are named this way in ruby, I don't know for other languages)
You could do below as well to find child elements.this is c# sample
IWebelememt parent = driver.findelement(selector);
IWebelement child = parent.findlement(Selector);

How can i achieve this kind of view??(in List View)

Hi guys i wan't to know that how can i achieve this kind of view??what i can think is ListView inside ScrollView but i don't think that will work the same way as in the picture also i think listview inside a scroll view is not a very good practice.
also i am thinking that can this be done via a parallax view??
Basically i am not asking for code(but if u can provide,i would be very grateful to you ;) )
but just the basic way explaining ,how i can achieve this.
This is known as parallax scrolling. Thankfully there are a variety of ways to do this, and even some really mature libraries to help you out.
The below article is a really great breakdown of someone trying to recreate the Profile screen in Google+:
http://antoine-merle.com/blog/2013/10/04/making-that-google-plus-profile-screen/
Here is a library that the article recommends, and one that I have used with great success in a few apps:
https://github.com/chrisjenx/Paralloid

How to develop ListView within ListView?

Friends,
I am trying to develop an application which requires the below UI:
I know its not a feasible thing to run a ListView with-in ListView or with-in a ScrollView. So I'll like to know that Is there any other way to do this same thing ? as the UI has to be same as its running in its LIVE iOS App.
Thanks in advance.
Solution: Thanks guys for all of your answers, but as I told that the Expandable-ListView is not the option in my condition. So I have creating a dynamic layout in Java Class file using an amount of various Layouts & Widget's Array. It took a lot of practice but it covered the necessity.
android-expandable-listview-simple
check this it will help you
You don't really describe your problem in detail but from your indication of a blue bar at the left, I suppose that you want to have some sort of a secondary ScrollView inside the primary ListView; which itself has its one scrolling view. If so, then using an ExpdandableListView will not be the solution that you want.
Android has some difficulties managing a ScrollView inside another ScrollView but if this is what you want, then take a look at: ScrollView Inside ScrollView .
Be warned that these solutions are not perfect and that probably you will never achieve the same level of control for this type of thing on Android as you can have on iOS.

Switch from one page to another

I'm new to Android programming and I'm working on my first application "FunFacts" where
there should be more than 100 cool things to learn about nature, science etc.
My question is: How can I switch from one page to another using two buttons "left" and "right"? which method should I use? I don't think that a horizontal scrollview is the solution.
So if I have 2 different layouts, page one and page two, how can I switch from one to other in my application?
Thank you!
It sounds like you might want a ViewPager. Below is a link to the Android tutorial. This creates a slideshow type effect which sounds like what you're going for. You said you will have different layouts which this will use one layout but you can customize the content and I would think you would want one so it all looks relatively the same
Docs
Update
No, you don't have to create 100 layouts or activities. Just one of each. Following will be a link to a post that explains it a little better. That post explains how it is like a listview in that you add the different pages to your view adapter as you would with a list. You can use the same layout for all and just add new data to it (like a list). Probably store them in an ArrayList or possibly a DB if you have that many and want to have a lot of data attached to them. I hope this makes sense and helps a little. I would suggest starting one with just a couple pages to see how it works, following these examples, and if you get stuck then post a more specific question as to what you can't get to work.
Link

Categories

Resources