Commit graph

9643 commits

Author SHA1 Message Date
Eric House
575e64ed25 reverse sort order: newer listed first 2016-09-02 21:32:31 -07:00
Eric House
8a00b1ab47 reorder list when game saved
Since display is now by whose turn it is and how recently there's been a
move in the game, the order can change on every save. So in the listener
for saves, redraw the group the saved game belongs to. The best way to
do this without flicker seems to be to mimic closing then re-expanding
the group, so that's what I'm doing.
2016-09-01 08:16:21 -07:00
Eric House
5a91b2819c cleanup: pass size to constructor 2016-09-01 07:21:13 -07:00
Eric House
4b25d17dbf sort games by whose turn it is, local at top 2016-09-01 07:14:41 -07:00
Eric House
b64bf82278 postpone searching for fragment children
Getting an NPE iterating over fragment/children of dualpane view
because, I think, committing them's been postponed. So add the iteration
as a Runnable to the same postponement mechanism. This may be wrong:
needs to be run for a while to see if it fixes the NPEs I'm seeing (on
opening an intent in the morning after the device has been idle all
night.)
2016-09-01 07:12:27 -07:00
Eric House
adf71c85a5 add turnIsLocal to android db
So we can filter on it determining the display order of games in games
list.
2016-08-31 19:37:56 -07:00
Eric House
a450aceab3 keep list of fragment transactions to run later
An assertion is firing indicating that there's sometimes more than
one. So deal with that: keep an ArrayList.
2016-08-31 19:28:46 -07:00
Eric House
7dcb5f09b1 Merge branch 'android_release' into android_branch 2016-08-30 08:14:48 -07:00
Eric House
cd0de1daa7 ready for interim release
up version strings and make a toast DEBUG-only
2016-08-29 06:33:27 -07:00
Eric House
d7acdc4a93 don't commit fragment transactions until ready
Attempt to fix crashes happening when the occasional fragment
transaction happens before the OS is ready. Keep a boolean indicating
whether we're in that state, and when it's not set create a Runnable to
be run next time it is. Temporary Toast lets me know when it's working.
2016-08-29 06:19:13 -07:00
Eric House
1c9af1bcfc fix assertions: load xml widgets on demand 2016-08-29 06:18:21 -07:00
Eric House
42488232a5 don't commit fragment transactions until ready
Attempt to fix crashes happening when the occasional fragment
transaction happens before the OS is ready. Keep a boolean indicating
whether we're in that state, and when it's not set create a Runnable to
be run next time it is. Temporary Toast lets me know when it's working.
2016-08-26 21:48:52 -07:00
Eric House
c4efebad71 gtk: add localTurn column; format date 2016-08-26 07:26:33 -07:00
Eric House
1d1e971120 gtk: add initial size/position for window 2016-08-26 07:21:00 -07:00
Eric House
4c923ead08 add isLocal param to server_getCurrentTurn
I want to store this information separately in summaries tables so
e.g. games can be displayed sorted by whether it's the local player's
turn.
2016-08-26 06:58:55 -07:00
Eric House
926f069313 fix assertions: load xml widgets on demand 2016-08-25 21:34:33 -07:00
Eric House
f98d8db6ac don't default-uninstall from multiple devices
I'm tired of nuking from devices I didn't realize were attached.
2016-08-25 08:23:51 -07:00
Eric House
eb1e3f01d7 cleanup: use a local variable 2016-08-25 08:22:47 -07:00
Eric House
c7f33a7c8e cleanup: remove logging 2016-08-22 19:15:07 -07:00
Eric House
091854eee3 ignore new file 2016-08-22 19:13:49 -07:00
Eric House
bd3caf25eb re-create list when size limits change
Problem: brain-dead Android code (on 5.1.0 anyway) caches the
SectionIndexer separately from the ListAdapter that implements it, so
when you change the ListAdapter it keeps using the old one for its
SectionIndexer. Solution is to replace the ListView in the layout with a
FrameLayout into which a ListView is inserted at runtime on init and
whenever the data changes.
2016-08-20 13:37:35 -07:00
Eric House
9f2bc23b80 implement setTitle for GamesListDelegate
Was missing and so when other panes went away didn't always replace the
title.
2016-08-20 09:33:48 -07:00
Eric House
f23e44c56d cleanup: use chaining everywhere building alerts 2016-08-19 14:44:37 -07:00
Eric House
78c3d4c0e9 tweak changes text 2016-08-19 14:14:39 -07:00
Eric House
06b6091780 upgrade -Dbg version code too 2016-08-19 12:56:07 -07:00
Eric House
e1dbd8efc7 cleanup and add a bit of logging
I suspect curThis() is no longer needed so will log it for a while.
2016-08-19 12:49:30 -07:00
Eric House
2285502f33 offer to enable dual-pane mode only on upgrade
And do it starting with launches after the changes list has been
shown. Also change "Cancel" on negative button to "Later".
2016-08-19 12:48:15 -07:00
Eric House
495c82baa0 look for and remove '-' in locale
Some versions apparently return "en-us" as the language code when "en"
is expected. Check for and remove anything after a '-'.
2016-08-19 12:28:54 -07:00
Eric House
16b9bab719 up version strings and changes list 2016-08-19 11:58:10 -07:00
Eric House
6cc67b2347 always show toast announcing dual-pane mode
on startup, even for non-debug builds. And move the string into a
resource for localization.
2016-08-19 11:37:24 -07:00
Eric House
ba968b1e36 fix so extra game info shows in dual-pane mode too
onWindowFocusChanged() isn't called when a pane opens, and setting up
that field depended on it. So call from init() too.
2016-08-19 10:57:48 -07:00
Eric House
0bd9667163 cleanup: remove unnecessary attributes 2016-08-19 10:29:12 -07:00
Eric House
41e8df6f19 give any extra space to the board
Measure toolbar before board, and if it's narrower/shorter than we
allowed more that extra space into the rect given the board.
2016-08-19 10:05:31 -07:00
Eric House
ff6e9f0051 specify larger toolbar icons on larger devices
As it was before, and adding for xlarge too. Looks better this way. I
still can't figure out how to make the things center....
2016-08-18 17:38:57 -07:00
Eric House
43fcf21133 get rid of transparent frame around toolbar images 2016-08-18 13:44:03 -07:00
Eric House
62461d8de0 move toolbar button to left
Put it where it'll be visible/discoverable on more devices since it's a
pretty cool feature now.
2016-08-18 13:10:41 -07:00
Eric House
19a3f40d66 script to swap resources for small-device testing
Setting up an emulator that'll grab {menu,layout}-small resources is a
pain so this script exchanges them with regular resources so that a
subsequent compile will produce something that (when run) will catch
missing resources etc.
2016-08-18 12:38:41 -07:00
Eric House
c4d7626ae1 tweak toolbar layout to fit better 2016-08-18 12:00:18 -07:00
Eric House
2a8ce27ca9 make custom layout better on old android version
tweaks to BoardContainer and Toolbar to better position toolbar and
better hide/show it in tile exchange mode. The bar's still partially
offscreen sometimes on a 2.3.7 emulator but it's usable. Next I need to
try specifying the size of the bar rather than having it derive from the
size of the images it contains.
2016-08-18 11:30:32 -07:00
Eric House
9e81fb53b5 move NotAgainView into scroller for small screens 2016-08-18 10:08:27 -07:00
Eric House
bc98cdc83a don't use newer APIs in custom layout
They crash on 2.3.7 at least, and don't seem to be required anyway. I
think the only reason I need to implement onMeasure() is because
BoardView expects to be called a certain way.
2016-08-16 11:18:18 -07:00
Eric House
fbaaa4e5aa ignore new files 2016-08-16 11:18:02 -07:00
Eric House
6da7c85dbf use custom layout for board/toolbar relationship
Correct or not, this is my solution to the circular problem of how to
choose a vertical or horizontal toolbar before beginning the layout of
the board and toolbar. Adding a new custom container that holds the
board, toolbar(s) and tile exchange buttons and uses the ratio of its
own dimensions to choose which toolbar to show. Also drive toolbar
initialization from the layout process because when started from
BoardDelegate it now tries to install button listeners too early.
2016-08-16 11:01:46 -07:00
Eric House
4857ad6b26 complain when CLASSPATH isn't set for success 2016-08-15 17:29:28 -07:00
Eric House
3b24aab8c3 add new jni call board_containsPt()
for use debugging layouts/orientation changes later
2016-08-15 17:26:10 -07:00
Eric House
0a41471410 use dimen resource for toolbar button size
I need a way to have the buttons be smaller when the view's in a
fragment in dualpane mode. This probably is isn't the fix but it's worth
preserving.
2016-08-15 16:42:09 -07:00
Eric House
fd0bf23915 remove volume-keys-zoom option
Seem sit hasn't worked in a while on newer devices and nobody's
complained. We all pinch to zoom now.
2016-08-15 16:23:24 -07:00
Eric House
d15eab013d remove zoom button and menu
Everybody has multi-touch phones now.
2016-08-15 16:13:01 -07:00
Eric House
ab24140813 cleanup: constants + parallel array => enum
I didn't always know enums could have constructors
2016-08-15 16:01:30 -07:00
Eric House
71ac6062f1 don't enable delete of newly-configured game
Wasn't recording as open a game created then opened via the
configure-first option so the delete menuitem was being left enabled.
2016-08-15 14:14:14 -07:00