mirror of
https://github.com/gsantner/dandelion
synced 2024-11-22 12:22:08 +01:00
Allow turning off toolbar intellihide
This commit is contained in:
parent
1d2a428df6
commit
a15e060e25
9 changed files with 68 additions and 38 deletions
|
@ -6,7 +6,7 @@ android:
|
||||||
- tools
|
- tools
|
||||||
- tools # TODO https://github.com/travis-ci/travis-ci/issues/6193
|
- tools # TODO https://github.com/travis-ci/travis-ci/issues/6193
|
||||||
- platform-tools
|
- platform-tools
|
||||||
- build-tools-24.0.0
|
- build-tools-24.0.1
|
||||||
- android-24
|
- android-24
|
||||||
- extra-android-m2repository
|
- extra-android-m2repository
|
||||||
before_cache:
|
before_cache:
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
# v0.1.4 (in progress)
|
# v0.1.4 (2016-07-31)
|
||||||
- by @vanitasvitae, @gsantner, @di72nn
|
- by @vanitasvitae, @gsantner, @di72nn
|
||||||
|
- Allow turning off toolbar intellihide
|
||||||
|
- Handle links from browseable intent filter #38
|
||||||
|
- Intent filter for pods
|
||||||
|
- Update license infos of source files
|
||||||
- Update license infos of source files
|
- Update license infos of source files
|
||||||
- Localization lint; Translation; Readme
|
- Localization lint; Translation; Readme
|
||||||
- Add an option to clear WebView cache
|
- Add an option to clear WebView cache
|
||||||
|
|
|
@ -3,7 +3,7 @@ apply plugin: 'android-apt'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 24
|
compileSdkVersion 24
|
||||||
buildToolsVersion "24.0.0"
|
buildToolsVersion "24.0.1"
|
||||||
useLibrary 'org.apache.http.legacy'
|
useLibrary 'org.apache.http.legacy'
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
@ -34,9 +34,9 @@ dependencies {
|
||||||
testCompile 'junit:junit:4.12'
|
testCompile 'junit:junit:4.12'
|
||||||
|
|
||||||
// Android standard libs
|
// Android standard libs
|
||||||
compile 'com.android.support:appcompat-v7:24.0.0'
|
compile 'com.android.support:appcompat-v7:24.1.1'
|
||||||
compile 'com.android.support:design:24.0.0'
|
compile 'com.android.support:design:24.1.1'
|
||||||
compile 'com.android.support:support-v4:24.0.0'
|
compile 'com.android.support:support-v4:24.1.1'
|
||||||
|
|
||||||
// More libraries
|
// More libraries
|
||||||
compile 'com.getbase:floatingactionbutton:1.9.1'
|
compile 'com.getbase:floatingactionbutton:1.9.1'
|
||||||
|
|
|
@ -137,6 +137,7 @@
|
||||||
<data android:host="diaspora.subsignal.org" android:scheme="https" />
|
<data android:host="diaspora.subsignal.org" android:scheme="https" />
|
||||||
<data android:host="diaspora.trash-talk.de" android:scheme="https" />
|
<data android:host="diaspora.trash-talk.de" android:scheme="https" />
|
||||||
<data android:host="diaspora.undernet.uy" android:scheme="https" />
|
<data android:host="diaspora.undernet.uy" android:scheme="https" />
|
||||||
|
<data android:host="diaspora.unixcorn.org" android:scheme="https" />
|
||||||
<data android:host="diasporausa.com" android:scheme="https" />
|
<data android:host="diasporausa.com" android:scheme="https" />
|
||||||
<data android:host="diasp.org" android:scheme="https" />
|
<data android:host="diasp.org" android:scheme="https" />
|
||||||
<data android:host="espora.social" android:scheme="https" />
|
<data android:host="espora.social" android:scheme="https" />
|
||||||
|
@ -144,6 +145,7 @@
|
||||||
<data android:host="flokk.no" android:scheme="https" />
|
<data android:host="flokk.no" android:scheme="https" />
|
||||||
<data android:host="framasphere.org" android:scheme="https" />
|
<data android:host="framasphere.org" android:scheme="https" />
|
||||||
<data android:host="freehuman.fr" android:scheme="https" />
|
<data android:host="freehuman.fr" android:scheme="https" />
|
||||||
|
<data android:host="home.enslaver.net" android:scheme="https" />
|
||||||
<data android:host="idoru.pl" android:scheme="https" />
|
<data android:host="idoru.pl" android:scheme="https" />
|
||||||
<data android:host="iliketoast.net" android:scheme="https" />
|
<data android:host="iliketoast.net" android:scheme="https" />
|
||||||
<data android:host="joindiaspora.com" android:scheme="https" />
|
<data android:host="joindiaspora.com" android:scheme="https" />
|
||||||
|
@ -196,6 +198,7 @@
|
||||||
<data android:host="pod.ros-it.ch" android:scheme="https" />
|
<data android:host="pod.ros-it.ch" android:scheme="https" />
|
||||||
<data android:host="pod.sccn.club" android:scheme="https" />
|
<data android:host="pod.sccn.club" android:scheme="https" />
|
||||||
<data android:host="pod.sertelon.fr" android:scheme="https" />
|
<data android:host="pod.sertelon.fr" android:scheme="https" />
|
||||||
|
<data android:host="pod.skisso.com" android:scheme="https" />
|
||||||
<data android:host="pod.storel.li" android:scheme="https" />
|
<data android:host="pod.storel.li" android:scheme="https" />
|
||||||
<data android:host="pod.tchncs.de" android:scheme="https" />
|
<data android:host="pod.tchncs.de" android:scheme="https" />
|
||||||
<data android:host="pod.thomasdalichow.de" android:scheme="https" />
|
<data android:host="pod.thomasdalichow.de" android:scheme="https" />
|
||||||
|
|
|
@ -39,6 +39,7 @@ import android.os.Handler;
|
||||||
import android.os.StrictMode;
|
import android.os.StrictMode;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
|
import android.support.design.widget.AppBarLayout;
|
||||||
import android.support.design.widget.CollapsingToolbarLayout;
|
import android.support.design.widget.CollapsingToolbarLayout;
|
||||||
import android.support.design.widget.NavigationView;
|
import android.support.design.widget.NavigationView;
|
||||||
import android.support.design.widget.Snackbar;
|
import android.support.design.widget.Snackbar;
|
||||||
|
@ -208,6 +209,7 @@ public class MainActivity extends AppCompatActivity
|
||||||
.setAction(android.R.string.yes, new View.OnClickListener() {
|
.setAction(android.R.string.yes, new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
finish();
|
||||||
moveTaskToBack(true);
|
moveTaskToBack(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -245,6 +247,11 @@ public class MainActivity extends AppCompatActivity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!appSettings.isIntellihideToolbars()) {
|
||||||
|
AppBarLayout.LayoutParams params = (AppBarLayout.LayoutParams) toolbarTopCollapsing.getLayoutParams();
|
||||||
|
params.setScrollFlags(0); // clear all scroll flags
|
||||||
|
}
|
||||||
|
|
||||||
handleIntent(getIntent());
|
handleIntent(getIntent());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -584,6 +591,7 @@ public class MainActivity extends AppCompatActivity
|
||||||
|
|
||||||
case R.id.action_exit: {
|
case R.id.action_exit: {
|
||||||
moveTaskToBack(true);
|
moveTaskToBack(true);
|
||||||
|
finish();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -991,8 +999,7 @@ public class MainActivity extends AppCompatActivity
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawerLayout drawer = (DrawerLayout) findViewById(R.id.main__layout);
|
navDrawer.closeDrawer(GravityCompat.START);
|
||||||
if (drawer != null) drawer.closeDrawer(GravityCompat.START);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,7 @@ public class AppSettings {
|
||||||
public static final String PROXY_WAS_ENABLED = "wasProxyEnabled";
|
public static final String PROXY_WAS_ENABLED = "wasProxyEnabled";
|
||||||
public static final String PROXY_HOST = "pref_key_proxy_host";
|
public static final String PROXY_HOST = "pref_key_proxy_host";
|
||||||
public static final String PROXY_PORT = "pref_key_proxy_port";
|
public static final String PROXY_PORT = "pref_key_proxy_port";
|
||||||
|
public static final String UI_INTELLIHIDE_TOOLBARS ="pref_key_intellihide_toolbars";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -231,4 +232,8 @@ public class AppSettings {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isIntellihideToolbars(){
|
||||||
|
return prefApp.getBoolean(PREF.UI_INTELLIHIDE_TOOLBARS, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,5 +160,7 @@ along with this program. If not, see http://www.gnu.org/licenses.<br> <br
|
||||||
<string name="all_tags">Alle Tags</string>
|
<string name="all_tags">Alle Tags</string>
|
||||||
<string name="pref_desc_clear_cache">WebView Cache leeren</string>
|
<string name="pref_desc_clear_cache">WebView Cache leeren</string>
|
||||||
<string name="pref_title_clear_cache">Cache leeren</string>
|
<string name="pref_title_clear_cache">Cache leeren</string>
|
||||||
|
<string name="pref_title_intellihide_toolbars">Toolbars intelligent verstecken</string>
|
||||||
|
<string name="pref_desc_intellihide_toolbars">Obere und untere Toolbar verstecken während des Scrollens von Inhalt</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -175,4 +175,6 @@
|
||||||
<string name="toast_set_proxy_failed">Warning: Could not set network proxy…</string>
|
<string name="toast_set_proxy_failed">Warning: Could not set network proxy…</string>
|
||||||
|
|
||||||
<string name="all_tags">All tags</string>
|
<string name="all_tags">All tags</string>
|
||||||
|
<string name="pref_desc_intellihide_toolbars">Hide top and bottom toolbars automatically while scrolling</string>
|
||||||
|
<string name="pref_title_intellihide_toolbars">Intellihide Toolbars</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -2,76 +2,83 @@
|
||||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<!-- Appearance -->
|
<!-- Appearance -->
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/pref_category_visuals"
|
android:key="pref_key_category_visuals"
|
||||||
android:key="pref_key_category_visuals">
|
android:title="@string/pref_category_visuals">
|
||||||
<ListPreference
|
<ListPreference
|
||||||
android:title="@string/pref_title_font_size"
|
|
||||||
android:key="pref_key_font_size"
|
|
||||||
android:dialogTitle="@string/pref_title_font_size"
|
android:dialogTitle="@string/pref_title_font_size"
|
||||||
android:summary="%s"
|
|
||||||
android:entries="@array/pref_entries_font_size"
|
android:entries="@array/pref_entries_font_size"
|
||||||
android:entryValues="@array/pref_entry_values_font_size" />
|
android:entryValues="@array/pref_entry_values_font_size"
|
||||||
|
android:key="pref_key_font_size"
|
||||||
|
android:summary="%s"
|
||||||
|
android:title="@string/pref_title_font_size"/>
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:defaultValue="true"
|
||||||
|
android:key="pref_key_intellihide_toolbars"
|
||||||
|
android:summary="@string/pref_desc_intellihide_toolbars"
|
||||||
|
android:title="@string/pref_title_intellihide_toolbars"/>
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<!-- Diaspora Pod Settings -->
|
<!-- Diaspora Pod Settings -->
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/pref_category_pod_settings"
|
android:key="pref_key_category_pod_settings"
|
||||||
android:key="pref_key_category_pod_settings">
|
android:title="@string/pref_category_pod_settings">
|
||||||
<Preference
|
<Preference
|
||||||
android:title="@string/pref_title_personal_settings"
|
|
||||||
android:key="pref_key_personal_settings"
|
android:key="pref_key_personal_settings"
|
||||||
android:summary="@string/pref_desc_personal_settings">
|
android:summary="@string/pref_desc_personal_settings"
|
||||||
|
android:title="@string/pref_title_personal_settings">
|
||||||
</Preference>
|
</Preference>
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:title="@string/pref_title_manage_tags"
|
|
||||||
android:key="pref_key_manage_tags"
|
android:key="pref_key_manage_tags"
|
||||||
android:summary="@string/pref_desc_manage_tags">
|
android:summary="@string/pref_desc_manage_tags"
|
||||||
|
android:title="@string/pref_title_manage_tags">
|
||||||
</Preference>
|
</Preference>
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:title="@string/pref_title_manage_contacts"
|
|
||||||
android:key="pref_key_manage_contacts"
|
android:key="pref_key_manage_contacts"
|
||||||
android:summary="@string/pref_desc_manage_contacts">
|
android:summary="@string/pref_desc_manage_contacts"
|
||||||
|
android:title="@string/pref_title_manage_contacts">
|
||||||
</Preference>
|
</Preference>
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:title="@string/pref_title_change_account"
|
|
||||||
android:key="pref_key_change_account"
|
android:key="pref_key_change_account"
|
||||||
android:summary="@string/pref_desc_change_account">
|
android:summary="@string/pref_desc_change_account"
|
||||||
|
android:title="@string/pref_title_change_account">
|
||||||
</Preference>
|
</Preference>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
<!-- Networking -->
|
<!-- Networking -->
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
android:title="@string/pref_category_network"
|
android:key="pref_key_category_network"
|
||||||
android:key="pref_key_category_network">
|
android:title="@string/pref_category_network">
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:title="@string/pref_title_load_images"
|
android:defaultValue="true"
|
||||||
android:key="pref_key_load_images"
|
android:key="pref_key_load_images"
|
||||||
android:summary="@string/pref_desc_load_images"
|
android:summary="@string/pref_desc_load_images"
|
||||||
android:defaultValue="true" />
|
android:title="@string/pref_title_load_images"/>
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:title="@string/pref_title_clear_cache"
|
|
||||||
android:key="pref_key_clear_cache"
|
android:key="pref_key_clear_cache"
|
||||||
android:summary="@string/pref_desc_clear_cache">
|
android:summary="@string/pref_desc_clear_cache"
|
||||||
|
android:title="@string/pref_title_clear_cache">
|
||||||
</Preference>
|
</Preference>
|
||||||
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:title="@string/pref_title_proxy_enabled"
|
android:defaultValue="false"
|
||||||
android:key="pref_key_proxy_enabled"
|
android:key="pref_key_proxy_enabled"
|
||||||
android:summary="@string/pref_desc_proxy_enabled"
|
android:summary="@string/pref_desc_proxy_enabled"
|
||||||
android:defaultValue="false" />
|
android:title="@string/pref_title_proxy_enabled"/>
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:title="@string/pref_title_proxy_host"
|
android:dependency="pref_key_proxy_enabled"
|
||||||
|
android:inputType="textNoSuggestions"
|
||||||
android:key="pref_key_proxy_host"
|
android:key="pref_key_proxy_host"
|
||||||
android:dependency="pref_key_proxy_enabled"
|
android:title="@string/pref_title_proxy_host"/>
|
||||||
android:inputType="textNoSuggestions"/>
|
|
||||||
<EditTextPreference
|
<EditTextPreference
|
||||||
android:title="@string/pref_title_proxy_port"
|
|
||||||
android:key="pref_key_proxy_port"
|
|
||||||
android:dependency="pref_key_proxy_enabled"
|
android:dependency="pref_key_proxy_enabled"
|
||||||
android:inputType="number" />
|
android:inputType="number"
|
||||||
|
android:key="pref_key_proxy_port"
|
||||||
|
android:title="@string/pref_title_proxy_port"/>
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
Loading…
Reference in a new issue