Display paging control with white dots on the top android - android

I want to display this type of paging control as shown in the image i am getting the length of string array and i want to display the length as paging control with white dots as the number of pages.please help

I think this is what you need
or this.
It is called ViewPagerIndicatior and usually it is used on conjuction with ViewPager (of course you can use it also alone).
Hope this helps!

Related

Android, display items as tags in a list

Sorry for the basic question, but after a long time searching, I still don't know what to call this...
What do you call the list of items to display like this picture, (the addresses in the to section), each item is in a tag, and they will fill up the screen according to the screen size and content of the item.
I want to search about how to do this in the best way, but I'm not sure what to search for. What are these "tags" called?
Thanks so much.
What you are looking for is known as Chips . This component represent complex entities in small blocks, such as a contact/email address etc.
I'm attaching a Material design link where you can explore detailed information about them, their types and behaviour.
You can use below libraries to achive it.
https://github.com/pchmn/MaterialChipsInput
https://github.com/klinker41/android-chips

how to create a treemap chart in android

I have an android application thats take data from sqlite database
and display the data in a simple gridview and it's work
but I want to remove gridview and have a treemap chart
the treemap chart is displaying the result with custom squares size and color
upon a specific value , when the value is bigger the square will be bigger and most dark color
I want it like this!
There is this tool on github for displaying treemaps, conveniently called android-treemap, but there are tons of other ways to do that.
Use Google chart with web view.

android text wrapping

In my android application, I am displaying a long string into multiple pages. I achieve this by breaking the long string into a string array where every array element holds the number of characters which can fit on one screen (without scrolling). Also by using a previous/next button at the bottom of my activity I change the content of my textview to switch between pages(array elements).
Where I am stuck is in finding out how many characters will show on one page/screen. Remember I don’t want user to scroll. I use the paint.breaktext with screenwidth as the parameter and find out how many characters go in one line and then multiply it by number of lines on one screen to get the number of characters in a page. Android’s text wrapping at the end of each line is what gets my calculation of finding characters in a page, wrong. I am trying to put my own logic to accommodate for text wrapping but that is not working.
So my question is:
Is there any way I can find out that how many characters will show in one screen?
Or what can also help me is if I find out what logic is followed by android for wrapping the text for newline. Because if I know that, then I can readjust my number of characters on a page accordingly.
Or other option could be to disable text wrapping (not sure if possible). Because then I can use my own logic to wrap the text rather than trying to figure out Android’s text wrapping logic and adjusting my character-on-a-page accordingly.
Any help is much apreciated.

Reduce the padding inside a spinner android

I'm new to android development.Basically my question is how do I change the padding within a spinner so that the text is more compact and can therefore fit more values on the screen.
I have thought about using a slider, however I because there is such a wide range the value could be (1-20000) I wanted to enforce some restriction so selected lower numbers is easier.
Any tips would be great.
You can write s custom Spinner Adapter and override getView to write your own view. I had written some sample code for another similar question which might help.

Alphanumeric View in Android

I am developing an Android App which gives users an option 'Browse Alphanumerically'. Using this option let users view the list of items starting with a particular letter or number. Problem is that I cannot decide how to implement screen for this, which can work properly on any screen size. Please suggest me the best solution.
Thanks.
What I got from your question is that you want to show all alphabets and numbers to the user so they can jump directly to a entries start with the selected alphabet or number. If this is so, then one solution to your problem is use the Button or ImageButton any make a key pad of all alphabet and numbers. Don't forget to make them flexible enough for different screen sizes. Cheers.
Use a list activity. There are lots of tutorials on Google's developer site. When you want to narrow the list, just assign the smaller list to the ListView. Just filter your master list, sort it, and assign it to your list adapter.
Hope this was helpful.

Categories

Resources