aboutsummaryrefslogtreecommitdiffstatshomepage log msg author committer range
Commit message (Collapse)AuthorAgeFilesLines
* global: bump copyright yearJason A. Donenfeld2021-10-291-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: hack gridlayoutmanager to fill columns before row if we're not scrollingJason A. Donenfeld2020-09-271-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we're horizontally scrolling, it makes sense to fill rows before columns. But if it all fits in one page and we don't need to scroll horizontally, it looks ridiculous. So, in this case, rearrange the tiles so that it appears to fill columns before rows. But we don't want things suddenly jumping around, so actually, keep the same ordering as rows-before-columns, but add invisible spaces after certain items, so that the fill area makes it look as though it's columns-before-rows. This winds up being much more visually pleasing. We do this by figuring out this kind of transformation: If we convert this matrix: 0 3 6 1 4 _ 2 5 _ To this one: 0 2 4 6 1 3 5 _ _ _ _ _ For a given index, how many spaces are under it? This changes depending on how many total are in a grid. Going from 3x3 to 4x3, for example, we have: count == 12, index = count == 11, index = 10 count == 10, index = 7,9 count == 9, index = 4,6,8 count == 8, index = 1,3,5,7 count == 7, index = 1,3,5,6! count == 6, index = 1,3,4!,5! count == 5, index = 1,2!,3!,4! count == 4, index = 0!,1!,2!,3! count == 3, index = 0!,1!,2! count == 2, index = 0!,1! count == 1, index = 0! count == 0, index = The '!' means two blanks below, no '!' means one blank below, and no mention means no blanks below. This commit adds code to compute such a table on the fly. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: handle going up directories betterJason A. Donenfeld2020-09-241-25/+40
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: show volume descriptions for file pickerJason A. Donenfeld2020-09-241-4/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: use system picker for API 29+Jason A. Donenfeld2020-09-231-10/+24
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: use our own file pickerJason A. Donenfeld2020-09-231-19/+166
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: escape deletion view with back buttonJason A. Donenfeld2020-09-231-0/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: select first item after toggling deletion modeJason A. Donenfeld2020-09-221-0/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: hook up isFocused as observable propertyJason A. Donenfeld2020-09-221-0/+4
| | | | | | | | This is kind of ridiculous, since the items own state should clearly be queryable, but it doesn't appear to be the case here, so just shuffle it around into kotlin and back. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: add text when there are no tunnelsJason A. Donenfeld2020-09-221-0/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: select the right thing on loadJason A. Donenfeld2020-09-221-2/+9
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: set layout manager from XMLHarsh Shandilya2020-09-221-2/+0
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* tv: do themingHarsh Shandilya2020-09-221-0/+2
| | | | Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* tv: account for broken TVs with no file pickerJason A. Donenfeld2020-09-221-1/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: do not redisplay stats when deletingJason A. Donenfeld2020-09-221-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: add ugly deletion modeJason A. Donenfeld2020-09-221-8/+26
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: wire in statsJason A. Donenfeld2020-09-221-1/+36
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: wire up tunnel start/stopJason A. Donenfeld2020-09-221-0/+50
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: begin to wire up databindingsJason A. Donenfeld2020-09-221-13/+9
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: abstract out tunnel importingJason A. Donenfeld2020-09-221-128/+7
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tv: initial draft of Android TV supportHarsh Shandilya2020-09-221-0/+162
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>