From c87f6a64f9829eb95413446c0aae9dcd6dc8e050 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 30 May 2018 14:44:09 +0200 Subject: [PATCH] get "basic" flavor building and running --- app/build.gradle | 6 + app/lint.xml | 2 +- .../fdroid/localrepo/peers/WifiPeer.java | 30 ++++ .../fdroid/net/WifiStateChangeService.java | 35 ++++ .../fdroid/net/bluetooth/BluetoothClient.java | 34 ++++ .../fdroid/views/hiding/HidingManager.java | 32 ++++ .../fdroid/views/main/MainViewController.java | 96 +++++++++++ .../views/swap/SwapWorkflowActivity.java | 28 +++ .../basic/res/menu/main_activity_screens.xml | 14 ++ app/src/basic/res/xml/preferences.xml | 163 ++++++++++++++++++ app/src/full/AndroidManifest.xml | 131 ++++++++++++++ .../res/drawable-hdpi/circle.png | Bin .../res/drawable-hdpi/hotspot.png | Bin .../ic_add_circle_outline_white.png | Bin .../drawable-hdpi/ic_arrow_forward_white.png | Bin .../res/drawable-hdpi/ic_bluetooth_white.png | Bin .../drawable-hdpi/ic_check_circle_white.png | Bin .../res/drawable-hdpi/ic_fdroid_grey.png | Bin .../drawable-hdpi/ic_network_wifi_white.png | Bin .../res/drawable-hdpi/ic_qr_grey.png | Bin .../res/drawable-hdpi/ic_swap.png | Bin .../res/drawable-ldpi/circle.png | Bin .../res/drawable-ldpi/hotspot.png | Bin .../res/drawable-ldpi/ic_fdroid_grey.png | Bin .../res/drawable-ldpi/ic_qr_grey.png | Bin .../res/drawable-ldpi/ic_swap.png | Bin .../res/drawable-mdpi/circle.png | Bin .../res/drawable-mdpi/hotspot.png | Bin .../ic_add_circle_outline_white.png | Bin .../drawable-mdpi/ic_arrow_forward_white.png | Bin .../res/drawable-mdpi/ic_bluetooth_white.png | Bin .../drawable-mdpi/ic_check_circle_white.png | Bin .../res/drawable-mdpi/ic_fdroid_grey.png | Bin .../drawable-mdpi/ic_network_wifi_white.png | Bin .../res/drawable-mdpi/ic_qr_grey.png | Bin .../res/drawable-mdpi/ic_swap.png | Bin .../res/drawable-xhdpi/circle.png | Bin .../ic_add_circle_outline_white.png | Bin .../drawable-xhdpi/ic_arrow_forward_white.png | Bin .../res/drawable-xhdpi/ic_bluetooth_white.png | Bin .../drawable-xhdpi/ic_check_circle_white.png | Bin .../res/drawable-xhdpi/ic_fdroid_grey.png | Bin .../drawable-xhdpi/ic_network_wifi_white.png | Bin .../res/drawable-xhdpi/ic_qr_grey.png | Bin .../res/drawable-xhdpi/ic_swap.png | Bin .../res/drawable-xxhdpi/circle.png | Bin .../ic_add_circle_outline_white.png | Bin .../ic_arrow_forward_white.png | Bin .../drawable-xxhdpi/ic_bluetooth_white.png | Bin .../drawable-xxhdpi/ic_check_circle_white.png | Bin .../res/drawable-xxhdpi/ic_fdroid_grey.png | Bin .../drawable-xxhdpi/ic_network_wifi_white.png | Bin .../res/drawable-xxhdpi/ic_qr_grey.png | Bin .../res/drawable-xxxhdpi/circle.png | Bin .../ic_add_circle_outline_white.png | Bin .../ic_arrow_forward_white.png | Bin .../drawable-xxxhdpi/ic_bluetooth_white.png | Bin .../ic_check_circle_white.png | Bin .../res/drawable-xxxhdpi/ic_fdroid_grey.png | Bin .../ic_network_wifi_white.png | Bin .../res/drawable-xxxhdpi/ic_qr_grey.png | Bin .../res/drawable/nearby_splash.xml | 0 .../select_local_apps_list_item.xml | 0 .../select_local_apps_list_item.xml | 0 .../res/layout/activity_panic_settings.xml | 0 .../res/layout/dialog_app_hiding.xml | 0 .../res/layout/main_tab_categories.xml | 0 .../res/layout/main_tab_swap.xml | 0 .../res/layout/main_tab_whats_new.xml | 0 .../layout/select_local_apps_list_item.xml | 0 .../res/layout/swap_activity.xml | 0 .../res/layout/swap_app_list_item.xml | 0 .../{main => full}/res/layout/swap_blank.xml | 0 .../res/layout/swap_confirm_receive.xml | 0 .../res/layout/swap_connecting.xml | 0 .../res/layout/swap_initial_loading.xml | 0 .../res/layout/swap_join_wifi.xml | 0 .../{main => full}/res/layout/swap_nfc.xml | 0 .../res/layout/swap_peer_list_item.xml | 0 .../res/layout/swap_select_apps.xml | 0 .../res/layout/swap_send_fdroid.xml | 0 .../res/layout/swap_success.xml | 0 .../res/layout/swap_wifi_qr.xml | 0 app/src/{main => full}/res/menu/swap_next.xml | 0 .../res/menu/swap_next_search.xml | 0 .../{main => full}/res/menu/swap_search.xml | 0 app/src/{main => full}/res/menu/swap_skip.xml | 0 .../mipmap-hdpi/ic_calculator_launcher.png | Bin .../mipmap-mdpi/ic_calculator_launcher.png | Bin .../mipmap-xhdpi/ic_calculator_launcher.png | Bin .../mipmap-xxhdpi/ic_calculator_launcher.png | Bin .../mipmap-xxxhdpi/ic_calculator_launcher.png | Bin app/src/full/res/values-v17/styles.xml | 29 ++++ app/src/full/res/values-v21/styles.xml | 8 + app/src/full/res/values/attrs.xml | 6 + app/src/full/res/values/colors.xml | 13 ++ app/src/full/res/values/styles.xml | 134 ++++++++++++++ app/src/main/AndroidManifest.xml | 109 +++--------- .../fdroid/views/main/MainActivity.java | 10 +- app/src/main/res/values-v17/styles.xml | 25 --- app/src/main/res/values-v21/styles.xml | 4 - app/src/main/res/values/attrs.xml | 3 - app/src/main/res/values/colors.xml | 9 - app/src/main/res/values/ids.xml | 5 + app/src/main/res/values/styles.xml | 130 -------------- 105 files changed, 795 insertions(+), 261 deletions(-) create mode 100644 app/src/basic/java/org/fdroid/fdroid/localrepo/peers/WifiPeer.java create mode 100644 app/src/basic/java/org/fdroid/fdroid/net/WifiStateChangeService.java create mode 100644 app/src/basic/java/org/fdroid/fdroid/net/bluetooth/BluetoothClient.java create mode 100644 app/src/basic/java/org/fdroid/fdroid/views/hiding/HidingManager.java create mode 100644 app/src/basic/java/org/fdroid/fdroid/views/main/MainViewController.java create mode 100644 app/src/basic/java/org/fdroid/fdroid/views/swap/SwapWorkflowActivity.java create mode 100644 app/src/basic/res/menu/main_activity_screens.xml create mode 100644 app/src/basic/res/xml/preferences.xml create mode 100644 app/src/full/AndroidManifest.xml rename app/src/{main => full}/res/drawable-hdpi/circle.png (100%) rename app/src/{main => full}/res/drawable-hdpi/hotspot.png (100%) rename app/src/{main => full}/res/drawable-hdpi/ic_add_circle_outline_white.png (100%) rename app/src/{main => full}/res/drawable-hdpi/ic_arrow_forward_white.png (100%) rename app/src/{main => full}/res/drawable-hdpi/ic_bluetooth_white.png (100%) rename app/src/{main => full}/res/drawable-hdpi/ic_check_circle_white.png (100%) rename app/src/{main => full}/res/drawable-hdpi/ic_fdroid_grey.png (100%) rename app/src/{main => full}/res/drawable-hdpi/ic_network_wifi_white.png (100%) rename app/src/{main => full}/res/drawable-hdpi/ic_qr_grey.png (100%) rename app/src/{main => full}/res/drawable-hdpi/ic_swap.png (100%) rename app/src/{main => full}/res/drawable-ldpi/circle.png (100%) rename app/src/{main => full}/res/drawable-ldpi/hotspot.png (100%) rename app/src/{main => full}/res/drawable-ldpi/ic_fdroid_grey.png (100%) rename app/src/{main => full}/res/drawable-ldpi/ic_qr_grey.png (100%) rename app/src/{main => full}/res/drawable-ldpi/ic_swap.png (100%) rename app/src/{main => full}/res/drawable-mdpi/circle.png (100%) rename app/src/{main => full}/res/drawable-mdpi/hotspot.png (100%) rename app/src/{main => full}/res/drawable-mdpi/ic_add_circle_outline_white.png (100%) rename app/src/{main => full}/res/drawable-mdpi/ic_arrow_forward_white.png (100%) rename app/src/{main => full}/res/drawable-mdpi/ic_bluetooth_white.png (100%) rename app/src/{main => full}/res/drawable-mdpi/ic_check_circle_white.png (100%) rename app/src/{main => full}/res/drawable-mdpi/ic_fdroid_grey.png (100%) rename app/src/{main => full}/res/drawable-mdpi/ic_network_wifi_white.png (100%) rename app/src/{main => full}/res/drawable-mdpi/ic_qr_grey.png (100%) rename app/src/{main => full}/res/drawable-mdpi/ic_swap.png (100%) rename app/src/{main => full}/res/drawable-xhdpi/circle.png (100%) rename app/src/{main => full}/res/drawable-xhdpi/ic_add_circle_outline_white.png (100%) rename app/src/{main => full}/res/drawable-xhdpi/ic_arrow_forward_white.png (100%) rename app/src/{main => full}/res/drawable-xhdpi/ic_bluetooth_white.png (100%) rename app/src/{main => full}/res/drawable-xhdpi/ic_check_circle_white.png (100%) rename app/src/{main => full}/res/drawable-xhdpi/ic_fdroid_grey.png (100%) rename app/src/{main => full}/res/drawable-xhdpi/ic_network_wifi_white.png (100%) rename app/src/{main => full}/res/drawable-xhdpi/ic_qr_grey.png (100%) rename app/src/{main => full}/res/drawable-xhdpi/ic_swap.png (100%) rename app/src/{main => full}/res/drawable-xxhdpi/circle.png (100%) rename app/src/{main => full}/res/drawable-xxhdpi/ic_add_circle_outline_white.png (100%) rename app/src/{main => full}/res/drawable-xxhdpi/ic_arrow_forward_white.png (100%) rename app/src/{main => full}/res/drawable-xxhdpi/ic_bluetooth_white.png (100%) rename app/src/{main => full}/res/drawable-xxhdpi/ic_check_circle_white.png (100%) rename app/src/{main => full}/res/drawable-xxhdpi/ic_fdroid_grey.png (100%) rename app/src/{main => full}/res/drawable-xxhdpi/ic_network_wifi_white.png (100%) rename app/src/{main => full}/res/drawable-xxhdpi/ic_qr_grey.png (100%) rename app/src/{main => full}/res/drawable-xxxhdpi/circle.png (100%) rename app/src/{main => full}/res/drawable-xxxhdpi/ic_add_circle_outline_white.png (100%) rename app/src/{main => full}/res/drawable-xxxhdpi/ic_arrow_forward_white.png (100%) rename app/src/{main => full}/res/drawable-xxxhdpi/ic_bluetooth_white.png (100%) rename app/src/{main => full}/res/drawable-xxxhdpi/ic_check_circle_white.png (100%) rename app/src/{main => full}/res/drawable-xxxhdpi/ic_fdroid_grey.png (100%) rename app/src/{main => full}/res/drawable-xxxhdpi/ic_network_wifi_white.png (100%) rename app/src/{main => full}/res/drawable-xxxhdpi/ic_qr_grey.png (100%) rename app/src/{main => full}/res/drawable/nearby_splash.xml (100%) rename app/src/{main => full}/res/layout-v11/select_local_apps_list_item.xml (100%) rename app/src/{main => full}/res/layout-v17/select_local_apps_list_item.xml (100%) rename app/src/{main => full}/res/layout/activity_panic_settings.xml (100%) rename app/src/{main => full}/res/layout/dialog_app_hiding.xml (100%) rename app/src/{main => full}/res/layout/main_tab_categories.xml (100%) rename app/src/{main => full}/res/layout/main_tab_swap.xml (100%) rename app/src/{main => full}/res/layout/main_tab_whats_new.xml (100%) rename app/src/{main => full}/res/layout/select_local_apps_list_item.xml (100%) rename app/src/{main => full}/res/layout/swap_activity.xml (100%) rename app/src/{main => full}/res/layout/swap_app_list_item.xml (100%) rename app/src/{main => full}/res/layout/swap_blank.xml (100%) rename app/src/{main => full}/res/layout/swap_confirm_receive.xml (100%) rename app/src/{main => full}/res/layout/swap_connecting.xml (100%) rename app/src/{main => full}/res/layout/swap_initial_loading.xml (100%) rename app/src/{main => full}/res/layout/swap_join_wifi.xml (100%) rename app/src/{main => full}/res/layout/swap_nfc.xml (100%) rename app/src/{main => full}/res/layout/swap_peer_list_item.xml (100%) rename app/src/{main => full}/res/layout/swap_select_apps.xml (100%) rename app/src/{main => full}/res/layout/swap_send_fdroid.xml (100%) rename app/src/{main => full}/res/layout/swap_success.xml (100%) rename app/src/{main => full}/res/layout/swap_wifi_qr.xml (100%) rename app/src/{main => full}/res/menu/swap_next.xml (100%) rename app/src/{main => full}/res/menu/swap_next_search.xml (100%) rename app/src/{main => full}/res/menu/swap_search.xml (100%) rename app/src/{main => full}/res/menu/swap_skip.xml (100%) rename app/src/{main => full}/res/mipmap-hdpi/ic_calculator_launcher.png (100%) rename app/src/{main => full}/res/mipmap-mdpi/ic_calculator_launcher.png (100%) rename app/src/{main => full}/res/mipmap-xhdpi/ic_calculator_launcher.png (100%) rename app/src/{main => full}/res/mipmap-xxhdpi/ic_calculator_launcher.png (100%) rename app/src/{main => full}/res/mipmap-xxxhdpi/ic_calculator_launcher.png (100%) create mode 100644 app/src/full/res/values-v17/styles.xml create mode 100644 app/src/full/res/values-v21/styles.xml create mode 100644 app/src/full/res/values/attrs.xml create mode 100644 app/src/full/res/values/colors.xml create mode 100644 app/src/full/res/values/styles.xml diff --git a/app/build.gradle b/app/build.gradle index 7376e1fbc..9236b55e8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -170,6 +170,12 @@ dependencies { androidTestImplementation 'com.android.support.test:rules:0.5' } +tasks.whenTaskAdded { task -> + if (task.name.startsWith("lintBasic")) { + android.lintOptions.abortOnError = false + } +} + checkstyle { toolVersion = '7.2' } diff --git a/app/lint.xml b/app/lint.xml index a2eed735d..277c6dcb1 100644 --- a/app/lint.xml +++ b/app/lint.xml @@ -36,7 +36,7 @@ - + diff --git a/app/src/basic/java/org/fdroid/fdroid/localrepo/peers/WifiPeer.java b/app/src/basic/java/org/fdroid/fdroid/localrepo/peers/WifiPeer.java new file mode 100644 index 000000000..112dfdce7 --- /dev/null +++ b/app/src/basic/java/org/fdroid/fdroid/localrepo/peers/WifiPeer.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2018 Senecto Limited + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +package org.fdroid.fdroid.localrepo.peers; + +import org.fdroid.fdroid.data.NewRepoConfig; + +/** + * Dummy version for basic app flavor. + */ +public class WifiPeer { + public WifiPeer(NewRepoConfig config) { + } +} diff --git a/app/src/basic/java/org/fdroid/fdroid/net/WifiStateChangeService.java b/app/src/basic/java/org/fdroid/fdroid/net/WifiStateChangeService.java new file mode 100644 index 000000000..4a7e652f0 --- /dev/null +++ b/app/src/basic/java/org/fdroid/fdroid/net/WifiStateChangeService.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2018 Senecto Limited + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +package org.fdroid.fdroid.net; + +import android.content.Context; +import android.content.Intent; +import android.support.annotation.Nullable; + +/** + * Dummy version for basic app flavor. + */ +public class WifiStateChangeService { + public static void start(Context context, @Nullable Intent intent) { + } + + public class WifiInfoThread extends Thread { + } +} diff --git a/app/src/basic/java/org/fdroid/fdroid/net/bluetooth/BluetoothClient.java b/app/src/basic/java/org/fdroid/fdroid/net/bluetooth/BluetoothClient.java new file mode 100644 index 000000000..bb095c56a --- /dev/null +++ b/app/src/basic/java/org/fdroid/fdroid/net/bluetooth/BluetoothClient.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2018 Senecto Limited + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +package org.fdroid.fdroid.net.bluetooth; + +/** + * Dummy version for basic app flavor. + */ + +public class BluetoothClient { + + public BluetoothClient(String ignored) { + } + + public BluetoothConnection openConnection() { + return null; + } +} diff --git a/app/src/basic/java/org/fdroid/fdroid/views/hiding/HidingManager.java b/app/src/basic/java/org/fdroid/fdroid/views/hiding/HidingManager.java new file mode 100644 index 000000000..6a574e0fb --- /dev/null +++ b/app/src/basic/java/org/fdroid/fdroid/views/hiding/HidingManager.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2018 Senecto Limited + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +package org.fdroid.fdroid.views.hiding; + +import android.content.Context; + +/** + * Dummy version for basic app flavor. + */ +public class HidingManager { + + public static boolean isHidden(Context context) { + return false; + } +} diff --git a/app/src/basic/java/org/fdroid/fdroid/views/main/MainViewController.java b/app/src/basic/java/org/fdroid/fdroid/views/main/MainViewController.java new file mode 100644 index 000000000..ba85cd1dc --- /dev/null +++ b/app/src/basic/java/org/fdroid/fdroid/views/main/MainViewController.java @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2018 Senecto Limited + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +package org.fdroid.fdroid.views.main; + +import android.support.annotation.Nullable; +import android.support.v4.app.Fragment; +import android.support.v7.app.AppCompatActivity; +import android.support.v7.widget.RecyclerView; +import android.widget.FrameLayout; +import org.fdroid.fdroid.R; +import org.fdroid.fdroid.views.fragments.PreferencesFragment; +import org.fdroid.fdroid.views.updates.UpdatesViewBinder; + +/** + * Decides which view on the main screen to attach to a given {@link FrameLayout}. This class + * doesn't know which view it will be rendering at the time it is constructed. Rather, at some + * point in the future the {@link MainViewAdapter} will have information about which view we + * are required to render, and will invoke the relevant "bind*()" method on this class. + */ +class MainViewController extends RecyclerView.ViewHolder { + + private final AppCompatActivity activity; + private final FrameLayout frame; + + @Nullable + private UpdatesViewBinder updatesView = null; + + MainViewController(AppCompatActivity activity, FrameLayout frame) { + super(frame); + this.activity = activity; + this.frame = frame; + } + + public void bindWhatsNewView() { + throw new IllegalStateException("unimplemented"); + } + + /** + * @see UpdatesViewBinder + */ + public void bindUpdates() { + if (updatesView == null) { + updatesView = new UpdatesViewBinder(activity, frame); + } + + updatesView.bind(); + } + + public void unbindUpdates() { + if (updatesView != null) { + updatesView.unbind(); + } + } + + public void bindCategoriesView() { + throw new IllegalStateException("unimplemented"); + } + + public void bindSwapView() { + throw new IllegalStateException("unimplemented"); + } + + /** + * Attaches a {@link PreferencesFragment} to the view. Everything else is managed by the + * fragment itself, so no further work needs to be done by this view binder. + *

+ * Note: It is tricky to attach a {@link Fragment} to a view from this view holder. This is due + * to the way in which the {@link RecyclerView} will reuse existing views and ask us to + * put a settings fragment in there at arbitrary times. Usually it wont be the same view we + * attached the fragment to last time, which causes weirdness. The solution is to use code from + * the com.lsjwzh.widget.recyclerviewpager.FragmentStatePagerAdapter which manages this. + * The code has been ported to {@link SettingsView}. + * + * @see SettingsView + */ + public void bindSettingsView() { + activity.getLayoutInflater().inflate(R.layout.main_tab_settings, frame, true); + } +} diff --git a/app/src/basic/java/org/fdroid/fdroid/views/swap/SwapWorkflowActivity.java b/app/src/basic/java/org/fdroid/fdroid/views/swap/SwapWorkflowActivity.java new file mode 100644 index 000000000..4e86467a5 --- /dev/null +++ b/app/src/basic/java/org/fdroid/fdroid/views/swap/SwapWorkflowActivity.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2018 Senecto Limited + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 3 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +package org.fdroid.fdroid.views.swap; + +/** + * Dummy version for basic app flavor. + */ +public class SwapWorkflowActivity { + public static final String EXTRA_PREVENT_FURTHER_SWAP_REQUESTS = "preventFurtherSwap"; + public static final String EXTRA_CONFIRM = "EXTRA_CONFIRM"; +} diff --git a/app/src/basic/res/menu/main_activity_screens.xml b/app/src/basic/res/menu/main_activity_screens.xml new file mode 100644 index 000000000..4785bd5c0 --- /dev/null +++ b/app/src/basic/res/menu/main_activity_screens.xml @@ -0,0 +1,14 @@ + +

+ + + \ No newline at end of file diff --git a/app/src/basic/res/xml/preferences.xml b/app/src/basic/res/xml/preferences.xml new file mode 100644 index 000000000..d1a123d4f --- /dev/null +++ b/app/src/basic/res/xml/preferences.xml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/full/AndroidManifest.xml b/app/src/full/AndroidManifest.xml new file mode 100644 index 000000000..f2ed455be --- /dev/null +++ b/app/src/full/AndroidManifest.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable-hdpi/circle.png b/app/src/full/res/drawable-hdpi/circle.png similarity index 100% rename from app/src/main/res/drawable-hdpi/circle.png rename to app/src/full/res/drawable-hdpi/circle.png diff --git a/app/src/main/res/drawable-hdpi/hotspot.png b/app/src/full/res/drawable-hdpi/hotspot.png similarity index 100% rename from app/src/main/res/drawable-hdpi/hotspot.png rename to app/src/full/res/drawable-hdpi/hotspot.png diff --git a/app/src/main/res/drawable-hdpi/ic_add_circle_outline_white.png b/app/src/full/res/drawable-hdpi/ic_add_circle_outline_white.png similarity index 100% rename from app/src/main/res/drawable-hdpi/ic_add_circle_outline_white.png rename to app/src/full/res/drawable-hdpi/ic_add_circle_outline_white.png diff --git a/app/src/main/res/drawable-hdpi/ic_arrow_forward_white.png b/app/src/full/res/drawable-hdpi/ic_arrow_forward_white.png similarity index 100% rename from app/src/main/res/drawable-hdpi/ic_arrow_forward_white.png rename to app/src/full/res/drawable-hdpi/ic_arrow_forward_white.png diff --git a/app/src/main/res/drawable-hdpi/ic_bluetooth_white.png b/app/src/full/res/drawable-hdpi/ic_bluetooth_white.png similarity index 100% rename from app/src/main/res/drawable-hdpi/ic_bluetooth_white.png rename to app/src/full/res/drawable-hdpi/ic_bluetooth_white.png diff --git a/app/src/main/res/drawable-hdpi/ic_check_circle_white.png b/app/src/full/res/drawable-hdpi/ic_check_circle_white.png similarity index 100% rename from app/src/main/res/drawable-hdpi/ic_check_circle_white.png rename to app/src/full/res/drawable-hdpi/ic_check_circle_white.png diff --git a/app/src/main/res/drawable-hdpi/ic_fdroid_grey.png b/app/src/full/res/drawable-hdpi/ic_fdroid_grey.png similarity index 100% rename from app/src/main/res/drawable-hdpi/ic_fdroid_grey.png rename to app/src/full/res/drawable-hdpi/ic_fdroid_grey.png diff --git a/app/src/main/res/drawable-hdpi/ic_network_wifi_white.png b/app/src/full/res/drawable-hdpi/ic_network_wifi_white.png similarity index 100% rename from app/src/main/res/drawable-hdpi/ic_network_wifi_white.png rename to app/src/full/res/drawable-hdpi/ic_network_wifi_white.png diff --git a/app/src/main/res/drawable-hdpi/ic_qr_grey.png b/app/src/full/res/drawable-hdpi/ic_qr_grey.png similarity index 100% rename from app/src/main/res/drawable-hdpi/ic_qr_grey.png rename to app/src/full/res/drawable-hdpi/ic_qr_grey.png diff --git a/app/src/main/res/drawable-hdpi/ic_swap.png b/app/src/full/res/drawable-hdpi/ic_swap.png similarity index 100% rename from app/src/main/res/drawable-hdpi/ic_swap.png rename to app/src/full/res/drawable-hdpi/ic_swap.png diff --git a/app/src/main/res/drawable-ldpi/circle.png b/app/src/full/res/drawable-ldpi/circle.png similarity index 100% rename from app/src/main/res/drawable-ldpi/circle.png rename to app/src/full/res/drawable-ldpi/circle.png diff --git a/app/src/main/res/drawable-ldpi/hotspot.png b/app/src/full/res/drawable-ldpi/hotspot.png similarity index 100% rename from app/src/main/res/drawable-ldpi/hotspot.png rename to app/src/full/res/drawable-ldpi/hotspot.png diff --git a/app/src/main/res/drawable-ldpi/ic_fdroid_grey.png b/app/src/full/res/drawable-ldpi/ic_fdroid_grey.png similarity index 100% rename from app/src/main/res/drawable-ldpi/ic_fdroid_grey.png rename to app/src/full/res/drawable-ldpi/ic_fdroid_grey.png diff --git a/app/src/main/res/drawable-ldpi/ic_qr_grey.png b/app/src/full/res/drawable-ldpi/ic_qr_grey.png similarity index 100% rename from app/src/main/res/drawable-ldpi/ic_qr_grey.png rename to app/src/full/res/drawable-ldpi/ic_qr_grey.png diff --git a/app/src/main/res/drawable-ldpi/ic_swap.png b/app/src/full/res/drawable-ldpi/ic_swap.png similarity index 100% rename from app/src/main/res/drawable-ldpi/ic_swap.png rename to app/src/full/res/drawable-ldpi/ic_swap.png diff --git a/app/src/main/res/drawable-mdpi/circle.png b/app/src/full/res/drawable-mdpi/circle.png similarity index 100% rename from app/src/main/res/drawable-mdpi/circle.png rename to app/src/full/res/drawable-mdpi/circle.png diff --git a/app/src/main/res/drawable-mdpi/hotspot.png b/app/src/full/res/drawable-mdpi/hotspot.png similarity index 100% rename from app/src/main/res/drawable-mdpi/hotspot.png rename to app/src/full/res/drawable-mdpi/hotspot.png diff --git a/app/src/main/res/drawable-mdpi/ic_add_circle_outline_white.png b/app/src/full/res/drawable-mdpi/ic_add_circle_outline_white.png similarity index 100% rename from app/src/main/res/drawable-mdpi/ic_add_circle_outline_white.png rename to app/src/full/res/drawable-mdpi/ic_add_circle_outline_white.png diff --git a/app/src/main/res/drawable-mdpi/ic_arrow_forward_white.png b/app/src/full/res/drawable-mdpi/ic_arrow_forward_white.png similarity index 100% rename from app/src/main/res/drawable-mdpi/ic_arrow_forward_white.png rename to app/src/full/res/drawable-mdpi/ic_arrow_forward_white.png diff --git a/app/src/main/res/drawable-mdpi/ic_bluetooth_white.png b/app/src/full/res/drawable-mdpi/ic_bluetooth_white.png similarity index 100% rename from app/src/main/res/drawable-mdpi/ic_bluetooth_white.png rename to app/src/full/res/drawable-mdpi/ic_bluetooth_white.png diff --git a/app/src/main/res/drawable-mdpi/ic_check_circle_white.png b/app/src/full/res/drawable-mdpi/ic_check_circle_white.png similarity index 100% rename from app/src/main/res/drawable-mdpi/ic_check_circle_white.png rename to app/src/full/res/drawable-mdpi/ic_check_circle_white.png diff --git a/app/src/main/res/drawable-mdpi/ic_fdroid_grey.png b/app/src/full/res/drawable-mdpi/ic_fdroid_grey.png similarity index 100% rename from app/src/main/res/drawable-mdpi/ic_fdroid_grey.png rename to app/src/full/res/drawable-mdpi/ic_fdroid_grey.png diff --git a/app/src/main/res/drawable-mdpi/ic_network_wifi_white.png b/app/src/full/res/drawable-mdpi/ic_network_wifi_white.png similarity index 100% rename from app/src/main/res/drawable-mdpi/ic_network_wifi_white.png rename to app/src/full/res/drawable-mdpi/ic_network_wifi_white.png diff --git a/app/src/main/res/drawable-mdpi/ic_qr_grey.png b/app/src/full/res/drawable-mdpi/ic_qr_grey.png similarity index 100% rename from app/src/main/res/drawable-mdpi/ic_qr_grey.png rename to app/src/full/res/drawable-mdpi/ic_qr_grey.png diff --git a/app/src/main/res/drawable-mdpi/ic_swap.png b/app/src/full/res/drawable-mdpi/ic_swap.png similarity index 100% rename from app/src/main/res/drawable-mdpi/ic_swap.png rename to app/src/full/res/drawable-mdpi/ic_swap.png diff --git a/app/src/main/res/drawable-xhdpi/circle.png b/app/src/full/res/drawable-xhdpi/circle.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/circle.png rename to app/src/full/res/drawable-xhdpi/circle.png diff --git a/app/src/main/res/drawable-xhdpi/ic_add_circle_outline_white.png b/app/src/full/res/drawable-xhdpi/ic_add_circle_outline_white.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/ic_add_circle_outline_white.png rename to app/src/full/res/drawable-xhdpi/ic_add_circle_outline_white.png diff --git a/app/src/main/res/drawable-xhdpi/ic_arrow_forward_white.png b/app/src/full/res/drawable-xhdpi/ic_arrow_forward_white.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/ic_arrow_forward_white.png rename to app/src/full/res/drawable-xhdpi/ic_arrow_forward_white.png diff --git a/app/src/main/res/drawable-xhdpi/ic_bluetooth_white.png b/app/src/full/res/drawable-xhdpi/ic_bluetooth_white.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/ic_bluetooth_white.png rename to app/src/full/res/drawable-xhdpi/ic_bluetooth_white.png diff --git a/app/src/main/res/drawable-xhdpi/ic_check_circle_white.png b/app/src/full/res/drawable-xhdpi/ic_check_circle_white.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/ic_check_circle_white.png rename to app/src/full/res/drawable-xhdpi/ic_check_circle_white.png diff --git a/app/src/main/res/drawable-xhdpi/ic_fdroid_grey.png b/app/src/full/res/drawable-xhdpi/ic_fdroid_grey.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/ic_fdroid_grey.png rename to app/src/full/res/drawable-xhdpi/ic_fdroid_grey.png diff --git a/app/src/main/res/drawable-xhdpi/ic_network_wifi_white.png b/app/src/full/res/drawable-xhdpi/ic_network_wifi_white.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/ic_network_wifi_white.png rename to app/src/full/res/drawable-xhdpi/ic_network_wifi_white.png diff --git a/app/src/main/res/drawable-xhdpi/ic_qr_grey.png b/app/src/full/res/drawable-xhdpi/ic_qr_grey.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/ic_qr_grey.png rename to app/src/full/res/drawable-xhdpi/ic_qr_grey.png diff --git a/app/src/main/res/drawable-xhdpi/ic_swap.png b/app/src/full/res/drawable-xhdpi/ic_swap.png similarity index 100% rename from app/src/main/res/drawable-xhdpi/ic_swap.png rename to app/src/full/res/drawable-xhdpi/ic_swap.png diff --git a/app/src/main/res/drawable-xxhdpi/circle.png b/app/src/full/res/drawable-xxhdpi/circle.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/circle.png rename to app/src/full/res/drawable-xxhdpi/circle.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_add_circle_outline_white.png b/app/src/full/res/drawable-xxhdpi/ic_add_circle_outline_white.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/ic_add_circle_outline_white.png rename to app/src/full/res/drawable-xxhdpi/ic_add_circle_outline_white.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_arrow_forward_white.png b/app/src/full/res/drawable-xxhdpi/ic_arrow_forward_white.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/ic_arrow_forward_white.png rename to app/src/full/res/drawable-xxhdpi/ic_arrow_forward_white.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_bluetooth_white.png b/app/src/full/res/drawable-xxhdpi/ic_bluetooth_white.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/ic_bluetooth_white.png rename to app/src/full/res/drawable-xxhdpi/ic_bluetooth_white.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_check_circle_white.png b/app/src/full/res/drawable-xxhdpi/ic_check_circle_white.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/ic_check_circle_white.png rename to app/src/full/res/drawable-xxhdpi/ic_check_circle_white.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_fdroid_grey.png b/app/src/full/res/drawable-xxhdpi/ic_fdroid_grey.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/ic_fdroid_grey.png rename to app/src/full/res/drawable-xxhdpi/ic_fdroid_grey.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_network_wifi_white.png b/app/src/full/res/drawable-xxhdpi/ic_network_wifi_white.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/ic_network_wifi_white.png rename to app/src/full/res/drawable-xxhdpi/ic_network_wifi_white.png diff --git a/app/src/main/res/drawable-xxhdpi/ic_qr_grey.png b/app/src/full/res/drawable-xxhdpi/ic_qr_grey.png similarity index 100% rename from app/src/main/res/drawable-xxhdpi/ic_qr_grey.png rename to app/src/full/res/drawable-xxhdpi/ic_qr_grey.png diff --git a/app/src/main/res/drawable-xxxhdpi/circle.png b/app/src/full/res/drawable-xxxhdpi/circle.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/circle.png rename to app/src/full/res/drawable-xxxhdpi/circle.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_add_circle_outline_white.png b/app/src/full/res/drawable-xxxhdpi/ic_add_circle_outline_white.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/ic_add_circle_outline_white.png rename to app/src/full/res/drawable-xxxhdpi/ic_add_circle_outline_white.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_arrow_forward_white.png b/app/src/full/res/drawable-xxxhdpi/ic_arrow_forward_white.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/ic_arrow_forward_white.png rename to app/src/full/res/drawable-xxxhdpi/ic_arrow_forward_white.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_bluetooth_white.png b/app/src/full/res/drawable-xxxhdpi/ic_bluetooth_white.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/ic_bluetooth_white.png rename to app/src/full/res/drawable-xxxhdpi/ic_bluetooth_white.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_check_circle_white.png b/app/src/full/res/drawable-xxxhdpi/ic_check_circle_white.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/ic_check_circle_white.png rename to app/src/full/res/drawable-xxxhdpi/ic_check_circle_white.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_fdroid_grey.png b/app/src/full/res/drawable-xxxhdpi/ic_fdroid_grey.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/ic_fdroid_grey.png rename to app/src/full/res/drawable-xxxhdpi/ic_fdroid_grey.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_network_wifi_white.png b/app/src/full/res/drawable-xxxhdpi/ic_network_wifi_white.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/ic_network_wifi_white.png rename to app/src/full/res/drawable-xxxhdpi/ic_network_wifi_white.png diff --git a/app/src/main/res/drawable-xxxhdpi/ic_qr_grey.png b/app/src/full/res/drawable-xxxhdpi/ic_qr_grey.png similarity index 100% rename from app/src/main/res/drawable-xxxhdpi/ic_qr_grey.png rename to app/src/full/res/drawable-xxxhdpi/ic_qr_grey.png diff --git a/app/src/main/res/drawable/nearby_splash.xml b/app/src/full/res/drawable/nearby_splash.xml similarity index 100% rename from app/src/main/res/drawable/nearby_splash.xml rename to app/src/full/res/drawable/nearby_splash.xml diff --git a/app/src/main/res/layout-v11/select_local_apps_list_item.xml b/app/src/full/res/layout-v11/select_local_apps_list_item.xml similarity index 100% rename from app/src/main/res/layout-v11/select_local_apps_list_item.xml rename to app/src/full/res/layout-v11/select_local_apps_list_item.xml diff --git a/app/src/main/res/layout-v17/select_local_apps_list_item.xml b/app/src/full/res/layout-v17/select_local_apps_list_item.xml similarity index 100% rename from app/src/main/res/layout-v17/select_local_apps_list_item.xml rename to app/src/full/res/layout-v17/select_local_apps_list_item.xml diff --git a/app/src/main/res/layout/activity_panic_settings.xml b/app/src/full/res/layout/activity_panic_settings.xml similarity index 100% rename from app/src/main/res/layout/activity_panic_settings.xml rename to app/src/full/res/layout/activity_panic_settings.xml diff --git a/app/src/main/res/layout/dialog_app_hiding.xml b/app/src/full/res/layout/dialog_app_hiding.xml similarity index 100% rename from app/src/main/res/layout/dialog_app_hiding.xml rename to app/src/full/res/layout/dialog_app_hiding.xml diff --git a/app/src/main/res/layout/main_tab_categories.xml b/app/src/full/res/layout/main_tab_categories.xml similarity index 100% rename from app/src/main/res/layout/main_tab_categories.xml rename to app/src/full/res/layout/main_tab_categories.xml diff --git a/app/src/main/res/layout/main_tab_swap.xml b/app/src/full/res/layout/main_tab_swap.xml similarity index 100% rename from app/src/main/res/layout/main_tab_swap.xml rename to app/src/full/res/layout/main_tab_swap.xml diff --git a/app/src/main/res/layout/main_tab_whats_new.xml b/app/src/full/res/layout/main_tab_whats_new.xml similarity index 100% rename from app/src/main/res/layout/main_tab_whats_new.xml rename to app/src/full/res/layout/main_tab_whats_new.xml diff --git a/app/src/main/res/layout/select_local_apps_list_item.xml b/app/src/full/res/layout/select_local_apps_list_item.xml similarity index 100% rename from app/src/main/res/layout/select_local_apps_list_item.xml rename to app/src/full/res/layout/select_local_apps_list_item.xml diff --git a/app/src/main/res/layout/swap_activity.xml b/app/src/full/res/layout/swap_activity.xml similarity index 100% rename from app/src/main/res/layout/swap_activity.xml rename to app/src/full/res/layout/swap_activity.xml diff --git a/app/src/main/res/layout/swap_app_list_item.xml b/app/src/full/res/layout/swap_app_list_item.xml similarity index 100% rename from app/src/main/res/layout/swap_app_list_item.xml rename to app/src/full/res/layout/swap_app_list_item.xml diff --git a/app/src/main/res/layout/swap_blank.xml b/app/src/full/res/layout/swap_blank.xml similarity index 100% rename from app/src/main/res/layout/swap_blank.xml rename to app/src/full/res/layout/swap_blank.xml diff --git a/app/src/main/res/layout/swap_confirm_receive.xml b/app/src/full/res/layout/swap_confirm_receive.xml similarity index 100% rename from app/src/main/res/layout/swap_confirm_receive.xml rename to app/src/full/res/layout/swap_confirm_receive.xml diff --git a/app/src/main/res/layout/swap_connecting.xml b/app/src/full/res/layout/swap_connecting.xml similarity index 100% rename from app/src/main/res/layout/swap_connecting.xml rename to app/src/full/res/layout/swap_connecting.xml diff --git a/app/src/main/res/layout/swap_initial_loading.xml b/app/src/full/res/layout/swap_initial_loading.xml similarity index 100% rename from app/src/main/res/layout/swap_initial_loading.xml rename to app/src/full/res/layout/swap_initial_loading.xml diff --git a/app/src/main/res/layout/swap_join_wifi.xml b/app/src/full/res/layout/swap_join_wifi.xml similarity index 100% rename from app/src/main/res/layout/swap_join_wifi.xml rename to app/src/full/res/layout/swap_join_wifi.xml diff --git a/app/src/main/res/layout/swap_nfc.xml b/app/src/full/res/layout/swap_nfc.xml similarity index 100% rename from app/src/main/res/layout/swap_nfc.xml rename to app/src/full/res/layout/swap_nfc.xml diff --git a/app/src/main/res/layout/swap_peer_list_item.xml b/app/src/full/res/layout/swap_peer_list_item.xml similarity index 100% rename from app/src/main/res/layout/swap_peer_list_item.xml rename to app/src/full/res/layout/swap_peer_list_item.xml diff --git a/app/src/main/res/layout/swap_select_apps.xml b/app/src/full/res/layout/swap_select_apps.xml similarity index 100% rename from app/src/main/res/layout/swap_select_apps.xml rename to app/src/full/res/layout/swap_select_apps.xml diff --git a/app/src/main/res/layout/swap_send_fdroid.xml b/app/src/full/res/layout/swap_send_fdroid.xml similarity index 100% rename from app/src/main/res/layout/swap_send_fdroid.xml rename to app/src/full/res/layout/swap_send_fdroid.xml diff --git a/app/src/main/res/layout/swap_success.xml b/app/src/full/res/layout/swap_success.xml similarity index 100% rename from app/src/main/res/layout/swap_success.xml rename to app/src/full/res/layout/swap_success.xml diff --git a/app/src/main/res/layout/swap_wifi_qr.xml b/app/src/full/res/layout/swap_wifi_qr.xml similarity index 100% rename from app/src/main/res/layout/swap_wifi_qr.xml rename to app/src/full/res/layout/swap_wifi_qr.xml diff --git a/app/src/main/res/menu/swap_next.xml b/app/src/full/res/menu/swap_next.xml similarity index 100% rename from app/src/main/res/menu/swap_next.xml rename to app/src/full/res/menu/swap_next.xml diff --git a/app/src/main/res/menu/swap_next_search.xml b/app/src/full/res/menu/swap_next_search.xml similarity index 100% rename from app/src/main/res/menu/swap_next_search.xml rename to app/src/full/res/menu/swap_next_search.xml diff --git a/app/src/main/res/menu/swap_search.xml b/app/src/full/res/menu/swap_search.xml similarity index 100% rename from app/src/main/res/menu/swap_search.xml rename to app/src/full/res/menu/swap_search.xml diff --git a/app/src/main/res/menu/swap_skip.xml b/app/src/full/res/menu/swap_skip.xml similarity index 100% rename from app/src/main/res/menu/swap_skip.xml rename to app/src/full/res/menu/swap_skip.xml diff --git a/app/src/main/res/mipmap-hdpi/ic_calculator_launcher.png b/app/src/full/res/mipmap-hdpi/ic_calculator_launcher.png similarity index 100% rename from app/src/main/res/mipmap-hdpi/ic_calculator_launcher.png rename to app/src/full/res/mipmap-hdpi/ic_calculator_launcher.png diff --git a/app/src/main/res/mipmap-mdpi/ic_calculator_launcher.png b/app/src/full/res/mipmap-mdpi/ic_calculator_launcher.png similarity index 100% rename from app/src/main/res/mipmap-mdpi/ic_calculator_launcher.png rename to app/src/full/res/mipmap-mdpi/ic_calculator_launcher.png diff --git a/app/src/main/res/mipmap-xhdpi/ic_calculator_launcher.png b/app/src/full/res/mipmap-xhdpi/ic_calculator_launcher.png similarity index 100% rename from app/src/main/res/mipmap-xhdpi/ic_calculator_launcher.png rename to app/src/full/res/mipmap-xhdpi/ic_calculator_launcher.png diff --git a/app/src/main/res/mipmap-xxhdpi/ic_calculator_launcher.png b/app/src/full/res/mipmap-xxhdpi/ic_calculator_launcher.png similarity index 100% rename from app/src/main/res/mipmap-xxhdpi/ic_calculator_launcher.png rename to app/src/full/res/mipmap-xxhdpi/ic_calculator_launcher.png diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_calculator_launcher.png b/app/src/full/res/mipmap-xxxhdpi/ic_calculator_launcher.png similarity index 100% rename from app/src/main/res/mipmap-xxxhdpi/ic_calculator_launcher.png rename to app/src/full/res/mipmap-xxxhdpi/ic_calculator_launcher.png diff --git a/app/src/full/res/values-v17/styles.xml b/app/src/full/res/values-v17/styles.xml new file mode 100644 index 000000000..e2bb070aa --- /dev/null +++ b/app/src/full/res/values-v17/styles.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + diff --git a/app/src/full/res/values-v21/styles.xml b/app/src/full/res/values-v21/styles.xml new file mode 100644 index 000000000..4f1c6edae --- /dev/null +++ b/app/src/full/res/values-v21/styles.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/app/src/full/res/values/attrs.xml b/app/src/full/res/values/attrs.xml new file mode 100644 index 000000000..2e1d9cd0b --- /dev/null +++ b/app/src/full/res/values/attrs.xml @@ -0,0 +1,6 @@ + + + + 1337 + + diff --git a/app/src/full/res/values/colors.xml b/app/src/full/res/values/colors.xml new file mode 100644 index 000000000..fe1fee70e --- /dev/null +++ b/app/src/full/res/values/colors.xml @@ -0,0 +1,13 @@ + + + + #ff7900 + #27aae1 + #1c6bbc + #ff21488c + #00b9e6 + #bbbbbb + #4a4a4a + #bbbbbb + + diff --git a/app/src/full/res/values/styles.xml b/app/src/full/res/values/styles.xml new file mode 100644 index 000000000..ea34ac0f7 --- /dev/null +++ b/app/src/full/res/values/styles.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index dea7e3b8b..457f02c1e 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,4 +1,26 @@ + - - - - - - - - - - - + android:supportsRtl="true"> - - - - - - - - - @@ -279,23 +266,16 @@ android:name=".DeleteCacheService" android:permission="android.permission.BIND_JOB_SERVICE" android:exported="false"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/java/org/fdroid/fdroid/views/main/MainActivity.java b/app/src/main/java/org/fdroid/fdroid/views/main/MainActivity.java index 185a1e364..543a9a1b6 100644 --- a/app/src/main/java/org/fdroid/fdroid/views/main/MainActivity.java +++ b/app/src/main/java/org/fdroid/fdroid/views/main/MainActivity.java @@ -44,6 +44,7 @@ import com.ashokvarma.bottomnavigation.TextBadgeItem; import org.fdroid.fdroid.AppDetails2; import org.fdroid.fdroid.AppUpdateStatusManager; import org.fdroid.fdroid.AppUpdateStatusManager.AppUpdateStatus; +import org.fdroid.fdroid.BuildConfig; import org.fdroid.fdroid.FDroidApp; import org.fdroid.fdroid.NfcHelper; import org.fdroid.fdroid.Preferences; @@ -114,14 +115,17 @@ public class MainActivity extends AppCompatActivity implements BottomNavigationB updatesBadge = new TextBadgeItem().hide(false); bottomNavigation = (BottomNavigationBar) findViewById(R.id.bottom_navigation); + if (BuildConfig.FLAVOR.startsWith("full")) { + bottomNavigation + .addItem(new BottomNavigationItem(R.drawable.ic_latest, R.string.main_menu__latest_apps)) + .addItem(new BottomNavigationItem(R.drawable.ic_categories, R.string.main_menu__categories)) + .addItem(new BottomNavigationItem(R.drawable.ic_nearby, R.string.main_menu__swap_nearby)); + } bottomNavigation.setTabSelectedListener(this) .setBarBackgroundColor(getBottomNavigationBackgroundColorResId()) .setInActiveColor(R.color.bottom_nav_items) .setActiveColor(android.R.color.white) .setMode(BottomNavigationBar.MODE_FIXED) - .addItem(new BottomNavigationItem(R.drawable.ic_latest, R.string.main_menu__latest_apps)) - .addItem(new BottomNavigationItem(R.drawable.ic_categories, R.string.main_menu__categories)) - .addItem(new BottomNavigationItem(R.drawable.ic_nearby, R.string.main_menu__swap_nearby)) .addItem(new BottomNavigationItem(R.drawable.ic_updates, R.string.updates).setBadgeItem(updatesBadge)) .addItem(new BottomNavigationItem(R.drawable.ic_settings, R.string.menu_settings)) .initialise(); diff --git a/app/src/main/res/values-v17/styles.xml b/app/src/main/res/values-v17/styles.xml index 79d23f125..5437f3bff 100644 --- a/app/src/main/res/values-v17/styles.xml +++ b/app/src/main/res/values-v17/styles.xml @@ -13,29 +13,4 @@ - - - - - - - - - diff --git a/app/src/main/res/values-v21/styles.xml b/app/src/main/res/values-v21/styles.xml index c3841ddae..19fabb1d1 100644 --- a/app/src/main/res/values-v21/styles.xml +++ b/app/src/main/res/values-v21/styles.xml @@ -18,10 +18,6 @@ @transition/shared_elements - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -