mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-10-05 10:37:08 -04:00
get "basic" flavor building and running
This commit is contained in:
1 parent
ea80704598
commit
c87f6a64f9
105 files changed
+795
-261
No files matched your search
@@ -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'
|
||||
}
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@
|
||||
</issue>
|
||||
|
||||
<issue id="ProtectedPermissions" severity="error">
|
||||
<ignore path="src/main/AndroidManifest.xml"/>
|
||||
<ignore path="src/full/AndroidManifest.xml"/>
|
||||
</issue>
|
||||
|
||||
<!-- these should be fixed, but it'll be a chunk of work -->
|
||||
|
||||
@@ -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) {
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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.
|
||||
* <p>
|
||||
* 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);
|
||||
}
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:title="@string/updates"
|
||||
android:icon="@drawable/ic_updates"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:id="@+id/updates" />
|
||||
<item
|
||||
android:title="@string/menu_settings"
|
||||
android:icon="@drawable/ic_settings"
|
||||
app:showAsAction="ifRoom|withText"
|
||||
android:id="@+id/settings" />
|
||||
</menu>
|
||||
@@ -0,0 +1,163 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.preference.PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<android.support.v7.preference.PreferenceScreen android:title="@string/about_title">
|
||||
<intent
|
||||
android:action="android.intent.action.MAIN"
|
||||
android:targetPackage="@string/applicationId"
|
||||
android:targetClass="org.fdroid.fdroid.AboutActivity"/>
|
||||
</android.support.v7.preference.PreferenceScreen>
|
||||
|
||||
<android.support.v7.preference.PreferenceCategory android:title="@string/preference_category__my_apps">
|
||||
<android.support.v7.preference.PreferenceScreen android:title="@string/preference_manage_installed_apps">
|
||||
<intent
|
||||
android:action="android.intent.action.MAIN"
|
||||
android:targetPackage="@string/applicationId"
|
||||
android:targetClass="org.fdroid.fdroid.views.installed.InstalledAppsActivity"/>
|
||||
</android.support.v7.preference.PreferenceScreen>
|
||||
<android.support.v7.preference.PreferenceScreen
|
||||
android:title="@string/menu_manage"
|
||||
android:summary="@string/repositories_summary">
|
||||
<intent
|
||||
android:action="android.intent.action.MAIN"
|
||||
android:targetPackage="@string/applicationId"
|
||||
android:targetClass="org.fdroid.fdroid.views.ManageReposActivity"/>
|
||||
</android.support.v7.preference.PreferenceScreen>
|
||||
</android.support.v7.preference.PreferenceCategory>
|
||||
|
||||
<android.support.v7.preference.PreferenceCategory android:title="@string/updates">
|
||||
<org.fdroid.fdroid.views.LiveSeekBarPreference
|
||||
android:key="overWifi"
|
||||
android:title="@string/over_wifi"
|
||||
android:layout="@layout/preference_seekbar"/>
|
||||
<org.fdroid.fdroid.views.LiveSeekBarPreference
|
||||
android:key="overData"
|
||||
android:title="@string/over_data"
|
||||
android:layout="@layout/preference_seekbar"/>
|
||||
<SwitchPreference
|
||||
android:title="@string/update_auto_download"
|
||||
android:summary="@string/update_auto_download_summary"
|
||||
android:defaultValue="false"
|
||||
android:key="updateAutoDownload"/>
|
||||
<org.fdroid.fdroid.views.LiveSeekBarPreference
|
||||
android:key="updateIntervalSeekBarPosition"
|
||||
android:title="@string/update_interval"
|
||||
android:layout="@layout/preference_seekbar"/>
|
||||
<SwitchPreference
|
||||
android:title="@string/notify"
|
||||
android:defaultValue="true"
|
||||
android:key="updateNotify"/>
|
||||
</android.support.v7.preference.PreferenceCategory>
|
||||
|
||||
<android.support.v7.preference.PreferenceCategory android:title="@string/display"
|
||||
android:key="pref_category_display">
|
||||
<ListPreference
|
||||
android:title="@string/pref_language"
|
||||
android:key="language"/>
|
||||
<ListPreference
|
||||
android:title="@string/theme"
|
||||
android:key="theme"
|
||||
android:defaultValue="light"
|
||||
android:entries="@array/themeNames"
|
||||
android:entryValues="@array/themeValues"/>
|
||||
</android.support.v7.preference.PreferenceCategory>
|
||||
|
||||
<android.support.v7.preference.PreferenceCategory android:title="@string/appcompatibility">
|
||||
<SwitchPreference
|
||||
android:title="@string/show_incompat_versions"
|
||||
android:defaultValue="false"
|
||||
android:key="incompatibleVersions"/>
|
||||
<SwitchPreference
|
||||
android:title="@string/show_root_apps"
|
||||
android:defaultValue="true"
|
||||
android:key="rooted"/>
|
||||
<SwitchPreference
|
||||
android:title="@string/show_anti_feature_apps"
|
||||
android:defaultValue="false"
|
||||
android:key="showAntiFeatureApps"/>
|
||||
<SwitchPreference
|
||||
android:title="@string/force_touch_apps"
|
||||
android:defaultValue="false"
|
||||
android:key="ignoreTouchscreen"/>
|
||||
</android.support.v7.preference.PreferenceCategory>
|
||||
|
||||
<android.support.v7.preference.PreferenceCategory android:title="@string/proxy">
|
||||
<SwitchPreference
|
||||
android:key="useTor"
|
||||
android:summary="@string/useTorSummary"
|
||||
android:title="@string/useTor"/>
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="enableProxy"
|
||||
android:title="@string/enable_proxy_title"
|
||||
android:summary="@string/enable_proxy_summary"/>
|
||||
<EditTextPreference
|
||||
android:key="proxyHost"
|
||||
android:title="@string/proxy_host"
|
||||
android:summary="@string/proxy_host_summary"
|
||||
android:dependency="enableProxy"/>
|
||||
<EditTextPreference
|
||||
android:key="proxyPort"
|
||||
android:title="@string/proxy_port"
|
||||
android:summary="@string/proxy_port_summary"
|
||||
android:dependency="enableProxy"/>
|
||||
</android.support.v7.preference.PreferenceCategory>
|
||||
|
||||
<android.support.v7.preference.PreferenceCategory
|
||||
android:key="pref_category_privacy"
|
||||
android:title="@string/privacy">
|
||||
|
||||
<SwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="preventScreenshots"
|
||||
android:summary="@string/preventScreenshots_summary"
|
||||
android:title="@string/preventScreenshots_title"/>
|
||||
|
||||
</android.support.v7.preference.PreferenceCategory>
|
||||
|
||||
<android.support.v7.preference.PreferenceCategory
|
||||
android:title="@string/other"
|
||||
android:key="pref_category_other">
|
||||
<ListPreference
|
||||
android:title="@string/cache_downloaded"
|
||||
android:key="keepCacheFor"
|
||||
android:defaultValue="86400000"
|
||||
android:entries="@array/keepCacheNames"
|
||||
android:entryValues="@array/keepCacheValues"/>
|
||||
<SwitchPreference
|
||||
android:title="@string/expert"
|
||||
android:defaultValue="false"
|
||||
android:key="expert"/>
|
||||
<CheckBoxPreference
|
||||
android:key="unstableUpdates"
|
||||
android:title="@string/unstable_updates"
|
||||
android:summary="@string/unstable_updates_summary"
|
||||
android:defaultValue="false"
|
||||
android:dependency="expert"/>
|
||||
<CheckBoxPreference
|
||||
android:key="keepInstallHistory"
|
||||
android:title="@string/keep_install_history"
|
||||
android:summary="@string/keep_install_history_summary"
|
||||
android:defaultValue="false"
|
||||
android:dependency="expert"/>
|
||||
<CheckBoxPreference
|
||||
android:key="forceOldIndex"
|
||||
android:title="@string/force_old_index"
|
||||
android:summary="@string/force_old_index_summary"
|
||||
android:defaultValue="false"
|
||||
android:dependency="expert"/>
|
||||
<CheckBoxPreference
|
||||
android:title="@string/system_installer"
|
||||
android:defaultValue="false"
|
||||
android:key="privilegedInstaller"
|
||||
android:persistent="false"
|
||||
android:dependency="expert"/>
|
||||
<Preference
|
||||
android:title="@string/uninstall_system"
|
||||
android:summary="@string/uninstall_system_summary"
|
||||
android:key="uninstallPrivilegedApp"
|
||||
android:dependency="expert"/>
|
||||
</android.support.v7.preference.PreferenceCategory>
|
||||
|
||||
</android.support.v7.preference.PreferenceScreen>
|
||||
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2010-2012 Ciaran Gultnieks
|
||||
* Copyright (C) 2013-2017 Peter Serwylo
|
||||
* Copyright (C) 2014-2015 Daniel Martí
|
||||
* Copyright (C) 2014-2018 Hans-Christoph Steiner
|
||||
* Copyright (C) 2016 Dominik Schürmann
|
||||
* Copyright (C) 2018 Torsten Grote
|
||||
* 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.
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.fdroid.fdroid"
|
||||
android:installLocation="auto">
|
||||
|
||||
<uses-feature android:name="android.hardware.nfc" android:required="false"/>
|
||||
<uses-feature android:name="android.hardware.bluetooth" android:required="false"/>
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
|
||||
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
|
||||
<uses-permission android:name="android.permission.BLUETOOTH"/>
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
|
||||
<uses-permission android:name="android.permission.NFC"/>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
|
||||
<!-- Indicate that F-Droid may request root access (introduced by Koush's Superuser app)
|
||||
This permission is deprecated, but necessary for some old superuser
|
||||
apps to actually grant superuser access to F-Droid. -->
|
||||
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
|
||||
|
||||
<application>
|
||||
|
||||
<activity
|
||||
android:label="@string/swap"
|
||||
android:name=".views.swap.SwapWorkflowActivity"
|
||||
android:parentActivityName=".views.main.MainActivity"
|
||||
android:theme="@style/SwapTheme.Wizard"
|
||||
android:screenOrientation="portrait"
|
||||
android:configChanges="orientation|keyboardHidden">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".views.main.MainActivity"/>
|
||||
</activity>
|
||||
|
||||
<receiver android:name=".receiver.WifiStateChangeReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.net.wifi.STATE_CHANGE"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".receiver.DeviceStorageReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.DEVICE_STORAGE_LOW"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<service
|
||||
android:name=".net.WifiStateChangeService"
|
||||
android:exported="false"/>
|
||||
<service android:name=".localrepo.SwapService"/>
|
||||
|
||||
<service
|
||||
android:name=".localrepo.CacheSwapAppsService"
|
||||
android:exported="false"/>
|
||||
|
||||
<activity
|
||||
android:name=".views.panic.PanicPreferencesActivity"
|
||||
android:label="@string/panic_settings"
|
||||
android:parentActivityName=".views.main.MainActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".views.main.MainActivity"/>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="info.guardianproject.panic.action.CONNECT"/>
|
||||
<action android:name="info.guardianproject.panic.action.DISCONNECT"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".views.panic.PanicResponderActivity"
|
||||
android:noHistory="true"
|
||||
android:theme="@android:style/Theme.NoDisplay">
|
||||
|
||||
<!-- this can never have launchMode singleTask or singleInstance! -->
|
||||
<intent-filter>
|
||||
<action android:name="info.guardianproject.panic.action.TRIGGER"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".views.panic.ExitActivity"
|
||||
android:theme="@android:style/Theme.NoDisplay"/>
|
||||
<activity
|
||||
android:name=".views.hiding.CalculatorActivity"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/ic_calculator_launcher"
|
||||
android:label="@string/hiding_calculator"
|
||||
android:theme="@style/AppThemeLight">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,29 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="SwapTheme.AppList.SwapSuccess" parent="SwapTheme.AppList.SwapSuccessBase">
|
||||
<item name="android:textAlignment">center</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:fontFamily">sans-serif-light</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.AppList.SwapSuccessDetails" parent="SwapTheme.AppList.SwapSuccessDetailsBase">
|
||||
<item name="android:textAlignment">center</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.StartSwap.MainText" parent="SwapTheme.StartSwap.MainTextBase">
|
||||
<item name="android:textAlignment">center</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard.Text" parent="SwapTheme.Wizard.TextBase">
|
||||
<item name="android:textAlignment">center</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard.MainText" parent="SwapTheme.Wizard.MainTextBase">
|
||||
<item name="android:fontFamily">sans-serif-light</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="SwapTheme.Wizard" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="android:colorButtonNormal">#04b9e6</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources>
|
||||
|
||||
<integer name="unhidePin">1337</integer>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<color name="swap_incompatible">#ff7900</color>
|
||||
<color name="swap_light_blue">#27aae1</color>
|
||||
<color name="swap_blue">#1c6bbc</color>
|
||||
<color name="swap_deny">#ff21488c</color>
|
||||
<color name="swap_bright_blue">#00b9e6</color>
|
||||
<color name="swap_light_text">#bbbbbb</color>
|
||||
<color name="swap_grey_icon">#4a4a4a</color>
|
||||
<color name="swap_light_grey_icon">#bbbbbb</color>
|
||||
|
||||
</resources>
|
||||
@@ -0,0 +1,134 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="SwapTheme.Wizard" parent="Theme.AppCompat.Light.NoActionBar">
|
||||
<item name="colorButtonNormal">@color/swap_bright_blue</item>
|
||||
<item name="actionButtonStyle">@style/SwapTheme.Wizard.ActionButton</item>
|
||||
<item name="actionBarStyle">@style/Widget.AppCompat.ActionBar.Solid</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.StartSwap" parent="AppThemeLight">
|
||||
<item name="android:background">@android:color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.StartSwap.Text" parent="@style/SwapTheme.StartSwap">
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.BluetoothDeviceList" parent="@style/SwapTheme.Wizard">
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.AppList" parent="AppThemeLight">
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.AppList.ListItem" parent="AppThemeLight">
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.AppList.SwapSuccessBase">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:textSize">25.7sp</item> <!-- 46px * 96dpi / 160dpi -->
|
||||
<item name="android:paddingTop">28dp</item> <!-- 50px * 96dpi / 160dpi -->
|
||||
<item name="android:paddingBottom">20.1dp</item> <!-- 36px * 96dpi / 160dpi -->
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.AppList.SwapSuccess" parent="SwapTheme.AppList.SwapSuccessBase"/>
|
||||
|
||||
<style name="SwapTheme.AppList.SwapSuccessDetailsBase">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:textSize">20.1sp</item> <!-- 36px * 96dpi / 160dpi -->
|
||||
<item name="android:paddingTop">20.1dp</item> <!-- 36px * 96dpi / 160dpi -->
|
||||
<item name="android:paddingBottom">20.1dp</item> <!-- 36px * 96dpi / 160dpi -->
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.AppList.SwapSuccessDetails" parent="SwapTheme.AppList.SwapSuccessDetailsBase"/>
|
||||
|
||||
<style name="SwapTheme.StartSwap.MainTextBase">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:textSize">20.1sp</item> <!-- 36px * 96dpi / 160dpi -->
|
||||
<item name="android:paddingLeft">28dp</item> <!-- 50px * 96dpi / 160dpi -->
|
||||
<item name="android:paddingRight">28dp</item> <!-- 50px * 96dpi / 160dpi -->
|
||||
<item name="android:paddingTop">28dp</item> <!-- 50px * 96dpi / 160dpi -->
|
||||
<item name="android:paddingBottom">16.8dp</item> <!-- 30px * 96dpi / 160dpi -->
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.StartSwap.MainText" parent="SwapTheme.StartSwap.MainTextBase">
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard.TextBase">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:textColor">#fff</item>
|
||||
<item name="android:textColorPrimary">#fff</item>
|
||||
<item name="android:textColorSecondary">#fff</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard.Text" parent="SwapTheme.Wizard.TextBase"/>
|
||||
|
||||
<style name="SwapTheme.Wizard.Text.Toolbar" parent="SwapTheme.Wizard.Text">
|
||||
<item name="android:textSize">22sp</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard.ActionButton" parent="Widget.AppCompat.ActionButton">
|
||||
<item name="android:textAppearance">@style/SwapTheme.Wizard.Text</item>
|
||||
<item name="android:paddingLeft">10dp</item>
|
||||
<item name="android:paddingRight">10dp</item>
|
||||
<item name="android:paddingTop">5dp</item>
|
||||
<item name="android:paddingBottom">5dp</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard.MainTextBase" parent="@style/SwapTheme.Wizard.Text">
|
||||
<item name="android:paddingLeft">40dp</item>
|
||||
<item name="android:paddingRight">40dp</item>
|
||||
<item name="android:paddingTop">10dp</item>
|
||||
<item name="android:paddingBottom">10dp</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard.MainText" parent="SwapTheme.Wizard.MainTextBase"/>
|
||||
|
||||
<style name="SwapTheme.Wizard.QRScanWarningText" parent="@style/SwapTheme.Wizard.MainTextBase">
|
||||
<item name="android:paddingLeft">40dp</item>
|
||||
<item name="android:paddingRight">40dp</item>
|
||||
<item name="android:paddingTop">0dp</item>
|
||||
<item name="android:paddingBottom">5dp</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard.LocalIpAddress" parent="@style/SwapTheme.Wizard.Text">
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:paddingLeft">40dp</item>
|
||||
<item name="android:paddingRight">40dp</item>
|
||||
<item name="android:paddingBottom">15dp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard.WifiSSID" parent="@style/SwapTheme.Wizard.Text">
|
||||
<item name="android:textSize">26sp</item> <!-- 46px * 96dpi / 160dpi -->
|
||||
<item name="android:paddingLeft">40dp</item>
|
||||
<item name="android:paddingRight">40dp</item>
|
||||
<item name="android:paddingTop">20dp</item>
|
||||
<item name="android:paddingBottom">5dp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
</style>
|
||||
|
||||
<!--
|
||||
Buttons down the bottom of the screen, which prompt the user for further
|
||||
info, or to change the process somehow (e.g. Use Bluetooth instead of Wifi).
|
||||
-->
|
||||
<style name="SwapTheme.Wizard.OptionButton" parent="Widget.AppCompat.Button">
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_margin">0dp</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard.ReceiveSwap" parent="SwapTheme.Wizard">
|
||||
</style>
|
||||
|
||||
<!--
|
||||
Buttons used to ask the user to confirm they want to receive a swap repo from someone
|
||||
-->
|
||||
|
||||
<style name="SwapTheme.Wizard.ReceiveSwap.MainText" parent="SwapTheme.Wizard.MainText">
|
||||
<item name="android:textSize">33.6sp</item> <!-- 60 * 96dpi / 160dpi -->
|
||||
<item name="android:textStyle">italic</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
@@ -1,4 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2010-2012 Ciaran Gultnieks
|
||||
* Copyright (C) 2013-2017 Peter Serwylo
|
||||
* Copyright (C) 2014-2015 Daniel Martí
|
||||
* Copyright (C) 2014-2018 Hans-Christoph Steiner
|
||||
* Copyright (C) 2016 Dominik Schürmann
|
||||
* Copyright (C) 2018 Torsten Grote
|
||||
*
|
||||
* 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.
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="org.fdroid.fdroid"
|
||||
@@ -27,32 +49,15 @@
|
||||
<uses-feature
|
||||
android:name="android.hardware.touchscreen"
|
||||
android:required="false"/>
|
||||
<uses-feature
|
||||
android:name="android.hardware.nfc"
|
||||
android:required="false"/>
|
||||
<uses-feature
|
||||
android:name="android.hardware.bluetooth"
|
||||
android:required="false"/>
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
|
||||
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"/>
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
|
||||
<uses-permission android:name="android.permission.BLUETOOTH"/>
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
|
||||
<uses-permission android:name="android.permission.NFC"/>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
|
||||
<!-- Indicate that F-Droid may request root access (introduced by Koush's Superuser app)
|
||||
This permission is deprecated, but necessary for some old superuser
|
||||
apps to actually grant superuser access to F-Droid. -->
|
||||
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
|
||||
|
||||
<application
|
||||
android:name=".FDroidApp"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
@@ -61,8 +66,7 @@
|
||||
android:allowBackup="true"
|
||||
android:fullBackupContent="true"
|
||||
android:theme="@style/AppThemeLight"
|
||||
android:supportsRtl="true"
|
||||
>
|
||||
android:supportsRtl="true">
|
||||
|
||||
<provider
|
||||
android:authorities="${applicationId}.data.AppProvider"
|
||||
@@ -185,17 +189,6 @@
|
||||
android:launchMode="singleInstance"
|
||||
android:excludeFromRecents="true"
|
||||
android:finishOnTaskLaunch="true"/>
|
||||
<activity
|
||||
android:label="@string/swap"
|
||||
android:name=".views.swap.SwapWorkflowActivity"
|
||||
android:parentActivityName=".views.main.MainActivity"
|
||||
android:theme="@style/SwapTheme.Wizard"
|
||||
android:screenOrientation="portrait"
|
||||
android:configChanges="orientation|keyboardHidden">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".views.main.MainActivity"/>
|
||||
</activity>
|
||||
<activity android:name=".views.ScreenShotsActivity"/>
|
||||
<!-- Note: AppThemeTransparent, this activity shows dialogs only -->
|
||||
<activity
|
||||
@@ -236,12 +229,6 @@
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".receiver.WifiStateChangeReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.net.wifi.STATE_CHANGE"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<receiver android:name=".NotificationBroadcastReceiver" android:exported="false">
|
||||
<!-- Doesn't require an intent-filter because it is explicitly invoked via Intent.setClass() -->
|
||||
</receiver>
|
||||
@@ -279,23 +266,16 @@
|
||||
android:name=".DeleteCacheService"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"
|
||||
android:exported="false"/>
|
||||
<service
|
||||
android:name=".net.WifiStateChangeService"
|
||||
android:exported="false"/>
|
||||
<service
|
||||
android:name=".net.ConnectivityMonitorService"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"
|
||||
android:exported="false"/>
|
||||
<service android:name=".localrepo.SwapService"/>
|
||||
<service
|
||||
android:name=".installer.InstallManagerService"
|
||||
android:exported="false"/>
|
||||
<service
|
||||
android:name=".installer.InstallHistoryService"
|
||||
android:exported="false"/>
|
||||
<service
|
||||
android:name=".localrepo.CacheSwapAppsService"
|
||||
android:exported="false"/>
|
||||
<service
|
||||
android:name=".data.InstalledAppProviderService"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE"
|
||||
@@ -574,49 +554,6 @@
|
||||
<activity android:name=".AboutActivity" android:theme="@style/Theme.AppCompat.Light.Dialog"/>
|
||||
<activity android:name=".installer.FileInstallerActivity" android:theme="@style/AppThemeTransparent"/>
|
||||
|
||||
<activity
|
||||
android:name=".views.panic.PanicPreferencesActivity"
|
||||
android:label="@string/panic_settings"
|
||||
android:parentActivityName=".views.main.MainActivity">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value=".views.main.MainActivity"/>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="info.guardianproject.panic.action.CONNECT"/>
|
||||
<action android:name="info.guardianproject.panic.action.DISCONNECT"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".views.panic.PanicResponderActivity"
|
||||
android:noHistory="true"
|
||||
android:theme="@android:style/Theme.NoDisplay">
|
||||
|
||||
<!-- this can never have launchMode singleTask or singleInstance! -->
|
||||
<intent-filter>
|
||||
<action android:name="info.guardianproject.panic.action.TRIGGER"/>
|
||||
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".views.panic.ExitActivity"
|
||||
android:theme="@android:style/Theme.NoDisplay"/>
|
||||
<activity
|
||||
android:name=".views.hiding.CalculatorActivity"
|
||||
android:enabled="false"
|
||||
android:icon="@mipmap/ic_calculator_launcher"
|
||||
android:label="@string/hiding_calculator"
|
||||
android:theme="@style/AppThemeLight">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
@@ -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();
|
||||
|
||||
@@ -13,29 +13,4 @@
|
||||
|
||||
<style name="BodyText" parent="BodyTextV17"/>
|
||||
|
||||
<style name="SwapTheme.AppList.SwapSuccess" parent="SwapTheme.AppList.SwapSuccessBase">
|
||||
<item name="android:textAlignment">center</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:fontFamily">sans-serif-light</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.AppList.SwapSuccessDetails" parent="SwapTheme.AppList.SwapSuccessDetailsBase">
|
||||
<item name="android:textAlignment">center</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.StartSwap.MainText" parent="SwapTheme.StartSwap.MainTextBase">
|
||||
<item name="android:textAlignment">center</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard.Text" parent="SwapTheme.Wizard.TextBase">
|
||||
<item name="android:textAlignment">center</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard.MainText" parent="SwapTheme.Wizard.MainTextBase">
|
||||
<item name="android:fontFamily">sans-serif-light</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
Loaded 100 of 105 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user