There is a document in which some cells are combined with a group of others and if it is not the upper left cell (groups of combined cells) then when reading this cell, you can get a null value.
How to determine if this cell is just empty, or is it combined? In case it is combined (and not the top left) I need to get this value somehow.
in general, two main questions:
How to determine if a cell is merged?
If a cell is merged, how to get a value (instead of null)?
The screenshot shows which cell I need. But since my application selects a row and a column based on user data, it tries to get data from cell N11
enter image description here
Related
I'm building an Android app, which will display TV channels schedule.
The view would go something like, the tv guide we view on Tata sky, dish tv or any other service provider, like below:
Table with channel names.
Channel program names in a row, with time defined above, as column header..
Any idea, on how to start with creating this view in Android?
This would be like table with nequal cell widths, connected with time slots above.
Any help would be appreciated.
A possible solution could be to create a custom view that would represent each cell in the TV guide. The cells would need to be defined as focusable and selectable. You would need to decide how many pixels would represent a minute. Say 4 pixels per minute. You'd then calculate a layout width based on (4px per minute x runtime in minutes). Each cell could be added to a linear layout that represents the row. Your 'grid' would be a collection of these horizontal rows.
One caveat about this method is memory usage, you wouldn't have the automatic view recycling that you get in RecyclerView so would need to take care of that manually.
I'm building an Video conference application, where I want to rearrange participants' screens to be dynamically rearranged when anyone joins or leaves. e.g. for one participant, his screen will be in center, for two they will be side by side and for three triangular and so on...
I'm using relative layout and adding views in the relative layout programmatically at joining.
what approach should I use for the auto layout alignment with proper aspect ratio. Please help.
Because you haven't provided code, I can give you the logic I would use. First, just check how many participants are there.
Next, create mapping with ints as the tag, and string as the value. Each tag cooresponds to one int, the input:
(blogs.endjin.com)
Now, have different layouts based on that string value. For example, for the string "side by side" which corresponds to the int 2, you can inflate a different layout, or dynamically change the current one, to have the people side by side. I suggest you use a switch to check this, and have the different cases based off of what the string of the mapping is:
(www.slideshare.net)
You want your statement list-x in the diagram, to be getting the value of the mapping with the tag of the integer amount of people there are.
Steps in a more clear, easy to understand way that I have listed out for you:
Have a mapping for each amount of people. Amount of people is the
tag, and the layout is the value.
Look for the tag based on amount of people, and check the string
output, which is the layout. See what the string output is by comparing it with something that can expand the layout
You need to compare the strings, or the output.
Inflate appropriate layout based on string.
I somehow can only view the first 100 of my array in the Watches window. The three dots likely represent that there is more to be shown but I cannot find out how to expand the window. As you can see the size = 10000 so there really are more objects to be shown.
So how do I show these objects?
The IntelliJ IDEA only shows the first 100 by default. It is possible to adjust the range on the fly at any moment by right-clicking the collection in the Watches window and choose Adjust Range. Fill in two of the three field to specify the elements you want to show up. The range values persist until removed from the watch list.
I have a scenario where I have to show a huge report which consists of about 16 fields, and the last field consists of a radio group. I've taken a Table layout for this. But the problem is, I don't know the size of each field. I mean, there could be 50 characters in one, and 2 in another, and I have to adjust the width and height basing on that without loosing the look and feel criteria. For example,the first column is a Serial No which may contain 4 digits max, the second column contains an ID which may be a 20 digit number and so on. I can use Wrap Content, but its making the page clumsy! So, my question is, is there any possibility that my fields can automatically set their width and height basing on the length of the characters.Thanks in advance! Any help will be appreciated!
one of the fragments used in this app should be a table of mostly numerical data.
6 columns by 15 rows
the top four header rows have some fused cells
that's roughly 90 views (minus the fused cells + the purely layout views - tablelayout, tablerow, for example).
The first problem is a warning that over 80 views is too much, and the app might get laggy.
What can I do about this, considering this fragment/view can't be split? - the user needs access to this table of data all at once.
Secondly, the data in the table is static - and a lot of it is calculable. However different languages don't present numerical data the same way; for example "1,000" in English would be "1000" in French - and would maybe not be represented using roman numerals in some language I don't know.
Should these roughly 30 numerical items go in a /res/values/string_file.xml, considering the file will exist anyways, if only for the table headers, or should the app calculate them, apply a locale filter, and output them to the layout?
Thank you