How to add text and picture in expandable list - android-listview

I am trying to learn Android by developing an app based on web site (eflore.fr), using the same database and photos embedded in the app. For this, I am using the android expandable listview example at the http://examples.javacodegeeks.com/android/core/ui/expandablelistview/android-expandablelistview-example/ site modified to be compatible with the database and it works well. I have 2 questions :
How to add a textview at the top of the main activity ? A textview in activity_main.xml or group.xml or row.xml is either a mistake or is not visible.
Is it possible to put text an image in the child list ?
Thanks for help

Related

Adding custome emojis to an flutter project

Long story short, I have to implement an emoji picker in Flutter.
The requirments are :
-
imported emojis(from PNGs or SVGs).
posibility to use the widget across diffrent pages or attach them to
any textfield component.
posibility to add custom emojies created by users.
Is there any posibility to implement it?
Deep into my research I came accross pub.dev/packages/emoji_picker_flutter, but I couldn't find out a posibility to add the libraries.

Can text in a Flutter web app be made searchable?

Problem:
When I run a Flutter app as a web app in a browser, I can use the browser's text search function Ctrl + F to search for text on the page. The search function finds all of the instances of the search term that are currently shown on screen, but it does not find all of the other instances of the text that are currently out of view.
Example:
In the example below I am searching for the word tile, which is used 8 times in total: 4 times in the blue tiles and another 4 times in the purple tiles.
However, when I search for the word tile, the browser only finds the 4 instances of the word that are currently shown on the screen at the time of the search. It ignores all instances of the word that are not rendered on the screen at the time of the search.
Documentation:
The Flutter and Dart documentation does not have any information on searchable text and I do not see any other similar widgets or properties available.
Attempts: I have tried using a SelectableText widget, but the same problem persists.
You can use element = document.getElementById('searchable_text') and element.textContent || a.innerText. See JavaScript tutorial on W3Schools.
Resources:
To create a list and assign it an Id, look at Get Started from Dart docs.
To select elements of the HTML document, read querySelector on Dart docs.
Tell us what worked for your!
This is something not supported by Flutter web yet (tracked here https://github.com/flutter/flutter/issues/53585).
One workaround can be to provide an in-app search bar for list views.
As flutter draws everything on canvas in web, android and ios so far so it doesn't support it.Means whatever you see, Text, images, etc on any flutter app it is just the drawing made on canvas.
If you scroll your page to the bottom before making a search, you should be able to find all the records you expect.
I believe those contents are not in the DOM until they enter the buffer of your viewport.
Meaning, they don't exists to the browser almost until you see them on your screen.
As for infinite lists, Flutter generates the rest of the DOM objects of your page while you scroll.
After scrolling, I can search and find all the words I'm reading, I see them highlighted.
The browser in not able to center on it when hitting Return or UP and DOWN arrows.

Using contentEditable inside Flutter's webview

For an application I need a document that is able to record and display among each other any type (text, audio, video, HTML, maybe PDF) that the user enters or inserts.
At first I wanted to use a listview with different types of widgets (textfields, video via plugin, webview via plugin etc.), but it seemed much too complicated to me. For example, how could I have selected parts of a text field, the following image and parts of the next text field at the same time?
Actually, the document format that I need already exists: HTML. If you set the attribute "contentEditable" accordingly, it is not a big problem to let the user change the document in any way with the help of JS. And this is exactly my problem: If I use the Webview (Developer Preview) of the Flutter team (webview_flutter), the attribute "contentEditable" is apparently ignored. I can't mark text and no keyboard appears.
Am I doing something wrong or does the plugin not (yet) support this attribute? Otherwise, is there an alternative? I have to say that I am an absolute beginner in Flutter.

Listview Cursor adapter with section header

I'm working on an IM application. In that I'm using listview to show the buddies list with the help of custom cursor adapter. I'd like to add section header as like contacts application display.Which is the best way of doing it without adding any new library for that?

How to create a custom listview like iPhone in Android

I was designing a custom listview in Android following the online tutorial Android Series: Custom ListView items and adapters and I created a custom list view like this:
This is simple and fine. Now I was surfing the web and found this fantastic listview for iPhone:
How can I create something like this? How has he given a box like interface for each row separating them from background and each other?
You could try removing the list dividers (android:divider="#null" or android:dividerHeight="0px") and using a custom drawable as the background for each row (either a 9patch or ShapeDrawable, possibly arranged in a StateList so they can have pressed/selected states). Then just also put a margin on the row layout, and your spacing should be taken care of (alternatively, you could use a transparent image as the list's divider with an appropriate height). But be careful about simply aping an iOS style because it looks nice; think about the typical Android user and what they take as interface cues. If you made your Android list look exactly like that screenshot below, I think many Android users wouldn't even realize they could click on those rows, or that they're part of a scrollable list.
The listview and each item in the listview can have separate backgrounds. So all you need to do is make some PNG files that look like the background of the items and the list itself.
You can set the backgrounds in XML using the android:src.
Or at runtime using:
setImageDrawable(getResources().getDrawable(R.drawable."picture name"))