Eric House
9d95630654
make capture of thumbnail part of save
...
Problem was that changes to games didn't show up in the thumbnail
until the game was closed. Simply using existing snapshot didn't work
because it changes the board layout in order to "draw" to
ThumbnailCanvas and that change isn't easily reversed. So copy
existing code to open a new JNI object with just-saved game data
and use it to create a thumbnail bitmap.
2016-07-25 15:57:48 -07:00
Eric House
6fcd340e07
add some commented-out logging
2016-07-25 15:44:22 -07:00
Eric House
2faf9c5334
bug: update lastturn timestamp for single-player games too
2016-07-25 08:38:24 -07:00
Eric House
53e40be2e3
add lastMoveTime to summary table (gtk version)
2016-07-25 08:28:37 -07:00
Eric House
dd779597d8
remove compile-time option for thumbnails: they're not going away
2016-07-23 16:25:06 -07:00
Eric House
a1de8cdd01
disable reset for options menu too (same as delete)
2016-07-22 16:35:46 -07:00
Eric House
7a865f279b
disable reset context menu too when game selected
2016-07-22 16:26:37 -07:00
Eric House
4d24fd38f5
disable delete context menuitem when game open
2016-07-22 16:11:27 -07:00
Eric House
cfbd06927a
fix long-tap menus in dual-pane mode
...
The DualpaneDelegate needed to handle (delegate) the necessary
methods.
2016-07-22 16:11:01 -07:00
Eric House
2105c43987
fix problems recently introduced to GameConfig
2016-07-22 16:10:45 -07:00
Eric House
d6b4070905
hang onto DelegateBase instance until replaced via an onStart() call.
...
They're often needed when the fragment isn't frontmost, i.e. when
onPause() has been called. My caching instances fix is feeling a bit
fragile, but I think it's better than nothing. Alternative is probably
to go with DialogFragments, a big change that might not be easy to
make work back to oldest Android.
2016-07-22 16:10:23 -07:00
Eric House
7634c425ef
stop referring to this in AlertDialog buttons
...
There's a problem in dual-pane mode where activites outlive
DelegateBase instances that are tied to fragments. AlertDialogs, being
bound to the MainActivity, can sometimes outlive the delegates that
create them, meaning the 'this' referred to from closures bound to
onClick() handlers can come to be invalid (e.g. referencing a removed
fragment). So add a global registry of current DelegateBase instances
by class, and from onClick() handlers fetch and use the current
instance instead of the 'this' that's bound.
2016-07-22 16:09:36 -07:00
Eric House
aef95ae498
dispatch onActivityResult() from DualpaneDelegate
...
Inviting didn't work because it's done by a separate activity whose
onActivityResult() was dropped because DualpaneDelegate was the
recipient. That now handles it by asking MainActivity to sent it to a
contained Delegate. Currently will go only to the top (rightmost) one.
2016-07-21 08:47:03 -07:00
Eric House
176820aac9
start game later so UI's ready
...
Was opening game in init(), but in dual-pane case there's no
onWindowFocusChanged() call from which to check state, so open it
instead from onResume(), at which point things are already in place to
handle callbacks immediately. That is, post() will work.
2016-07-21 08:41:21 -07:00
Eric House
0ea181687e
add constant controlling id logging
2016-07-21 07:05:35 -07:00
Eric House
a8b2c09491
fix startFragmentForResult
...
use s/getTargetFragment(), but there's still the hack of capturing
state in setResult() and then invoking fragment.onActivityResult()
blindly the next time the backstack is popped.
2016-07-21 07:03:44 -07:00
Eric House
c57b5a232f
cleanup: chat delegate no longer "returns" a result
2016-07-20 09:30:01 -07:00
Eric House
5b4e04bc5a
fix fragment exception launching after dict download
...
create queue of Runnables to be run only when Delegate is
visible (onResume() has been called and onPause() hasn't.) When
missing dict finishes downloading, rather than immediately opening its
game, post a Runnable to do it that will be run only after the main
activity is ready to have fragment transactions committing again.
2016-07-20 08:58:34 -07:00
Eric House
d3bd8047b1
cleanup
2016-07-20 08:51:31 -07:00
Eric House
c0bef59aad
don't hide commit-trade menuitem when not player's turn
2016-07-20 07:25:12 -07:00
Eric House
5dee7080a0
fix so when left pane launches a fragment it replaces the right
...
Required passing parent into constructors so it's available for
matching against the left pane later.
2016-07-19 17:38:50 -07:00
Eric House
2b58072524
cleanup: don't test for what can't happen
2016-07-19 17:35:20 -07:00
Eric House
d6ffd4dc25
get game lock and ptr from jnithread if available
...
When the game's already opened references must be obtained this
way. This may not be necessary however once game config is opened on
top of games list instead of on top of the game as it should be.
2016-07-19 09:30:08 -07:00
Eric House
98e3cd4281
remove unused code
2016-07-19 09:27:08 -07:00
Eric House
9a1a4f989f
ignore new files
2016-07-18 13:26:14 -07:00
Eric House
e2a3e622af
generate project.properties file
...
For some reason the 'clean-debug' cycle stopped working because the
file was nuked then not regenerated. Rather than figure out why, just
add a target to generate it every time.
2016-07-18 13:25:55 -07:00
Eric House
d26a215f34
add and use fragment for dicts list view
2016-07-18 13:08:06 -07:00
Eric House
1ed9dc7c9d
fix onResult stuff, at least for game config
2016-07-18 12:54:52 -07:00
Eric House
5bb707fc57
fix unnecessary crashes launching prefs activity
2016-07-18 12:03:56 -07:00
Eric House
d0b64f8f51
Merge branch 'android_108_release' into android_branch
2016-07-18 10:17:44 -07:00
Eric House
4f067edece
up version code (since already uploaded as a beta)
2016-07-18 09:31:41 -07:00
Eric House
01ffdb8b87
up changes log to include new fix
2016-07-18 09:27:33 -07:00
Eric House
959b2aec33
don't dismiss alert when about to post it again
...
On 4.2 and 4.3 at least, the dimiss comes after the second post
causing that to be dismissed, leaving no alert and the app in some
weird state where not even the back button works. It's been this way
on those older versions since I redid invitations for beta 98.
2016-07-18 09:23:14 -07:00
Eric House
5f8e5dc343
don't dismiss alert when about to post it again
...
On 4.2 and 4.3 at least, the dimiss comes after the second post
causing that to be dismissed, leaving no alert and the app in some
weird state where not even the back button works. It's been this way
on those older versions since I redid invitations for beta 98.
2016-07-18 09:19:09 -07:00
Eric House
b5afc25ead
catch up with generated changes: there's a new localized language now
2016-07-18 08:49:57 -07:00
Eric House
e3c5028b83
make script actually work
2016-07-18 08:49:36 -07:00
Eric House
f91e5f68c7
don't save state we won't need
2016-07-18 08:49:15 -07:00
Eric House
5a0304904f
sdk's generating an additional comment for German strings
2016-07-14 07:37:59 -07:00
Eric House
db0fb8e2f1
cleanup: remove EOL whitespace from java files
...
New diff tool is complaining about it, and sed is so easy...
2016-07-14 07:37:11 -07:00
Eric House
15256ac2ad
cleanup
2016-07-14 07:01:02 -07:00
Eric House
dcb4968ed9
fix NPE
...
I think I'm in a bad state when this happens, but no point in
crashing regardless.
2016-07-13 17:08:39 -07:00
Eric House
472a173297
disable delete if selected game is currently open
2016-07-13 17:03:18 -07:00
Eric House
1be2d514f0
Don't call executePendingTransactions().
...
Not doing so no longer crashes on when handling notifications, and is
causing runtime exceptions from the OS when board opening chat causes
it to be called recursively.
2016-07-13 16:42:58 -07:00
Eric House
7b2392842e
handle orientation changes at least as well as the old dualpane stuff
...
did. Only obvious problem is that the board doesn't always lay itself
out optimally for its half of the board when orientation changes.
2016-07-13 15:50:48 -07:00
Eric House
325304d83d
fix finish() to not exit whole activity in dualpane mode
2016-07-13 13:35:31 -07:00
Eric House
a7013f3ede
Setting FLAG_ACTIVITY_SINGLE_TOP for notification intents fixes
...
display problems with GamesList in dual-pane mode, I think because it
prevents stacked activities. Need to figure out if it introduces
problems elsewhere.
2016-07-13 12:35:54 -07:00
Eric House
9cfed0be8b
add, disabled, some logging/notification posting stuff useful for debugging
2016-07-13 12:29:42 -07:00
Eric House
54e5e61e4d
dispatch backPressed to the right-most fragment before, if still
...
unhandled, letting super interpret it as a pop-fragment action.
2016-07-13 12:23:36 -07:00
Eric House
4fc2dd97b3
handle notification intents: each delegate gets a chance to handle
...
them (only GamesListDelegate does), and MainActivity pops
fragments/delegates until one's exposed that does.
2016-07-13 11:13:04 -07:00
Eric House
0c4c1af926
call executePendingTransactions() to fix crash on opening
...
notification. Not sure why I had it commented out before.
2016-07-13 09:14:30 -07:00
Eric House
a375aed0fa
use class.getSimpleName() rather than getName for logging
2016-07-13 09:07:48 -07:00
Eric House
dd96c1a5c2
cleanup: change map key type
2016-07-11 12:31:42 -07:00
Eric House
91c561f6aa
fix NPEs by using existing mechanism for finding the right DlgDelegate
...
instance.
2016-07-11 11:52:55 -07:00
Eric House
a2b7c71fc1
convert remaining delegate launches to work, to varying degrees (but
...
as they did before), in dual pane mode.
2016-07-10 15:01:19 -07:00
Eric House
76404258a3
launch chat next to board. Works to send, but crash when opening the
...
notification that results.
2016-07-10 14:21:18 -07:00
Eric House
b8b73cc321
change how games are launched: works to show next to games list! But
...
there seems to be something wrong with how alerts are being posted.
2016-07-10 14:16:01 -07:00
Eric House
9865c0c68c
load new dualpane delegate when enabled. It does nothing so far, not
...
even allowing you to disable it again.
2016-07-10 13:26:09 -07:00
Eric House
377ac269c9
Turn enable-dualpane prefs back on. Ignored so far.
2016-07-10 13:12:29 -07:00
Eric House
12b1f3e38b
rename GamesListActivity -> MainActivity
2016-07-10 13:09:20 -07:00
Eric House
c3817ef452
change version strings for new release
2016-07-08 06:18:07 -07:00
Eric House
c11c1f4a64
save and restore chat text selection
2016-07-07 06:37:33 -07:00
Eric House
91a58ab041
position caret at end of restored chat pending text
2016-07-06 21:39:55 -07:00
Eric House
a86ff8b7b0
revert change that broke board updating on 2.3.7. Yay for git
...
bisect!!!!
2016-07-05 20:17:55 -07:00
Eric House
9dc50c9aa8
preserve unsent chats across activity reload. Use pairs table rather
...
than creating a new one.
2016-07-03 12:32:32 -07:00
Eric House
f05375273c
add send button to right of chat entry field for devices that don't
...
have action bar.
2016-07-02 12:54:04 -07:00
Eric House
68df61daa8
fix crash on old device by using new API conditionally
2016-07-02 12:29:16 -07:00
Eric House
88d8e61620
cleanup; tweak string
2016-07-02 12:28:57 -07:00
Eric House
1a6f5842c6
wait for dismissal of one alert before posting another. There really
...
needs to be some sort of queuing built into DlgDelegate, but for now
just handle in this one place.
2016-06-30 08:01:58 -07:00
Eric House
446663ea86
update to new gradle plugin as recommended/generated by AS
2016-06-30 07:15:21 -07:00
Eric House
624ec870f2
clean up .gitignore files for localization stuff
2016-06-30 07:01:30 -07:00
Eric House
2f71119eea
add ability to skip including localization resources on per-language,
...
per-variant basis. Just in case German isn't ready yet.
2016-06-30 06:54:36 -07:00
Eric House
a243b19fd0
fix NPE when relay's re-added to a game
2016-06-30 06:21:12 -07:00
Eric House
03492b97e8
fix doubled response to alert button: dismiss != negative
2016-06-29 07:01:08 -07:00
Eric House
f66fa5f75a
cleanup: remove commented out code etc.
2016-06-28 06:05:31 -07:00
Eric House
3bc60c59d0
Add option to remove relay from a game once it's been turned off.
2016-06-26 15:53:26 -07:00
Eric House
3d682c425f
remove Main activity
2016-06-26 15:41:15 -07:00
Eric House
94dadd4ca3
fix for single-device case
2016-06-26 14:54:01 -07:00
Eric House
3651137016
Merge branch 'android_branch' of ssh://maidu2/home/eehouse/src/git/repos/xwords into android_branch
...
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2016-06-26 14:38:50 -07:00
Eric House
e703ae7ec5
get rid of Main activity. Next release I need to find a way at launch
...
time to choose between dual-pane and regular mode that doesn't mess
up sending Intents and make it harder to prevent there being
multiple instances of activities that are supposed to be single-top.
2016-06-26 14:28:17 -07:00
Eric House
6c5b5489ad
cleanup: Remove some commented-out code
2016-06-26 13:53:59 -07:00
Eric House
61ea4b01e1
ignore files
2016-06-24 22:40:35 -07:00
Eric House
89a0426521
Merge remote-tracking branch 'weblate/android_translate' into android_translate
2016-06-24 22:37:24 -07:00
Eric House
372b0c2f1e
when user tries to turn on the preference disabling relay play and has
...
relay games in play, warn, and only disable if confirmed.
2016-06-24 21:19:30 -07:00
Eric House
aab779f258
duh: we're storing whether it's disabled, so reverse boolean
2016-06-23 06:27:01 -07:00
Eric House
7d47098947
start/stop relay service when pref changed; warn user when opens
...
relay-connected game and relay is disabled.
2016-06-22 07:20:23 -07:00
Eric House
6ef9c60cb9
add some generated .gitignore files
2016-06-22 06:53:02 -07:00
Eric House
aef5e5e046
add preference, off by default, to disable relay play. This is for
...
people who use the app for standalone play only and don't like the
battery implications of it hitting the network (which it does too
often right now.)
2016-06-21 06:08:25 -07:00
Eric House
a4ab8658fb
something's adding line in a different format to .gitignore files; go
...
with it.
2016-06-20 07:25:32 -07:00
Eric House
bd08b0cfee
cleanup: remove unneeded imports (from one old file)
2016-06-17 07:14:45 -07:00
Eric House
dc92007811
add grep: start process of having this script add value
2016-06-14 06:05:05 -07:00
Eric House
bba16c481e
improve game query script to filter on connnames and clarify filter param
2016-06-12 18:30:19 -07:00
Eric House
03efa3a7e6
toward being able to do release builds of CrossDbg
2016-06-09 21:30:04 -07:00
Eric House
777b1a7aab
turn off dualpane option. It's broken: makes it too easy to get lots
...
of instances of the games list and board views stacked on top of each
other.
2016-06-08 21:36:33 -07:00
Eric House
44c4d50051
Add config.xml file and use to enable dualpane option for CrossDbg builds
2016-06-07 04:31:31 -07:00
Eric House
032d073d6f
cleanup: there's no solo network status any more
2016-05-31 06:28:48 -07:00
Roland Illig
16cbbc5bee
Translated using Weblate (German)
...
Currently translated at 8.4% (62 of 730 strings)
2016-05-31 03:44:40 +02:00
Eric House
d3318f6631
fix chat edittext to expand vertically when there's more than one line
...
of text in it.
2016-05-30 15:14:52 -07:00
Eric House
124c85a2e9
fix gradle builds too to use combined constants files
2016-05-30 13:13:01 -07:00
Eric House
49e7abd23d
Combine the two generated constants files
2016-05-30 13:10:20 -07:00
Bernard Massot
6e16ec69c1
Translated using Weblate (French)
...
Currently translated at 100.0% (730 of 730 strings)
2016-05-29 18:46:59 +02:00