mirror of
https://github.com/gsantner/dandelion
synced 2024-11-24 21:32:07 +01:00
Introduced ThemedCheckboxPreference
This commit is contained in:
parent
d0c699d869
commit
b4067b6056
15 changed files with 150 additions and 749 deletions
|
@ -25,6 +25,7 @@ import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
|
import android.content.res.AssetManager;
|
||||||
import android.graphics.drawable.LayerDrawable;
|
import android.graphics.drawable.LayerDrawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
@ -536,6 +537,11 @@ public class MainActivity extends ThemedActivity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AssetManager getAssets() {
|
||||||
|
return getResources().getAssets();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onStart() {
|
protected void onStart() {
|
||||||
super.onStart();
|
super.onStart();
|
||||||
|
|
|
@ -46,18 +46,6 @@ public class SettingsFragment__Debugging extends ThemedSettingsFragment {
|
||||||
@BindView(R.id.settings_activity__header_more__debugging)
|
@BindView(R.id.settings_activity__header_more__debugging)
|
||||||
protected TextView titleDebugging;
|
protected TextView titleDebugging;
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__debugging_activated)
|
|
||||||
protected RelativeLayout optionDebuggingActivated;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__debugging_activated_checkbox)
|
|
||||||
protected CheckBox checkboxDebuggingActivated;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__debugging_verbose)
|
|
||||||
protected RelativeLayout optionDebuggingVerbose;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__debugging_verbose_checkbox)
|
|
||||||
protected CheckBox checkboxDebuggingVerbose;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
AppLog.d(this, "onCreateView()");
|
AppLog.d(this, "onCreateView()");
|
||||||
|
@ -69,22 +57,14 @@ public class SettingsFragment__Debugging extends ThemedSettingsFragment {
|
||||||
@Override
|
@Override
|
||||||
protected void applyColorToViews() {
|
protected void applyColorToViews() {
|
||||||
ThemeHelper.updateTitleColor(titleDebugging);
|
ThemeHelper.updateTitleColor(titleDebugging);
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxDebuggingActivated);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxDebuggingVerbose);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void applySettingsToViews() {
|
protected void applySettingsToViews() {
|
||||||
checkboxDebuggingActivated.setChecked(getAppSettings().isLoggingEnabled());
|
|
||||||
checkboxDebuggingVerbose.setChecked(getAppSettings().isLoggingSpamEnabled());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setOnClickListenersOnViews() {
|
protected void setOnClickListenersOnViews() {
|
||||||
optionDebuggingActivated.setOnClickListener(this);
|
|
||||||
checkboxDebuggingActivated.setOnClickListener(this);
|
|
||||||
optionDebuggingVerbose.setOnClickListener(this);
|
|
||||||
checkboxDebuggingVerbose.setOnClickListener(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -105,16 +85,7 @@ public class SettingsFragment__Debugging extends ThemedSettingsFragment {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
switch (view.getId()) {
|
switch (view.getId()) {
|
||||||
case R.id.settings_activity__debugging_activated:
|
|
||||||
case R.id.settings_activity__debugging_activated_checkbox:
|
|
||||||
checkboxDebuggingActivated.setChecked(!getAppSettings().isLoggingEnabled());
|
|
||||||
getAppSettings().setLoggingEnabled(!getAppSettings().isLoggingEnabled());
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__debugging_verbose:
|
|
||||||
case R.id.settings_activity__debugging_verbose_checkbox:
|
|
||||||
checkboxDebuggingVerbose.setChecked(!getAppSettings().isLoggingSpamEnabled());
|
|
||||||
getAppSettings().setLoggingSpamEnabled(!getAppSettings().isLoggingSpamEnabled());
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,72 +40,12 @@ import butterknife.ButterKnife;
|
||||||
* Created by vanitas on 16.10.16.
|
* Created by vanitas on 16.10.16.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class SettingsFragment__NavigationSlider extends ThemedSettingsFragment {
|
public class SettingsFragment__NavigationSlider extends ThemedFragment {
|
||||||
public static final String TAG = "com.github.dfa.diaspora_android.SettingsFragment__NavigationSlider";
|
public static final String TAG = "com.github.dfa.diaspora_android.SettingsFragment__NavigationSlider";
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__header_appearance__nav_slider)
|
@BindView(R.id.settings_activity__header_appearance__nav_slider)
|
||||||
protected TextView titleNavSlider;
|
protected TextView titleNavSlider;
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_about)
|
|
||||||
protected RelativeLayout optionAbout;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_activities)
|
|
||||||
protected RelativeLayout optionActivities;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_aspects)
|
|
||||||
protected RelativeLayout optionAspects;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_commented)
|
|
||||||
protected RelativeLayout optionCommented;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_exit)
|
|
||||||
protected RelativeLayout optionExit;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_followed)
|
|
||||||
protected RelativeLayout optionFollowed;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_liked)
|
|
||||||
protected RelativeLayout optionLiked;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_mentions)
|
|
||||||
protected RelativeLayout optionMentions;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_profile)
|
|
||||||
protected RelativeLayout optionProfile;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_public)
|
|
||||||
protected RelativeLayout optionPublic;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_about_checkbox)
|
|
||||||
protected CheckBox checkboxAbout;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_activities_checkbox)
|
|
||||||
protected CheckBox checkboxActivities;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_aspects_checkbox)
|
|
||||||
protected CheckBox checkboxAspects;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_commented_checkbox)
|
|
||||||
protected CheckBox checkboxCommented;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_exit_checkbox)
|
|
||||||
protected CheckBox checkboxExit;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_followed_checkbox)
|
|
||||||
protected CheckBox checkboxFollowed;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_liked_checkbox)
|
|
||||||
protected CheckBox checkboxLiked;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_mentions_checkbox)
|
|
||||||
protected CheckBox checkboxMentions;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_profile_checkbox)
|
|
||||||
protected CheckBox checkboxProfile;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__navigation_slider_public_checkbox)
|
|
||||||
protected CheckBox checkboxPublic;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
AppLog.d(this, "onCreateView()");
|
AppLog.d(this, "onCreateView()");
|
||||||
|
@ -117,100 +57,6 @@ public class SettingsFragment__NavigationSlider extends ThemedSettingsFragment {
|
||||||
@Override
|
@Override
|
||||||
protected void applyColorToViews() {
|
protected void applyColorToViews() {
|
||||||
ThemeHelper.updateTitleColor(titleNavSlider);
|
ThemeHelper.updateTitleColor(titleNavSlider);
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxAbout);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxActivities);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxAspects);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxCommented);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxExit);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxFollowed);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxLiked);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxMentions);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxProfile);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxPublic);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void applySettingsToViews() {
|
|
||||||
checkboxAbout.setChecked(getAppSettings().isVisibleInNavHelp_license());
|
|
||||||
checkboxActivities.setChecked(getAppSettings().isVisibleInNavActivities());
|
|
||||||
checkboxAspects.setChecked(getAppSettings().isVisibleInNavAspects());
|
|
||||||
checkboxCommented.setChecked(getAppSettings().isVisibleInNavCommented());
|
|
||||||
checkboxExit.setChecked(getAppSettings().isVisibleInNavExit());
|
|
||||||
checkboxFollowed.setChecked(getAppSettings().isVisibleInNavFollowed_tags());
|
|
||||||
checkboxLiked.setChecked(getAppSettings().isVisibleInNavLiked());
|
|
||||||
checkboxMentions.setChecked(getAppSettings().isVisibleInNavMentions());
|
|
||||||
checkboxProfile.setChecked(getAppSettings().isVisibleInNavProfile());
|
|
||||||
checkboxPublic.setChecked(getAppSettings().isVisibleInNavPublic_activities());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void setOnClickListenersOnViews() {
|
|
||||||
checkboxAbout.setOnClickListener(this);
|
|
||||||
checkboxActivities.setOnClickListener(this);
|
|
||||||
checkboxAspects.setOnClickListener(this);
|
|
||||||
checkboxCommented.setOnClickListener(this);
|
|
||||||
checkboxExit.setOnClickListener(this);
|
|
||||||
checkboxFollowed.setOnClickListener(this);
|
|
||||||
checkboxLiked.setOnClickListener(this);
|
|
||||||
checkboxMentions.setOnClickListener(this);
|
|
||||||
checkboxProfile.setOnClickListener(this);
|
|
||||||
checkboxPublic.setOnClickListener(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
switch (view.getId()) {
|
|
||||||
case R.id.settings_activity__navigation_slider_about:
|
|
||||||
case R.id.settings_activity__navigation_slider_about_checkbox:
|
|
||||||
checkboxAbout.setChecked(!getAppSettings().isVisibleInNavHelp_license());
|
|
||||||
getAppSettings().setVisibleInNavHelp_license(!getAppSettings().isVisibleInNavHelp_license());
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__navigation_slider_activities:
|
|
||||||
case R.id.settings_activity__navigation_slider_activities_checkbox:
|
|
||||||
checkboxActivities.setChecked(!getAppSettings().isVisibleInNavActivities());
|
|
||||||
getAppSettings().setVisibleInNavActivities(!getAppSettings().isVisibleInNavActivities());
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__navigation_slider_aspects:
|
|
||||||
case R.id.settings_activity__navigation_slider_aspects_checkbox:
|
|
||||||
checkboxAspects.setChecked(!getAppSettings().isVisibleInNavAspects());
|
|
||||||
getAppSettings().setVisibleInNavAspects(!getAppSettings().isVisibleInNavAspects());
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__navigation_slider_commented:
|
|
||||||
case R.id.settings_activity__navigation_slider_commented_checkbox:
|
|
||||||
checkboxCommented.setChecked(!getAppSettings().isVisibleInNavCommented());
|
|
||||||
getAppSettings().setVisibleInNavCommented(!getAppSettings().isVisibleInNavCommented());
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__navigation_slider_exit:
|
|
||||||
case R.id.settings_activity__navigation_slider_exit_checkbox:
|
|
||||||
checkboxExit.setChecked(!getAppSettings().isVisibleInNavExit());
|
|
||||||
getAppSettings().setVisibleInNavExit(!getAppSettings().isVisibleInNavExit());
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__navigation_slider_followed:
|
|
||||||
case R.id.settings_activity__navigation_slider_followed_checkbox:
|
|
||||||
checkboxFollowed.setChecked(!getAppSettings().isVisibleInNavFollowed_tags());
|
|
||||||
getAppSettings().setVisibleInNavFollowedTags(!getAppSettings().isVisibleInNavFollowed_tags());
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__navigation_slider_liked:
|
|
||||||
case R.id.settings_activity__navigation_slider_liked_checkbox:
|
|
||||||
checkboxLiked.setChecked(!getAppSettings().isVisibleInNavLiked());
|
|
||||||
getAppSettings().setVisibleInNavLiked(!getAppSettings().isVisibleInNavLiked());
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__navigation_slider_mentions:
|
|
||||||
case R.id.settings_activity__navigation_slider_mentions_checkbox:
|
|
||||||
checkboxMentions.setChecked(!getAppSettings().isVisibleInNavMentions());
|
|
||||||
getAppSettings().setVisibleInNavMentions(!getAppSettings().isVisibleInNavMentions());
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__navigation_slider_profile:
|
|
||||||
case R.id.settings_activity__navigation_slider_profile_checkbox:
|
|
||||||
checkboxProfile.setChecked(!getAppSettings().isVisibleInNavProfile());
|
|
||||||
getAppSettings().setVisibleInNavProfile(!getAppSettings().isVisibleInNavProfile());
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__navigation_slider_public:
|
|
||||||
case R.id.settings_activity__navigation_slider_public_checkbox:
|
|
||||||
checkboxPublic.setChecked(!getAppSettings().isVisibleInNavPublic_activities());
|
|
||||||
getAppSettings().setVisibleInNavPublic_activities(!getAppSettings().isVisibleInNavPublic_activities());
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -28,10 +28,8 @@ import android.view.MenuInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.AdapterView;
|
import android.widget.AdapterView;
|
||||||
import android.widget.CheckBox;
|
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.RelativeLayout;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.R;
|
import com.github.dfa.diaspora_android.R;
|
||||||
|
@ -64,33 +62,9 @@ public class SettingsFragment__Overview extends ThemedSettingsFragment {
|
||||||
@BindView(R.id.settings_activity__font_size)
|
@BindView(R.id.settings_activity__font_size)
|
||||||
protected LinearLayout optionFontSize;
|
protected LinearLayout optionFontSize;
|
||||||
|
|
||||||
//@BindView(R.id.settings_activity__intellihide_toolbars)
|
|
||||||
protected RelativeLayout optionIntellihideToolbars;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__extended_notifications)
|
|
||||||
protected RelativeLayout optionExtendedNotifications;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__append_shared_via_app)
|
|
||||||
protected RelativeLayout optionAppendSharedViaApp;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__chrome_custom_tabs)
|
|
||||||
protected RelativeLayout optionCustomTabs;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__font_size_hint)
|
@BindView(R.id.settings_activity__font_size_hint)
|
||||||
protected TextView hintFontSize;
|
protected TextView hintFontSize;
|
||||||
|
|
||||||
//@BindView(R.id.settings_activity__intellihide_toolbars_checkbox)
|
|
||||||
protected CheckBox checkboxIntellihide;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__extended_notifications_checkbox)
|
|
||||||
protected CheckBox checkboxExtendedNotifications;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__append_shared_via_app_checkbox)
|
|
||||||
protected CheckBox checkboxAppendSharedViaApp;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__chrome_custom_tabs_checkbox)
|
|
||||||
protected CheckBox checkboxCustomTabs;
|
|
||||||
|
|
||||||
//Pod Settings
|
//Pod Settings
|
||||||
@BindView(R.id.settings_activity__header_pod_settings)
|
@BindView(R.id.settings_activity__header_pod_settings)
|
||||||
protected TextView titlePodSettings;
|
protected TextView titlePodSettings;
|
||||||
|
@ -111,18 +85,12 @@ public class SettingsFragment__Overview extends ThemedSettingsFragment {
|
||||||
@BindView(R.id.settings_activity__header_network)
|
@BindView(R.id.settings_activity__header_network)
|
||||||
protected TextView titleNetwork;
|
protected TextView titleNetwork;
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__load_images)
|
|
||||||
protected RelativeLayout optionLoadImages;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__clear_cache)
|
@BindView(R.id.settings_activity__clear_cache)
|
||||||
protected LinearLayout optionClearCache;
|
protected LinearLayout optionClearCache;
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__proxy_settings)
|
@BindView(R.id.settings_activity__proxy_settings)
|
||||||
protected LinearLayout optionProxySettings;
|
protected LinearLayout optionProxySettings;
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__load_images_checkbox)
|
|
||||||
protected CheckBox checkboxLoadImages;
|
|
||||||
|
|
||||||
//More
|
//More
|
||||||
@BindView(R.id.settings_activity__header_more)
|
@BindView(R.id.settings_activity__header_more)
|
||||||
protected TextView titleMore;
|
protected TextView titleMore;
|
||||||
|
@ -148,11 +116,6 @@ public class SettingsFragment__Overview extends ThemedSettingsFragment {
|
||||||
|
|
||||||
protected void applySettingsToViews() {
|
protected void applySettingsToViews() {
|
||||||
hintFontSize.setText(getAppSettings().getMinimumFontSizeString());
|
hintFontSize.setText(getAppSettings().getMinimumFontSizeString());
|
||||||
//checkboxIntellihide.setChecked(getAppSettings().isIntellihideToolbars());
|
|
||||||
checkboxExtendedNotifications.setChecked(getAppSettings().isExtendedNotifications());
|
|
||||||
checkboxAppendSharedViaApp.setChecked(getAppSettings().isAppendSharedViaApp());
|
|
||||||
checkboxCustomTabs.setChecked(getAppSettings().isChromeCustomTabsEnabled());
|
|
||||||
checkboxLoadImages.setChecked(getAppSettings().isLoadImages());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setOnClickListenersOnViews() {
|
protected void setOnClickListenersOnViews() {
|
||||||
|
@ -160,22 +123,12 @@ public class SettingsFragment__Overview extends ThemedSettingsFragment {
|
||||||
optionThemeColors.setOnClickListener(this);
|
optionThemeColors.setOnClickListener(this);
|
||||||
optionNavigationSlider.setOnClickListener(this);
|
optionNavigationSlider.setOnClickListener(this);
|
||||||
optionFontSize.setOnClickListener(this);
|
optionFontSize.setOnClickListener(this);
|
||||||
//optionIntellihideToolbars.setOnClickListener(this);
|
|
||||||
//checkboxIntellihide.setOnClickListener(this);
|
|
||||||
optionExtendedNotifications.setOnClickListener(this);
|
|
||||||
checkboxExtendedNotifications.setOnClickListener(this);
|
|
||||||
optionAppendSharedViaApp.setOnClickListener(this);
|
|
||||||
checkboxAppendSharedViaApp.setOnClickListener(this);
|
|
||||||
optionCustomTabs.setOnClickListener(this);
|
|
||||||
checkboxCustomTabs.setOnClickListener(this);
|
|
||||||
/** Pod Settings */
|
/** Pod Settings */
|
||||||
optionPersonalSettings.setOnClickListener(this);
|
optionPersonalSettings.setOnClickListener(this);
|
||||||
optionManageTags.setOnClickListener(this);
|
optionManageTags.setOnClickListener(this);
|
||||||
optionManageContacts.setOnClickListener(this);
|
optionManageContacts.setOnClickListener(this);
|
||||||
optionChangeAccount.setOnClickListener(this);
|
optionChangeAccount.setOnClickListener(this);
|
||||||
/** Network */
|
/** Network */
|
||||||
optionLoadImages.setOnClickListener(this);
|
|
||||||
checkboxLoadImages.setOnClickListener(this);
|
|
||||||
optionClearCache.setOnClickListener(this);
|
optionClearCache.setOnClickListener(this);
|
||||||
optionProxySettings.setOnClickListener(this);
|
optionProxySettings.setOnClickListener(this);
|
||||||
/** More */
|
/** More */
|
||||||
|
@ -191,12 +144,6 @@ public class SettingsFragment__Overview extends ThemedSettingsFragment {
|
||||||
ThemeHelper.updateTitleColor(titlePodSettings);
|
ThemeHelper.updateTitleColor(titlePodSettings);
|
||||||
ThemeHelper.updateTitleColor(titleNetwork);
|
ThemeHelper.updateTitleColor(titleNetwork);
|
||||||
ThemeHelper.updateTitleColor(titleMore);
|
ThemeHelper.updateTitleColor(titleMore);
|
||||||
//Checkboxes
|
|
||||||
//ThemeHelper.updateCheckBoxColor(checkboxIntellihide);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxExtendedNotifications);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxAppendSharedViaApp);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxCustomTabs);
|
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxLoadImages);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void showFontSizeDialog() {
|
protected void showFontSizeDialog() {
|
||||||
|
@ -248,26 +195,6 @@ public class SettingsFragment__Overview extends ThemedSettingsFragment {
|
||||||
case R.id.settings_activity__font_size:
|
case R.id.settings_activity__font_size:
|
||||||
showFontSizeDialog();
|
showFontSizeDialog();
|
||||||
break;
|
break;
|
||||||
//case R.id.settings_activity__intellihide_toolbars:
|
|
||||||
//case R.id.settings_activity__intellihide_toolbars_checkbox:
|
|
||||||
// checkboxIntellihide.setChecked(!getAppSettings().isIntellihideToolbars());
|
|
||||||
// getAppSettings().setIntellihideToolbars(!getAppSettings().isIntellihideToolbars());
|
|
||||||
// break;
|
|
||||||
case R.id.settings_activity__extended_notifications:
|
|
||||||
case R.id.settings_activity__extended_notifications_checkbox:
|
|
||||||
checkboxExtendedNotifications.setChecked(!getAppSettings().isExtendedNotifications());
|
|
||||||
getAppSettings().setExtendedNotifications(!getAppSettings().isExtendedNotifications());
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__append_shared_via_app:
|
|
||||||
case R.id.settings_activity__append_shared_via_app_checkbox:
|
|
||||||
checkboxAppendSharedViaApp.setChecked(!getAppSettings().isAppendSharedViaApp());
|
|
||||||
getAppSettings().setAppendSharedViaApp(!getAppSettings().isAppendSharedViaApp());
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__chrome_custom_tabs:
|
|
||||||
case R.id.settings_activity__chrome_custom_tabs_checkbox:
|
|
||||||
checkboxCustomTabs.setChecked(!getAppSettings().isChromeCustomTabsEnabled());
|
|
||||||
getAppSettings().setChromeCustomTabsEnabled(!getAppSettings().isChromeCustomTabsEnabled());
|
|
||||||
break;
|
|
||||||
/** Pod Settings */
|
/** Pod Settings */
|
||||||
case R.id.settings_activity__personal_settings: {
|
case R.id.settings_activity__personal_settings: {
|
||||||
Intent intent = new Intent(getActivity(), MainActivity.class);
|
Intent intent = new Intent(getActivity(), MainActivity.class);
|
||||||
|
@ -310,11 +237,6 @@ public class SettingsFragment__Overview extends ThemedSettingsFragment {
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
/** Network */
|
/** Network */
|
||||||
case R.id.settings_activity__load_images:
|
|
||||||
case R.id.settings_activity__load_images_checkbox:
|
|
||||||
checkboxLoadImages.setChecked(!getAppSettings().isLoadImages());
|
|
||||||
getAppSettings().setLoadImages(!getAppSettings().isLoadImages());
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__clear_cache: {
|
case R.id.settings_activity__clear_cache: {
|
||||||
Intent intent = new Intent(getActivity(), MainActivity.class);
|
Intent intent = new Intent(getActivity(), MainActivity.class);
|
||||||
intent.setAction(MainActivity.ACTION_CLEAR_CACHE);
|
intent.setAction(MainActivity.ACTION_CLEAR_CACHE);
|
||||||
|
|
|
@ -28,13 +28,14 @@ import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.github.dfa.diaspora_android.R;
|
import com.github.dfa.diaspora_android.R;
|
||||||
|
import com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference;
|
||||||
import com.github.dfa.diaspora_android.util.AppLog;
|
import com.github.dfa.diaspora_android.util.AppLog;
|
||||||
import com.github.dfa.diaspora_android.util.theming.ThemeHelper;
|
import com.github.dfa.diaspora_android.util.theming.ThemeHelper;
|
||||||
|
|
||||||
|
@ -52,11 +53,8 @@ public class SettingsFragment__Proxy extends ThemedSettingsFragment {
|
||||||
@BindView(R.id.settings_activity__header_network__proxy)
|
@BindView(R.id.settings_activity__header_network__proxy)
|
||||||
protected TextView titleProxy;
|
protected TextView titleProxy;
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__proxy_activated)
|
@BindView(R.id.settings_activity__proxy_enabled)
|
||||||
protected RelativeLayout optionProxyActivated;
|
protected ThemedCheckBoxPreference checkboxProxyEna;
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__proxy_activated_checkbox)
|
|
||||||
protected CheckBox checkboxProxyActivated;
|
|
||||||
|
|
||||||
@BindView(R.id.settings_activity__proxy_host)
|
@BindView(R.id.settings_activity__proxy_host)
|
||||||
protected LinearLayout optionProxyHost;
|
protected LinearLayout optionProxyHost;
|
||||||
|
@ -84,7 +82,6 @@ public class SettingsFragment__Proxy extends ThemedSettingsFragment {
|
||||||
@Override
|
@Override
|
||||||
protected void applyColorToViews() {
|
protected void applyColorToViews() {
|
||||||
ThemeHelper.updateTitleColor(titleProxy);
|
ThemeHelper.updateTitleColor(titleProxy);
|
||||||
ThemeHelper.updateCheckBoxColor(checkboxProxyActivated);
|
|
||||||
optionProxyHost.setVisibility(getAppSettings().isProxyHttpEnabled() ? View.VISIBLE : View.GONE);
|
optionProxyHost.setVisibility(getAppSettings().isProxyHttpEnabled() ? View.VISIBLE : View.GONE);
|
||||||
optionProxyPort.setVisibility(getAppSettings().isProxyHttpEnabled() ? View.VISIBLE : View.GONE);
|
optionProxyPort.setVisibility(getAppSettings().isProxyHttpEnabled() ? View.VISIBLE : View.GONE);
|
||||||
optionProxyOrbotPreset.setVisibility(getAppSettings().isProxyHttpEnabled() ? View.VISIBLE : View.GONE);
|
optionProxyOrbotPreset.setVisibility(getAppSettings().isProxyHttpEnabled() ? View.VISIBLE : View.GONE);
|
||||||
|
@ -93,7 +90,6 @@ public class SettingsFragment__Proxy extends ThemedSettingsFragment {
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
@Override
|
@Override
|
||||||
protected void applySettingsToViews() {
|
protected void applySettingsToViews() {
|
||||||
checkboxProxyActivated.setChecked(getAppSettings().isProxyHttpEnabled());
|
|
||||||
optionProxyHost.setEnabled(getAppSettings().isProxyHttpEnabled());
|
optionProxyHost.setEnabled(getAppSettings().isProxyHttpEnabled());
|
||||||
hintProxyHost.setText(getAppSettings().getProxyHttpHost());
|
hintProxyHost.setText(getAppSettings().getProxyHttpHost());
|
||||||
optionProxyPort.setEnabled(getAppSettings().isProxyHttpEnabled());
|
optionProxyPort.setEnabled(getAppSettings().isProxyHttpEnabled());
|
||||||
|
@ -103,8 +99,17 @@ public class SettingsFragment__Proxy extends ThemedSettingsFragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setOnClickListenersOnViews() {
|
protected void setOnClickListenersOnViews() {
|
||||||
optionProxyActivated.setOnClickListener(this);
|
checkboxProxyEna.setOnCheckedChangedListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
checkboxProxyActivated.setOnClickListener(this);
|
@Override
|
||||||
|
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
||||||
|
optionProxyHost.setEnabled(b);
|
||||||
|
optionProxyPort.setEnabled(b);
|
||||||
|
optionProxyOrbotPreset.setEnabled(b);
|
||||||
|
optionProxyHost.setVisibility(b ? View.VISIBLE : View.GONE);
|
||||||
|
optionProxyPort.setVisibility(b ? View.VISIBLE : View.GONE);
|
||||||
|
optionProxyOrbotPreset.setVisibility(b ? View.VISIBLE : View.GONE);
|
||||||
|
}
|
||||||
|
});
|
||||||
optionProxyHost.setOnClickListener(this);
|
optionProxyHost.setOnClickListener(this);
|
||||||
optionProxyPort.setOnClickListener(this);
|
optionProxyPort.setOnClickListener(this);
|
||||||
optionProxyOrbotPreset.setOnClickListener(this);
|
optionProxyOrbotPreset.setOnClickListener(this);
|
||||||
|
@ -114,18 +119,6 @@ public class SettingsFragment__Proxy extends ThemedSettingsFragment {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
switch (view.getId()) {
|
switch (view.getId()) {
|
||||||
case R.id.settings_activity__proxy_activated:
|
|
||||||
case R.id.settings_activity__proxy_activated_checkbox:
|
|
||||||
boolean proxyEnabled = !getAppSettings().isProxyHttpEnabled();
|
|
||||||
checkboxProxyActivated.setChecked(proxyEnabled);
|
|
||||||
getAppSettings().setProxyHttpEnabled(proxyEnabled);
|
|
||||||
optionProxyHost.setEnabled(proxyEnabled);
|
|
||||||
optionProxyPort.setEnabled(proxyEnabled);
|
|
||||||
optionProxyOrbotPreset.setEnabled(proxyEnabled);
|
|
||||||
optionProxyHost.setVisibility(getAppSettings().isProxyHttpEnabled() ? View.VISIBLE : View.GONE);
|
|
||||||
optionProxyPort.setVisibility(getAppSettings().isProxyHttpEnabled() ? View.VISIBLE : View.GONE);
|
|
||||||
optionProxyOrbotPreset.setVisibility(getAppSettings().isProxyHttpEnabled() ? View.VISIBLE : View.GONE);
|
|
||||||
break;
|
|
||||||
case R.id.settings_activity__proxy_host:
|
case R.id.settings_activity__proxy_host:
|
||||||
showProxyHostDialog();
|
showProxyHostDialog();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -177,13 +177,13 @@ public class SettingsFragment__ThemeColors extends ThemedSettingsFragment {
|
||||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialogInterface, int i) {
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
if (type == 1) {
|
if (type == 1) { //Primary Color
|
||||||
appSettings.setPrimaryColorPickerSettings(base.getColor(), shade.getColor());
|
appSettings.setPrimaryColorPickerSettings(base.getColor(), shade.getColor());
|
||||||
if (Build.VERSION.SDK_INT >= 21) {
|
if (Build.VERSION.SDK_INT >= 21) {
|
||||||
getActivity().getWindow().setStatusBarColor(ThemeHelper.getPrimaryDarkColor());
|
getActivity().getWindow().setStatusBarColor(ThemeHelper.getPrimaryDarkColor());
|
||||||
}
|
}
|
||||||
((ThemedActivity) getActivity()).applyColorToViews();
|
((ThemedActivity) getActivity()).applyColorToViews();
|
||||||
} else {
|
} else { //Accent Color
|
||||||
appSettings.setAccentColorPickerSettings(base.getColor(), shade.getColor());
|
appSettings.setAccentColorPickerSettings(base.getColor(), shade.getColor());
|
||||||
}
|
}
|
||||||
applyColorToViews();
|
applyColorToViews();
|
||||||
|
|
|
@ -2,9 +2,7 @@ package com.github.dfa.diaspora_android.ui;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
import android.graphics.Rect;
|
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.MotionEvent;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
|
@ -14,6 +12,7 @@ import android.widget.TextView;
|
||||||
import com.github.dfa.diaspora_android.R;
|
import com.github.dfa.diaspora_android.R;
|
||||||
import com.github.dfa.diaspora_android.data.AppSettings;
|
import com.github.dfa.diaspora_android.data.AppSettings;
|
||||||
import com.github.dfa.diaspora_android.util.AppLog;
|
import com.github.dfa.diaspora_android.util.AppLog;
|
||||||
|
import com.github.dfa.diaspora_android.util.theming.ThemeHelper;
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
|
@ -34,6 +33,8 @@ public class ThemedCheckBoxPreference extends RelativeLayout {
|
||||||
|
|
||||||
protected String prefKey;
|
protected String prefKey;
|
||||||
protected boolean defaultValue;
|
protected boolean defaultValue;
|
||||||
|
protected AppSettings appSettings;
|
||||||
|
protected CompoundButton.OnCheckedChangeListener externalOnCheckedChangedListener;
|
||||||
|
|
||||||
public ThemedCheckBoxPreference(Context context) {
|
public ThemedCheckBoxPreference(Context context) {
|
||||||
super(context);
|
super(context);
|
||||||
|
@ -51,6 +52,7 @@ public class ThemedCheckBoxPreference extends RelativeLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void init(Context context, AttributeSet attrs) {
|
protected void init(Context context, AttributeSet attrs) {
|
||||||
|
appSettings = new AppSettings(context.getApplicationContext());
|
||||||
View.inflate(context, R.layout.preference__themed_checkbox, this);
|
View.inflate(context, R.layout.preference__themed_checkbox, this);
|
||||||
ButterKnife.bind(this);
|
ButterKnife.bind(this);
|
||||||
setDescendantFocusability(FOCUS_BLOCK_DESCENDANTS);
|
setDescendantFocusability(FOCUS_BLOCK_DESCENDANTS);
|
||||||
|
@ -63,14 +65,13 @@ public class ThemedCheckBoxPreference extends RelativeLayout {
|
||||||
|
|
||||||
// Assign custom attributes
|
// Assign custom attributes
|
||||||
if (attrs != null) {
|
if (attrs != null) {
|
||||||
|
String titleText = "";
|
||||||
|
String summaryText = "";
|
||||||
|
|
||||||
TypedArray a = context.getTheme().obtainStyledAttributes(
|
TypedArray a = context.getTheme().obtainStyledAttributes(
|
||||||
attrs,
|
attrs,
|
||||||
R.styleable.ThemedCheckBoxPreference,
|
R.styleable.ThemedCheckBoxPreference,
|
||||||
0, 0);
|
0, 0);
|
||||||
|
|
||||||
String titleText = "";
|
|
||||||
String summaryText = "";
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
titleText = a.getString(R.styleable.ThemedCheckBoxPreference_titleText);
|
titleText = a.getString(R.styleable.ThemedCheckBoxPreference_titleText);
|
||||||
summaryText = a.getString(R.styleable.ThemedCheckBoxPreference_summaryText);
|
summaryText = a.getString(R.styleable.ThemedCheckBoxPreference_summaryText);
|
||||||
|
@ -82,20 +83,33 @@ public class ThemedCheckBoxPreference extends RelativeLayout {
|
||||||
a.recycle();
|
a.recycle();
|
||||||
}
|
}
|
||||||
|
|
||||||
final AppSettings appSettings = new AppSettings(context);
|
|
||||||
|
|
||||||
setTitleText(titleText);
|
setTitleText(titleText);
|
||||||
|
if(titleText == null || titleText.equals("")) {
|
||||||
|
title.setVisibility(GONE);
|
||||||
|
}
|
||||||
setSummaryText(summaryText);
|
setSummaryText(summaryText);
|
||||||
|
if(summaryText == null || summaryText.equals("")) {
|
||||||
|
summary.setVisibility(GONE);
|
||||||
|
}
|
||||||
setChecked(appSettings.getThemedCheckboxPreferenceBoolean(this));
|
setChecked(appSettings.getThemedCheckboxPreferenceBoolean(this));
|
||||||
setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
|
||||||
appSettings.setThemedCheckboxPreferenceBoolean(ThemedCheckBoxPreference.this, b);
|
appSettings.setThemedCheckboxPreferenceBoolean(ThemedCheckBoxPreference.this, b);
|
||||||
|
if(externalOnCheckedChangedListener != null) {
|
||||||
|
externalOnCheckedChangedListener.onCheckedChanged(compoundButton, b);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
applyColor();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void applyColor() {
|
||||||
|
ThemeHelper.getInstance(appSettings);
|
||||||
|
ThemeHelper.updateCheckBoxColor(checkBox);
|
||||||
|
}
|
||||||
|
|
||||||
public void setTitleText(String text) {
|
public void setTitleText(String text) {
|
||||||
title.setText(text);
|
title.setText(text);
|
||||||
}
|
}
|
||||||
|
@ -108,9 +122,8 @@ public class ThemedCheckBoxPreference extends RelativeLayout {
|
||||||
checkBox.setChecked(checked);
|
checkBox.setChecked(checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setOnCheckedChangedListener(CompoundButton.OnCheckedChangeListener listener) {
|
||||||
public void setOnCheckedChangeListener(CompoundButton.OnCheckedChangeListener listener) {
|
externalOnCheckedChangedListener = listener;
|
||||||
checkBox.setOnCheckedChangeListener(listener);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPrefKey() {
|
public String getPrefKey() {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/preference__themed_checkbox__root"
|
android:id="@+id/preference__themed_checkbox__root"
|
||||||
|
@ -12,6 +11,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
android:layout_toStartOf="@+id/preference__themed_checkbox__checkbox">
|
android:layout_toStartOf="@+id/preference__themed_checkbox__checkbox">
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/preference__themed_checkbox__title"
|
android:id="@+id/preference__themed_checkbox__title"
|
||||||
|
@ -21,7 +21,8 @@
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/preference__themed_checkbox__summary"
|
android:id="@+id/preference__themed_checkbox__summary"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"
|
||||||
|
android:minHeight="0dp"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<CheckBox
|
<CheckBox
|
||||||
android:id="@+id/preference__themed_checkbox__checkbox"
|
android:id="@+id/preference__themed_checkbox__checkbox"
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
android:layout_gravity="center_vertical">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
style="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:id="@+id/preference__themed_checkbox__title"/>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/preference__themed_checkbox__summary"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<CheckBox
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:id="@+id/preference__themed_checkbox__checkbox"/>
|
|
||||||
</merge>
|
|
19
app/src/main/res/layout/preference__themed_edittext.xml
Normal file
19
app/src/main/res/layout/preference__themed_edittext.xml
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/preference__themed_edittext_root"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
||||||
|
android:layout_marginTop="@dimen/activity_vertical_margin"
|
||||||
|
android:clickable="true">
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/preference__themed_edittext_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/preference__themed_edittext_summary"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
</LinearLayout>
|
|
@ -81,132 +81,30 @@
|
||||||
app:prefKey="@string/pref_key__intellihide_toolbars"
|
app:prefKey="@string/pref_key__intellihide_toolbars"
|
||||||
app:defaultValue="true" />
|
app:defaultValue="true" />
|
||||||
|
|
||||||
<!--<RelativeLayout
|
|
||||||
android:id="@+id/settings_activity__intellihide_toolbars"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
|
||||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
|
||||||
android:clickable="true">
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__intellihide_toolbars_checkbox">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/pref_title__intellihide_toolbars"/>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/pref_desc__intellihide_toolbars"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__intellihide_toolbars_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Dropdown Notifications -->
|
<!-- Dropdown Notifications -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__extended_notifications"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
app:titleText="@string/pref_title__extended_notifications"
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
app:summaryText="@string/pref_desc__extended_notifications"
|
||||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
app:prefKey="@string/pref_key__extended_notifications"
|
||||||
android:clickable="true">
|
app:defaultValue="false" />
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__extended_notifications_checkbox">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/pref_title__extended_notifications"/>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/pref_desc__extended_notifications"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__extended_notifications_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Share reference to app -->
|
<!-- Share reference to app -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__append_shared_via_app"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
app:titleText="@string/pref_title__append_shared_via_app"
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
app:summaryText="@string/pref_desc__append_shared_via_app"
|
||||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
app:prefKey="@string/pref_key__append_shared_via_app"
|
||||||
android:clickable="true">
|
app:defaultValue="true" />
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__append_shared_via_app_checkbox">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/pref_title__append_shared_via_app"/>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/pref_desc__append_shared_via_app"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__append_shared_via_app_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Chrome custom tabs -->
|
<!-- Chrome custom tabs -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__chrome_custom_tabs"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
app:titleText="@string/pref_title__chrome_custom_tabs_enabled"
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
app:summaryText="@string/pref_desc__chrome_custom_tabs_enabled"
|
||||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
app:prefKey="@string/pref_key__chrome_custom_tabs_enabled"
|
||||||
android:clickable="true">
|
app:defaultValue="true" />
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__chrome_custom_tabs_checkbox">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/pref_title__chrome_custom_tabs_enabled"/>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/pref_desc__chrome_custom_tabs_enabled"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__chrome_custom_tabs_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
|
@ -1,6 +1,8 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:orientation="vertical" android:layout_width="match_parent"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_margin="@dimen/activity_horizontal_margin_half">
|
android:layout_margin="@dimen/activity_horizontal_margin_half">
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -11,36 +13,13 @@
|
||||||
android:text="@string/pref_cat__network"/>
|
android:text="@string/pref_cat__network"/>
|
||||||
|
|
||||||
<!-- Load images -->
|
<!-- Load images -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__load_images"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
app:titleText="@string/pref_title__load_images"
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
app:summaryText="@string/pref_desc__load_images"
|
||||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
app:prefKey="@string/pref_key__load_images"
|
||||||
android:clickable="true">
|
app:defaultValue="true" />
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__load_images_checkbox">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/pref_title__load_images"/>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/pref_desc__load_images"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__load_images_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_alignParentEnd="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Clear cache -->
|
<!-- Clear cache -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
|
@ -28,68 +28,20 @@
|
||||||
android:text="@string/pref_title__sub_logging"/>
|
android:text="@string/pref_title__sub_logging"/>
|
||||||
|
|
||||||
<!-- Debug Protocol -->
|
<!-- Debug Protocol -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__debugging_activated"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
app:titleText="@string/pref_title__logging_enabled"
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
app:prefKey="@string/pref_key__logging_enabled"
|
||||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
app:defaultValue="true"/>
|
||||||
android:clickable="true">
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__debugging_activated_checkbox">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/pref_title__logging_enabled"/>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Fix me!"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__debugging_activated_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Verbose debugging -->
|
<!-- Verbose debugging -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__debugging_verbose"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
app:titleText="@string/pref_title__logging_spam_enabled"
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
app:prefKey="@string/pref_key__logging_spam_enabled"
|
||||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
app:defaultValue="true"/>
|
||||||
android:clickable="true">
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__debugging_verbose_checkbox">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/pref_title__logging_spam_enabled"/>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Fix me too!"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__debugging_verbose_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
|
|
|
@ -31,234 +31,84 @@
|
||||||
<!-- Entries -->
|
<!-- Entries -->
|
||||||
|
|
||||||
<!-- Profile -->
|
<!-- Profile -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__navigation_slider_profile"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/card_spacing"
|
app:titleText="@string/nav_profile"
|
||||||
android:clickable="true">
|
app:prefKey="@string/pref_key__visibility_nav__profile"
|
||||||
<TextView
|
app:defaultValue="true"/>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/nav_profile"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__navigation_slider_profile_checkbox"/>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__navigation_slider_profile_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Followed Tags -->
|
<!-- Followed Tags -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__navigation_slider_followed"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/card_spacing"
|
app:titleText="@string/nav_followed_tags"
|
||||||
android:clickable="true">
|
app:prefKey="@string/pref_key__visibility_nav__followed_tags"
|
||||||
<TextView
|
app:defaultValue="true"/>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/nav_followed_tags"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__navigation_slider_followed_checkbox"/>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__navigation_slider_followed_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Aspects -->
|
<!-- Aspects -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__navigation_slider_aspects"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/card_spacing"
|
app:titleText="@string/nav_aspects"
|
||||||
android:clickable="true">
|
app:prefKey="@string/pref_key__visibility_nav__aspects"
|
||||||
<TextView
|
app:defaultValue="true"/>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/nav_aspects"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__navigation_slider_aspects_checkbox"/>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__navigation_slider_aspects_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Activities -->
|
<!-- Activities -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__navigation_slider_activities"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/card_spacing"
|
app:titleText="@string/nav_activities"
|
||||||
android:clickable="true">
|
app:prefKey="@string/pref_key__visibility_nav__activities"
|
||||||
<TextView
|
app:defaultValue="false"/>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/nav_activities"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__navigation_slider_activities_checkbox"/>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__navigation_slider_activities_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Liked -->
|
<!-- Liked -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__navigation_slider_liked"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/card_spacing"
|
app:titleText="@string/nav_liked"
|
||||||
android:clickable="true">
|
app:prefKey="@string/pref_key__visibility_nav__liked"
|
||||||
<TextView
|
app:defaultValue="true"/>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/nav_liked"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__navigation_slider_liked_checkbox"/>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__navigation_slider_liked_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Commented -->
|
<!-- Commented -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__navigation_slider_commented"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/card_spacing"
|
app:titleText="@string/nav_commented"
|
||||||
android:clickable="true">
|
app:prefKey="@string/pref_key__visibility_nav__commented"
|
||||||
<TextView
|
app:defaultValue="true"/>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/nav_commented"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__navigation_slider_commented_checkbox"/>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__navigation_slider_commented_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Mentions -->
|
<!-- Mentions -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__navigation_slider_mentions"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/card_spacing"
|
app:titleText="@string/nav_mentions"
|
||||||
android:clickable="true">
|
app:prefKey="@string/pref_key__visibility_nav__mentions"
|
||||||
<TextView
|
app:defaultValue="false"/>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/nav_mentions"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__navigation_slider_mentions_checkbox"/>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__navigation_slider_mentions_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Public Activities -->
|
<!-- Public Activities -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__navigation_slider_public"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/card_spacing"
|
app:titleText="@string/nav_public_activities"
|
||||||
android:clickable="true">
|
app:prefKey="@string/pref_key__visibility_nav__public_activities"
|
||||||
<TextView
|
app:defaultValue="false"/>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/nav_public_activities"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__navigation_slider_public_checkbox"/>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__navigation_slider_public_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Exit -->
|
<!-- Exit -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__navigation_slider_exit"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/card_spacing"
|
app:titleText="@string/action_exit_app"
|
||||||
android:clickable="true">
|
app:prefKey="@string/pref_key__visibility_nav__exit"
|
||||||
<TextView
|
app:defaultValue="false"/>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/action_exit_app"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__navigation_slider_exit_checkbox"/>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__navigation_slider_exit_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- About -->
|
<!-- About -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__navigation_slider_about"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/card_spacing"
|
app:titleText="@string/nav_help_license"
|
||||||
android:clickable="true">
|
app:prefKey="@string/pref_key__visibility_nav__help_license"
|
||||||
<TextView
|
app:defaultValue="true"/>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/nav_help_license"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_centerVertical="true"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__navigation_slider_about_checkbox"/>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__navigation_slider_about_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</android.support.v7.widget.CardView>
|
</android.support.v7.widget.CardView>
|
||||||
|
|
|
@ -29,36 +29,14 @@
|
||||||
android:text="@string/pref_title__sub_proxy"/>
|
android:text="@string/pref_title__sub_proxy"/>
|
||||||
|
|
||||||
<!-- Proxy Enabled -->
|
<!-- Proxy Enabled -->
|
||||||
<RelativeLayout
|
<com.github.dfa.diaspora_android.ui.ThemedCheckBoxPreference
|
||||||
android:id="@+id/settings_activity__proxy_activated"
|
android:id="@+id/settings_activity__proxy_enabled"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
app:titleText="@string/pref_title__proxy_enabled"
|
||||||
android:layout_marginBottom="@dimen/activity_vertical_margin"
|
app:summaryText="@string/pref_desc__http_proxy_enabled"
|
||||||
android:layout_marginTop="@dimen/activity_vertical_margin"
|
app:prefKey="@string/pref_key__http_proxy_enabled"
|
||||||
android:clickable="true">
|
app:defaultValue="false" />
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_toStartOf="@+id/settings_activity__proxy_activated_checkbox">
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
|
|
||||||
android:text="@string/pref_title__proxy_enabled"/>
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/pref_desc__http_proxy_enabled"/>
|
|
||||||
</LinearLayout>
|
|
||||||
<CheckBox
|
|
||||||
android:id="@+id/settings_activity__proxy_activated_checkbox"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<!-- Host -->
|
<!-- Host -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
Loading…
Reference in a new issue