Merge branch 'material-design' into 'master'
Material Design Similar to !94, this wants to merge from the F-Droid branch. Old MR is !84. See merge request !95
@ -16,9 +16,9 @@ if ( !hasProperty( 'sourceDeps' ) ) {
|
||||
|
||||
dependencies {
|
||||
|
||||
compile 'com.android.support:support-v4:20.0.0',
|
||||
'com.android.support:appcompat-v7:20.0.0',
|
||||
'com.android.support:support-annotations:20.0.0',
|
||||
compile 'com.android.support:support-v4:22.1.0',
|
||||
'com.android.support:appcompat-v7:22.1.0',
|
||||
'com.android.support:support-annotations:22.1.0',
|
||||
|
||||
'org.thoughtcrime.ssl.pinning:AndroidPinning:1.0.0',
|
||||
'com.nostra13.universalimageloader:universal-image-loader:1.9.4',
|
||||
@ -80,9 +80,9 @@ if ( !hasProperty( 'sourceDeps' ) ) {
|
||||
// then you can find the relevant portions of the ../build.gradle file that
|
||||
// include magic required to make it work at around about the v0.78 git tag.
|
||||
// They have since been removed to clean up the build file.
|
||||
compile 'com.android.support:support-v4:20.0.0',
|
||||
'com.android.support:appcompat-v7:20.0.0',
|
||||
'com.android.support:support-annotations:20.0.0'
|
||||
compile 'com.android.support:support-v4:22.1.0',
|
||||
'com.android.support:appcompat-v7:22.1.0',
|
||||
'com.android.support:support-annotations:22.1.0'
|
||||
|
||||
androidTestCompile 'commons-io:commons-io:2.2'
|
||||
}
|
||||
|
BIN
F-Droid/res/drawable-hdpi/ic_add_white.png
Normal file
After Width: | Height: | Size: 222 B |
BIN
F-Droid/res/drawable-hdpi/ic_bluetooth_white.png
Normal file
After Width: | Height: | Size: 663 B |
BIN
F-Droid/res/drawable-hdpi/ic_delete_white.png
Normal file
After Width: | Height: | Size: 338 B |
BIN
F-Droid/res/drawable-hdpi/ic_do_not_disturb_white.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
F-Droid/res/drawable-hdpi/ic_edit_white.png
Normal file
After Width: | Height: | Size: 490 B |
BIN
F-Droid/res/drawable-hdpi/ic_help_white.png
Normal file
After Width: | Height: | Size: 1000 B |
BIN
F-Droid/res/drawable-hdpi/ic_nfc_white.png
Normal file
After Width: | Height: | Size: 565 B |
BIN
F-Droid/res/drawable-hdpi/ic_play_arrow_white.png
Normal file
After Width: | Height: | Size: 399 B |
BIN
F-Droid/res/drawable-hdpi/ic_refresh_white.png
Normal file
After Width: | Height: | Size: 875 B |
BIN
F-Droid/res/drawable-hdpi/ic_search_white.png
Normal file
After Width: | Height: | Size: 871 B |
BIN
F-Droid/res/drawable-hdpi/ic_settings_white.png
Normal file
After Width: | Height: | Size: 974 B |
BIN
F-Droid/res/drawable-hdpi/ic_share_white.png
Normal file
After Width: | Height: | Size: 857 B |
BIN
F-Droid/res/drawable-hdpi/ic_view_headline_white.png
Normal file
After Width: | Height: | Size: 227 B |
BIN
F-Droid/res/drawable-mdpi/ic_add_white.png
Normal file
After Width: | Height: | Size: 198 B |
BIN
F-Droid/res/drawable-mdpi/ic_bluetooth_white.png
Normal file
After Width: | Height: | Size: 470 B |
BIN
F-Droid/res/drawable-mdpi/ic_delete_white.png
Normal file
After Width: | Height: | Size: 270 B |
BIN
F-Droid/res/drawable-mdpi/ic_do_not_disturb_white.png
Normal file
After Width: | Height: | Size: 815 B |
BIN
F-Droid/res/drawable-mdpi/ic_edit_white.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
F-Droid/res/drawable-mdpi/ic_help_white.png
Normal file
After Width: | Height: | Size: 703 B |
BIN
F-Droid/res/drawable-mdpi/ic_nfc_white.png
Normal file
After Width: | Height: | Size: 406 B |
BIN
F-Droid/res/drawable-mdpi/ic_play_arrow_white.png
Normal file
After Width: | Height: | Size: 318 B |
BIN
F-Droid/res/drawable-mdpi/ic_refresh_white.png
Normal file
After Width: | Height: | Size: 637 B |
BIN
F-Droid/res/drawable-mdpi/ic_search_white.png
Normal file
After Width: | Height: | Size: 591 B |
BIN
F-Droid/res/drawable-mdpi/ic_settings_white.png
Normal file
After Width: | Height: | Size: 737 B |
BIN
F-Droid/res/drawable-mdpi/ic_share_white.png
Normal file
After Width: | Height: | Size: 625 B |
BIN
F-Droid/res/drawable-mdpi/ic_view_headline_white.png
Normal file
After Width: | Height: | Size: 202 B |
BIN
F-Droid/res/drawable-xhdpi/ic_add_white.png
Normal file
After Width: | Height: | Size: 269 B |
BIN
F-Droid/res/drawable-xhdpi/ic_bluetooth_white.png
Normal file
After Width: | Height: | Size: 771 B |
0
F-Droid/res/drawable-xhdpi/ic_delete_white.png
Normal file
BIN
F-Droid/res/drawable-xhdpi/ic_do_not_disturb_white.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
F-Droid/res/drawable-xhdpi/ic_edit_white.png
Normal file
After Width: | Height: | Size: 632 B |
BIN
F-Droid/res/drawable-xhdpi/ic_help_white.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
F-Droid/res/drawable-xhdpi/ic_nfc_white.png
Normal file
After Width: | Height: | Size: 774 B |
BIN
F-Droid/res/drawable-xhdpi/ic_play_arrow_white.png
Normal file
After Width: | Height: | Size: 477 B |
BIN
F-Droid/res/drawable-xhdpi/ic_refresh_white.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
F-Droid/res/drawable-xhdpi/ic_search_white.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
F-Droid/res/drawable-xhdpi/ic_settings_white.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
F-Droid/res/drawable-xhdpi/ic_share_white.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
F-Droid/res/drawable-xhdpi/ic_view_headline_white.png
Normal file
After Width: | Height: | Size: 263 B |
BIN
F-Droid/res/drawable-xxhdpi/ic_add_white.png
Normal file
After Width: | Height: | Size: 356 B |
BIN
F-Droid/res/drawable-xxhdpi/ic_bluetooth_white.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_delete_white.png
Normal file
After Width: | Height: | Size: 574 B |
BIN
F-Droid/res/drawable-xxhdpi/ic_do_not_disturb_white.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_edit_white.png
Normal file
After Width: | Height: | Size: 843 B |
BIN
F-Droid/res/drawable-xxhdpi/ic_help_white.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_nfc_white.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_play_arrow_white.png
Normal file
After Width: | Height: | Size: 666 B |
BIN
F-Droid/res/drawable-xxhdpi/ic_refresh_white.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_search_white.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_settings_white.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_share_white.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
F-Droid/res/drawable-xxhdpi/ic_view_headline_white.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
F-Droid/res/drawable-xxxhdpi/ic_add_white.png
Normal file
After Width: | Height: | Size: 470 B |
BIN
F-Droid/res/drawable-xxxhdpi/ic_bluetooth_white.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_delete_white.png
Normal file
After Width: | Height: | Size: 719 B |
BIN
F-Droid/res/drawable-xxxhdpi/ic_do_not_disturb_white.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_edit_white.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_help_white.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_nfc_white.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_play_arrow_white.png
Normal file
After Width: | Height: | Size: 835 B |
BIN
F-Droid/res/drawable-xxxhdpi/ic_refresh_white.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_search_white.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_settings_white.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_share_white.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
F-Droid/res/drawable-xxxhdpi/ic_view_headline_white.png
Normal file
After Width: | Height: | Size: 460 B |
BIN
F-Droid/res/drawable/ic_add_white.png
Normal file
After Width: | Height: | Size: 198 B |
BIN
F-Droid/res/drawable/ic_bluetooth_white.png
Normal file
After Width: | Height: | Size: 470 B |
BIN
F-Droid/res/drawable/ic_delete_white.png
Normal file
After Width: | Height: | Size: 270 B |
BIN
F-Droid/res/drawable/ic_do_not_disturb_white.png
Normal file
After Width: | Height: | Size: 815 B |
BIN
F-Droid/res/drawable/ic_edit_white.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
F-Droid/res/drawable/ic_help_white.png
Normal file
After Width: | Height: | Size: 703 B |
BIN
F-Droid/res/drawable/ic_nfc_white.png
Normal file
After Width: | Height: | Size: 406 B |
BIN
F-Droid/res/drawable/ic_play_arrow_white.png
Normal file
After Width: | Height: | Size: 318 B |
BIN
F-Droid/res/drawable/ic_refresh_white.png
Normal file
After Width: | Height: | Size: 637 B |
BIN
F-Droid/res/drawable/ic_search_white.png
Normal file
After Width: | Height: | Size: 591 B |
BIN
F-Droid/res/drawable/ic_settings_white.png
Normal file
After Width: | Height: | Size: 737 B |
BIN
F-Droid/res/drawable/ic_share_white.png
Normal file
After Width: | Height: | Size: 625 B |
BIN
F-Droid/res/drawable/ic_view_headline_white.png
Normal file
After Width: | Height: | Size: 202 B |
21
F-Droid/res/layout/available_app_list.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<Spinner
|
||||
android:id="@+id/category_spinner"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
</Spinner>
|
||||
|
||||
<ListView
|
||||
android:id="@android:id/list"
|
||||
android:fastScrollEnabled="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
</ListView>
|
||||
|
||||
</LinearLayout>
|
@ -18,6 +18,7 @@
|
||||
android:text="@string/swap_start"
|
||||
style="@style/SwapTheme.StartSwap.StartButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/text_description"
|
||||
android:layout_centerHorizontal="true"/>
|
||||
|
||||
|
@ -4,12 +4,12 @@
|
||||
|
||||
<item
|
||||
android:id="@+id/action_search"
|
||||
android:icon="@android:drawable/ic_menu_search"
|
||||
android:icon="@drawable/ic_search_white"
|
||||
android:title="@string/menu_search"
|
||||
app:showAsAction="always"/>
|
||||
<item
|
||||
android:id="@+id/action_update_repo"
|
||||
android:icon="@drawable/ic_menu_refresh"
|
||||
android:icon="@drawable/ic_refresh_white"
|
||||
android:title="@string/menu_update_repo"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
@ -18,22 +18,22 @@
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/action_manage_repos"
|
||||
android:icon="@android:drawable/ic_menu_agenda"
|
||||
android:icon="@drawable/ic_view_headline_white"
|
||||
android:title="@string/menu_manage"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/action_bluetooth_apk"
|
||||
android:icon="@android:drawable/stat_sys_data_bluetooth"
|
||||
android:icon="@drawable/ic_bluetooth_white"
|
||||
android:title="@string/menu_send_apk_bt"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:icon="@android:drawable/ic_menu_preferences"
|
||||
android:icon="@drawable/ic_settings_white"
|
||||
android:title="@string/menu_preferences"
|
||||
app:showAsAction="ifRoom"/>
|
||||
<item
|
||||
android:id="@+id/action_about"
|
||||
android:icon="@android:drawable/ic_menu_help"
|
||||
android:icon="@drawable/ic_help_white"
|
||||
android:title="@string/menu_about"
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
|
@ -5,11 +5,11 @@
|
||||
<item
|
||||
android:id="@+id/edit_repo"
|
||||
android:title="@string/edit"
|
||||
android:icon="@android:drawable/ic_menu_edit" />
|
||||
android:icon="@drawable/ic_edit_white" />
|
||||
|
||||
<item
|
||||
android:id="@+id/delete_repo"
|
||||
android:title="@string/delete"
|
||||
android:icon="@android:drawable/ic_menu_delete" />
|
||||
android:icon="@drawable/ic_delete_white" />
|
||||
|
||||
</menu>
|
@ -4,12 +4,12 @@
|
||||
|
||||
<item
|
||||
android:id="@+id/action_update_repo"
|
||||
android:icon="@drawable/ic_menu_refresh"
|
||||
android:icon="@drawable/ic_refresh_white"
|
||||
android:title="@string/menu_update_repo"
|
||||
app:showAsAction="always|withText"/>
|
||||
<item
|
||||
android:id="@+id/action_add_repo"
|
||||
android:icon="@android:drawable/ic_menu_add"
|
||||
android:icon="@drawable/ic_add_white"
|
||||
android:title="@string/menu_add_repo"
|
||||
app:showAsAction="always|withText"/>
|
||||
<item
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
<item
|
||||
android:id="@+id/action_search"
|
||||
android:icon="@android:drawable/ic_menu_search"
|
||||
android:icon="@drawable/ic_search_white"
|
||||
android:title="@string/menu_search"
|
||||
android:titleCondensed="@string/menu_search"/>
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
<resources>
|
||||
|
||||
<style name="AppBaseThemeDark" parent="Theme.AppCompat">
|
||||
<!-- API 11 theme customizations go here -->
|
||||
</style>
|
||||
|
||||
<style name="AppBaseThemeLight" parent="Theme.AppCompat.Light">
|
||||
<!-- API 11 theme customizations go here -->
|
||||
</style>
|
||||
|
||||
<style name="AppBaseThemeLightWithDarkActionBar" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- API 11 theme customizations go here -->
|
||||
</style>
|
||||
|
||||
</resources>
|
16
F-Droid/res/values-v21/styles.xml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="AppThemeDark" parent="AppBaseThemeDark">
|
||||
<!-- customizations that are not API-level specific go here. -->
|
||||
<item name="android:colorEdgeEffect">@color/fdroid_blue</item>
|
||||
<item name="android:colorControlActivated">@color/fdroid_green</item>
|
||||
<item name="android:colorControlHighlight">@color/fdroid_green</item>
|
||||
</style>
|
||||
|
||||
<style name="AppThemeLight" parent="AppBaseThemeLight">
|
||||
<!-- customizations that are not API-level specific go here. -->
|
||||
<item name="android:colorEdgeEffect">@color/fdroid_blue</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -13,6 +13,5 @@
|
||||
<string-array name="themeNames">
|
||||
<item>Dark</item>
|
||||
<item>Light</item>
|
||||
<item>Light (with dark action bar)</item>
|
||||
</string-array>
|
||||
</resources>
|
||||
|
@ -4,6 +4,10 @@
|
||||
<color name="unsigned">#ffCC0000</color>
|
||||
<color name="unverified">#ff999999</color>
|
||||
|
||||
<color name="fdroid_blue">#FF6097C5</color>
|
||||
<color name="fdroid_blue_dark">#ff4b7195</color>
|
||||
<color name="fdroid_green">#FFAAD024</color>
|
||||
|
||||
<color name="swap_light_blue">#27aae1</color>
|
||||
<color name="swap_light_blue_pressed">#ff98cce1</color>
|
||||
<color name="swap_blue">#1c6bbc</color>
|
||||
|
@ -26,7 +26,6 @@
|
||||
<string-array name="themeValues">
|
||||
<item>dark</item>
|
||||
<item>light</item>
|
||||
<item>lightWithDarkActionBar</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="languageValues">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<item type="id" name="categorySpinner" />
|
||||
<item type="id" name="category_spinner" />
|
||||
<item type="id" name="appDetailsSummaryHeader" />
|
||||
</resources>
|
@ -2,14 +2,17 @@
|
||||
|
||||
<style name="AppBaseThemeDark" parent="Theme.AppCompat">
|
||||
<!-- backward-compatibility theme options go here -->
|
||||
|
||||
<item name="colorPrimary">@color/fdroid_blue</item>
|
||||
<item name="colorPrimaryDark">@color/fdroid_blue_dark</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="AppBaseThemeLight" parent="Theme.AppCompat.Light">
|
||||
<style name="AppBaseThemeLight" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- backward-compatibility theme options go here -->
|
||||
</style>
|
||||
|
||||
<style name="AppBaseThemeLightWithDarkActionBar" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- backward-compatibility theme options go here -->
|
||||
<item name="colorPrimary">@color/fdroid_blue</item>
|
||||
<item name="colorPrimaryDark">@color/fdroid_blue_dark</item>
|
||||
</style>
|
||||
|
||||
<color name="black">#FF000000</color>
|
||||
@ -29,24 +32,20 @@
|
||||
<!-- customizations that are not API-level specific go here. -->
|
||||
</style>
|
||||
|
||||
<style name="AppThemeLightWithDarkActionBar" parent="AppBaseThemeLightWithDarkActionBar">
|
||||
<!-- customizations that are not API-level specific go here. -->
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard" parent="AppThemeDark">
|
||||
<item name="android:windowBackground">@drawable/swap_window_background</item>
|
||||
<item name="android:actionBarStyle">@style/Widget.AppCompat.ActionBar.Solid</item>
|
||||
<item name="android:actionButtonStyle">@style/SwapTheme.Wizard.ActionButton</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.StartSwap" parent="AppThemeLightWithDarkActionBar">
|
||||
<style name="SwapTheme.StartSwap" parent="AppThemeLight">
|
||||
<item name="android:background">@color/white</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.AppList" parent="AppThemeLightWithDarkActionBar">
|
||||
<style name="SwapTheme.AppList" parent="AppThemeLight">
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.AppList.ListItem" parent="AppThemeLightWithDarkActionBar">
|
||||
<style name="SwapTheme.AppList.ListItem" parent="AppThemeLight">
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.StartSwap.StartButton">
|
||||
@ -54,10 +53,10 @@
|
||||
<item name="android:layout_marginRight">9dp</item> <!-- 16px * 96dpi / 160dpi -->
|
||||
<item name="android:layout_height">63.3dp</item> <!-- 113px * 96dpi / 160dpi -->
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:textColor">@android:color/white</item>
|
||||
|
||||
<item name="android:textSize">18.5sp</item> <!-- 33px * 96dpi / 160dpi -->
|
||||
<item name="android:background">@drawable/swap_start_button_skin</item>
|
||||
<item name="android:textColor">#fff</item>
|
||||
<item name="android:drawableLeft">@drawable/ic_swap</item>
|
||||
<item name="android:paddingLeft">10dp</item>
|
||||
|
||||
@ -105,7 +104,6 @@
|
||||
<item name="android:paddingRight">10dp</item>
|
||||
<item name="android:paddingTop">5dp</item>
|
||||
<item name="android:paddingBottom">5dp</item>
|
||||
<item name="android:background">@drawable/swap_action_button_skin</item>
|
||||
</style>
|
||||
|
||||
<style name="SwapTheme.Wizard.MainText" parent="@style/SwapTheme.Wizard.Text">
|
||||
@ -179,4 +177,4 @@
|
||||
<item name="android:textStyle">italic</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
</resources>
|
@ -632,14 +632,14 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
||||
|
||||
MenuItemCompat.setShowAsAction(menu.add(
|
||||
Menu.NONE, SHARE, 1, R.string.menu_share)
|
||||
.setIcon(android.R.drawable.ic_menu_share),
|
||||
.setIcon(R.drawable.ic_share_white),
|
||||
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM |
|
||||
MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
|
||||
|
||||
if (app.isInstalled()) {
|
||||
MenuItemCompat.setShowAsAction(menu.add(
|
||||
Menu.NONE, UNINSTALL, 1, R.string.menu_uninstall)
|
||||
.setIcon(android.R.drawable.ic_menu_delete),
|
||||
.setIcon(R.drawable.ic_delete_white),
|
||||
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM |
|
||||
MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
|
||||
}
|
||||
@ -647,19 +647,19 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
||||
if (mPm.getLaunchIntentForPackage(app.id) != null && app.canAndWantToUpdate()) {
|
||||
MenuItemCompat.setShowAsAction(menu.add(
|
||||
Menu.NONE, LAUNCH, 1, R.string.menu_launch)
|
||||
.setIcon(android.R.drawable.ic_media_play),
|
||||
.setIcon(R.drawable.ic_play_arrow_white),
|
||||
MenuItemCompat.SHOW_AS_ACTION_ALWAYS |
|
||||
MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
|
||||
}
|
||||
|
||||
menu.add(Menu.NONE, IGNOREALL, 2, R.string.menu_ignore_all)
|
||||
.setIcon(android.R.drawable.ic_menu_close_clear_cancel)
|
||||
.setIcon(R.drawable.ic_do_not_disturb_white)
|
||||
.setCheckable(true)
|
||||
.setChecked(app.ignoreAllUpdates);
|
||||
|
||||
if (app.hasUpdates()) {
|
||||
menu.add(Menu.NONE, IGNORETHIS, 2, R.string.menu_ignore_this)
|
||||
.setIcon(android.R.drawable.ic_menu_close_clear_cancel)
|
||||
.setIcon(R.drawable.ic_do_not_disturb_white)
|
||||
.setCheckable(true)
|
||||
.setChecked(app.ignoreThisUpdate >= app.suggestedVercode);
|
||||
}
|
||||
@ -667,7 +667,7 @@ public class AppDetails extends ActionBarActivity implements ProgressListener, A
|
||||
// Ignore on devices without Bluetooth
|
||||
if (app.isInstalled() && fdroidApp.bluetoothAdapter != null) {
|
||||
menu.add(Menu.NONE, SEND_VIA_BLUETOOTH, 3, R.string.send_via_bluetooth)
|
||||
.setIcon(android.R.drawable.stat_sys_data_bluetooth);
|
||||
.setIcon(R.drawable.ic_bluetooth_white);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -87,12 +87,12 @@ public class FDroidApp extends Application {
|
||||
dark, light, lightWithDarkActionBar
|
||||
}
|
||||
|
||||
private static Theme curTheme = Theme.dark;
|
||||
private static Theme curTheme = Theme.light;
|
||||
|
||||
public void reloadTheme() {
|
||||
curTheme = Theme.valueOf(PreferenceManager
|
||||
.getDefaultSharedPreferences(getBaseContext())
|
||||
.getString(Preferences.PREF_THEME, "dark"));
|
||||
.getString(Preferences.PREF_THEME, Preferences.DEFAULT_THEME));
|
||||
}
|
||||
|
||||
public void applyTheme(Activity activity) {
|
||||
@ -109,8 +109,6 @@ public class FDroidApp extends Application {
|
||||
return R.style.AppThemeDark;
|
||||
case light:
|
||||
return R.style.AppThemeLight;
|
||||
case lightWithDarkActionBar:
|
||||
return R.style.AppThemeLightWithDarkActionBar;
|
||||
default:
|
||||
return R.style.AppThemeDark;
|
||||
}
|
||||
|
@ -17,7 +17,6 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Spinner;
|
||||
|
||||
@ -124,28 +123,25 @@ public class AvailableAppsFragment extends AppListFragment implements
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void styleSpinner(Spinner spinner) {
|
||||
if (Build.VERSION.SDK_INT >= 14) {
|
||||
Drawable menuButton = getResources().getDrawable(android.R.drawable.btn_dropdown);
|
||||
if (FDroidApp.getCurTheme() == FDroidApp.Theme.dark) {
|
||||
menuButton.setAlpha(32); // make it darker via alpha
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 16) {
|
||||
spinner.setBackground(menuButton);
|
||||
} else {
|
||||
spinner.setBackgroundDrawable(menuButton);
|
||||
}
|
||||
|
||||
Drawable menuButton = getResources().getDrawable(android.R.drawable.btn_dropdown);
|
||||
if (FDroidApp.getCurTheme() == FDroidApp.Theme.dark) {
|
||||
menuButton.setAlpha(32); // make it darker via alpha
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 16) {
|
||||
spinner.setBackground(menuButton);
|
||||
} else {
|
||||
spinner.setBackgroundDrawable(menuButton);
|
||||
}
|
||||
}
|
||||
|
||||
private Spinner createCategorySpinner() {
|
||||
private Spinner setupCategorySpinner(Spinner spinner) {
|
||||
|
||||
categorySpinner = spinner;
|
||||
categorySpinner.setId(R.id.category_spinner);
|
||||
|
||||
categories = AppProvider.Helper.categories(getActivity());
|
||||
|
||||
categorySpinner = new Spinner(getActivity());
|
||||
|
||||
// Giving it an ID lets the default save/restore state functionality do its stuff.
|
||||
categorySpinner.setId(R.id.categorySpinner);
|
||||
|
||||
styleSpinner(categorySpinner);
|
||||
|
||||
ArrayAdapter<String> adapter = new ArrayAdapter<>(
|
||||
@ -173,24 +169,11 @@ public class AvailableAppsFragment extends AppListFragment implements
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
LinearLayout view = new LinearLayout(getActivity());
|
||||
view.setOrientation(LinearLayout.VERTICAL);
|
||||
View view = inflater.inflate(R.layout.available_app_list, container, false);
|
||||
|
||||
view.addView(
|
||||
createCategorySpinner(),
|
||||
new ViewGroup.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||
LinearLayout.LayoutParams.WRAP_CONTENT));
|
||||
setupCategorySpinner((Spinner)view.findViewById(R.id.category_spinner));
|
||||
|
||||
ListView list = new ListView(getActivity());
|
||||
list.setId(android.R.id.list);
|
||||
list.setFastScrollEnabled(true);
|
||||
list.setOnItemClickListener(this);
|
||||
view.addView(
|
||||
list,
|
||||
new ViewGroup.LayoutParams(
|
||||
LinearLayout.LayoutParams.MATCH_PARENT,
|
||||
LinearLayout.LayoutParams.MATCH_PARENT));
|
||||
((ListView)view.findViewById(android.R.id.list)).setOnItemClickListener(this);
|
||||
|
||||
// R.string.category_whatsnew is the default set in AppListManager
|
||||
DEFAULT_CATEGORY = getActivity().getString(R.string.category_whatsnew);
|
||||
|
@ -274,13 +274,13 @@ public class RepoDetailsFragment extends Fragment {
|
||||
menu.clear();
|
||||
|
||||
MenuItem update = menu.add(Menu.NONE, UPDATE, 0, R.string.repo_update);
|
||||
update.setIcon(R.drawable.ic_menu_refresh);
|
||||
update.setIcon(R.drawable.ic_refresh_white);
|
||||
MenuItemCompat.setShowAsAction(update,
|
||||
MenuItemCompat.SHOW_AS_ACTION_ALWAYS |
|
||||
MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
|
||||
|
||||
MenuItem delete = menu.add(Menu.NONE, DELETE, 0, R.string.delete);
|
||||
delete.setIcon(android.R.drawable.ic_menu_delete);
|
||||
delete.setIcon(R.drawable.ic_delete_white);
|
||||
MenuItemCompat.setShowAsAction(delete,
|
||||
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM |
|
||||
MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
|
||||
@ -307,7 +307,7 @@ public class RepoDetailsFragment extends Fragment {
|
||||
if (enableNfc != null)
|
||||
return; // already created
|
||||
enableNfc = menu.add(Menu.NONE, ENABLE_NFC, 0, R.string.enable_nfc_send);
|
||||
enableNfc.setIcon(android.R.drawable.ic_menu_preferences);
|
||||
enableNfc.setIcon(R.drawable.ic_nfc_white);
|
||||
MenuItemCompat.setShowAsAction(enableNfc,
|
||||
MenuItemCompat.SHOW_AS_ACTION_IF_ROOM |
|
||||
MenuItemCompat.SHOW_AS_ACTION_WITH_TEXT);
|
||||
|
74
F-Droid/tools/download-material-icon.sh
Executable file
@ -0,0 +1,74 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# Helper script to download icons from https://github.com/google/material-design-icons and
|
||||
# put the in the relevant drawable-* directories.
|
||||
#
|
||||
|
||||
function usage {
|
||||
echo "USAGE: download-material-icon.sh res-directory category icon"
|
||||
echo " res-directory Usually \"res\" in your android project"
|
||||
echo " category the grouping seen in the URL below (e.g. action, alert, av, communication, content, etc)"
|
||||
echo " icon is the name if the icon (see URL below for icons)"
|
||||
echo ""
|
||||
echo "To see available icons, visit http://google.github.io/material-design-icons/"
|
||||
}
|
||||
|
||||
function download {
|
||||
REMOTE_DRAWABLE_DIR=$1
|
||||
LOCAL_DRAWABLE_DIR=$2
|
||||
FILE="ic_${ICON}_48dp.png"
|
||||
URL="$BASE_URL/$CATEGORY/$REMOTE_DRAWABLE_DIR/$FILE"
|
||||
DIR="$RES_DIR/$LOCAL_DRAWABLE_DIR"
|
||||
|
||||
if [ ! -d $DIR ]
|
||||
then
|
||||
echo "Creating dir $DIR"
|
||||
mkdir $DIR
|
||||
fi
|
||||
|
||||
LOCAL_PATH="$DIR/ic_${ICON}.png"
|
||||
|
||||
echo "Downloading to $LOCAL_PATH"
|
||||
wget --quiet --output-document=$LOCAL_PATH $URL
|
||||
|
||||
if [ ! -s $LOCAL_PATH ]
|
||||
then
|
||||
if [ -f $LOCAL_PATH ]
|
||||
then
|
||||
rm $LOCAL_PATH
|
||||
fi
|
||||
|
||||
echo "ERROR: Could not download from $URL to $LOCAL_PATH failed."
|
||||
echo ""
|
||||
usage
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
RES_DIR=$1
|
||||
CATEGORY=$2
|
||||
ICON="${3}_white"
|
||||
BASE_URL="https://raw.githubusercontent.com/google/material-design-icons/master"
|
||||
SCREENS="mdpi hdpi xhdpi xxhdpi xxxhdpi"
|
||||
|
||||
if [ ! -d $RES_DIR ]
|
||||
then
|
||||
echo "ERROR: $RES_DIR is not a directory"
|
||||
echo ""
|
||||
usage
|
||||
exit
|
||||
fi
|
||||
|
||||
download drawable-mdpi drawable
|
||||
for SCREEN in $SCREENS
|
||||
do
|
||||
download "drawable-$SCREEN" "drawable-$SCREEN"
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "Please make sure you have the following attribution (or words to this effect) somewhere in your project:"
|
||||
echo ""
|
||||
echo " Some icons are from the Material Design Icon set (https://github.com/google/material-design-icons)"
|
||||
echo " released under an Attribution 4.0 International license (http://creativecommons.org/licenses/by/4.0/)"
|
||||
echo ""
|
@ -139,3 +139,8 @@ Some icons are made by [Picol](http://www.flaticon.com/authors/picol),
|
||||
[Dave Gandy](http://www.flaticon.com/authors/dave-gandy) from
|
||||
[Flaticon](http://www.flaticon.com) or by Google and are licensed by
|
||||
[Creative Commons BY 3.0](http://creativecommons.org/licenses/by/3.0/).
|
||||
|
||||
Other icons are from the
|
||||
[Material Design Icon set](https://github.com/google/material-design-icons)
|
||||
released under an
|
||||
[Attribution 4.0 International license](http://creativecommons.org/licenses/by/4.0/).
|
||||
|