Is it possible to create a single TextView and place several texts with different styles in it? Expected result
If it is not possible to do it with a single TV, what would be the best way? All the best
I have a list [1,2,3,4,5,6,7,8,9]
and I would like to get all the lists that arise as a result of grouping its elements in pairs and a solitary one, regardless of the order of the pairs. That is, I expect something like:
[[1,2],[3,4],[5,6],[7,8],[9]],
[[1,2],[3,4],[5,6],[7,9],[8]],
[[1,2],[3,4],[5,6],[8,9],[7]],
[[1,2],[3,4],[5,7],[6,8],[9]],
[[1,2],[3,4],[5,7],[6,9],[8]],
...
As @abulafia indicates, the total number of lists in the case of 9 elements would be:
C(9,2) * C(7,2) * C(5,2) * C(3,2)
where C(n,m) are the combinations of n elements taken from m to m. With 22680 possibilities as a result, quite far from the 36 that it indicated.
A greeting and thanks in advance
I would like to get the path to the "data.txt" file located in the "raw" folder in "res", on Windows it would be something like "app/res/raw/data", but I can't get it to work.
I have already tried it
String path = "android.resource://" + getPackageName() + "/" + R.raw.datos;
but when I create a File object with the path, its method exists()
returns false and an exception is thrown.
I'd like to save the file as a File object to pass through RandomAccessFile, so I can't eitherInputStream arquivo = getResources().openRawResource(R.raw.datos);
Thanks in advance, regards