From 4711b508369a23cc698de37756654bb85c05a31d Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Tue, 30 Dec 2014 11:48:20 +1100 Subject: [PATCH] Swap works on 2.3 devices. * Cleaned up text alignment styles for API < 17. API v17 has a textAlignment style, wherease previous verisons rely on the "gravity" property. This change includes gravity="center" where there was previously only textAlignment="center". * Fragments get added properly on 2.3 device. For some reason, when adding the fragment to android.R.id.content, it wouldn't work on my 2.3 device. This change includes a (almost) empty activity layout with a single FrameLayout. The fragments are added to this rather than "content", and it works better. It is not perfect - it still adds the fargments behind the action bar, and so the action bar appears blue. But at least they are there :) * Added translatable strings where constants were used before. Not related to v2.3 support, but stil important for a stable release, that is fully translated. --- F-Droid/res/layout/swap_activity.xml | 14 ++++++++++++++ F-Droid/res/layout/swap_blank.xml | 4 ++-- F-Droid/res/values/strings.xml | 2 ++ F-Droid/res/values/styles.xml | 18 +++++++++++------- .../fdroid/fdroid/views/swap/SwapActivity.java | 4 +++- 5 files changed, 32 insertions(+), 10 deletions(-) create mode 100644 F-Droid/res/layout/swap_activity.xml diff --git a/F-Droid/res/layout/swap_activity.xml b/F-Droid/res/layout/swap_activity.xml new file mode 100644 index 000000000..4f8096856 --- /dev/null +++ b/F-Droid/res/layout/swap_activity.xml @@ -0,0 +1,14 @@ + + + + + + + + \ No newline at end of file diff --git a/F-Droid/res/layout/swap_blank.xml b/F-Droid/res/layout/swap_blank.xml index a865c22ab..ff4591a89 100644 --- a/F-Droid/res/layout/swap_blank.xml +++ b/F-Droid/res/layout/swap_blank.xml @@ -8,14 +8,14 @@