2017-03-31 01:58:05 +02:00
|
|
|
/*
|
2019-01-23 18:03:33 +01:00
|
|
|
* This is the source code of Telegram for Android v. 5.x.x.
|
2017-03-31 01:58:05 +02:00
|
|
|
* It is licensed under GNU GPL v. 2 or later.
|
|
|
|
* You should have received a copy of the license in this archive (see LICENSE).
|
|
|
|
*
|
2019-01-23 18:03:33 +01:00
|
|
|
* Copyright Nikolai Kudashov, 2013-2018.
|
2017-03-31 01:58:05 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
package org.telegram.ui;
|
|
|
|
|
2017-12-08 18:35:59 +01:00
|
|
|
import android.animation.AnimatorSet;
|
2017-03-31 01:58:05 +02:00
|
|
|
import android.app.Dialog;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.SharedPreferences;
|
|
|
|
import android.view.Gravity;
|
|
|
|
import android.view.View;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import android.widget.FrameLayout;
|
|
|
|
|
|
|
|
import org.telegram.messenger.AndroidUtilities;
|
2018-07-30 04:07:02 +02:00
|
|
|
import org.telegram.messenger.BuildVars;
|
|
|
|
import org.telegram.messenger.DownloadController;
|
2017-03-31 01:58:05 +02:00
|
|
|
import org.telegram.messenger.LocaleController;
|
2018-07-30 04:07:02 +02:00
|
|
|
import org.telegram.messenger.MessagesController;
|
2017-03-31 01:58:05 +02:00
|
|
|
import org.telegram.messenger.R;
|
2018-07-30 04:07:02 +02:00
|
|
|
import org.telegram.messenger.SharedConfig;
|
2017-03-31 01:58:05 +02:00
|
|
|
import org.telegram.messenger.voip.VoIPController;
|
|
|
|
import org.telegram.ui.ActionBar.ActionBar;
|
2017-12-08 18:35:59 +01:00
|
|
|
import org.telegram.ui.ActionBar.AlertDialog;
|
2017-03-31 01:58:05 +02:00
|
|
|
import org.telegram.ui.ActionBar.BaseFragment;
|
|
|
|
import org.telegram.ui.ActionBar.Theme;
|
|
|
|
import org.telegram.ui.ActionBar.ThemeDescription;
|
|
|
|
import org.telegram.ui.Cells.HeaderCell;
|
2019-03-03 21:40:48 +01:00
|
|
|
import org.telegram.ui.Cells.NotificationsCheckCell;
|
2017-03-31 01:58:05 +02:00
|
|
|
import org.telegram.ui.Cells.ShadowSectionCell;
|
2017-12-08 18:35:59 +01:00
|
|
|
import org.telegram.ui.Cells.TextCheckCell;
|
2018-07-30 04:07:02 +02:00
|
|
|
import org.telegram.ui.Cells.TextInfoPrivacyCell;
|
2017-03-31 01:58:05 +02:00
|
|
|
import org.telegram.ui.Cells.TextSettingsCell;
|
|
|
|
import org.telegram.ui.Components.AlertsCreator;
|
|
|
|
import org.telegram.ui.Components.LayoutHelper;
|
|
|
|
import org.telegram.ui.Components.RecyclerListView;
|
2019-03-03 21:40:48 +01:00
|
|
|
import org.telegram.ui.Components.voip.VoIPHelper;
|
2017-12-08 18:35:59 +01:00
|
|
|
|
2019-05-14 14:08:05 +02:00
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
|
|
|
2017-03-31 01:58:05 +02:00
|
|
|
public class DataSettingsActivity extends BaseFragment {
|
|
|
|
|
|
|
|
private ListAdapter listAdapter;
|
|
|
|
private RecyclerListView listView;
|
2019-05-14 14:08:05 +02:00
|
|
|
@SuppressWarnings("FieldCanBeLocal")
|
|
|
|
private LinearLayoutManager layoutManager;
|
2017-12-08 18:35:59 +01:00
|
|
|
private AnimatorSet animatorSet;
|
2017-03-31 01:58:05 +02:00
|
|
|
|
|
|
|
private int mediaDownloadSectionRow;
|
2019-03-03 21:40:48 +01:00
|
|
|
private int mobileRow;
|
|
|
|
private int roamingRow;
|
|
|
|
private int wifiRow;
|
2017-12-08 18:35:59 +01:00
|
|
|
private int resetDownloadRow;
|
2017-03-31 01:58:05 +02:00
|
|
|
private int mediaDownloadSection2Row;
|
|
|
|
private int usageSectionRow;
|
|
|
|
private int storageUsageRow;
|
2019-03-03 21:40:48 +01:00
|
|
|
private int dataUsageRow;
|
2017-03-31 01:58:05 +02:00
|
|
|
private int usageSection2Row;
|
2018-07-30 04:07:02 +02:00
|
|
|
private int streamSectionRow;
|
|
|
|
private int enableStreamRow;
|
|
|
|
private int enableCacheStreamRow;
|
|
|
|
private int enableAllStreamRow;
|
2019-03-03 21:40:48 +01:00
|
|
|
private int enableMkvRow;
|
2018-07-30 04:07:02 +02:00
|
|
|
private int enableAllStreamInfoRow;
|
2019-03-03 21:40:48 +01:00
|
|
|
private int autoplayHeaderRow;
|
|
|
|
private int autoplayGifsRow;
|
|
|
|
private int autoplayVideoRow;
|
|
|
|
private int autoplaySectionRow;
|
2017-03-31 01:58:05 +02:00
|
|
|
private int callsSectionRow;
|
|
|
|
private int useLessDataForCallsRow;
|
2018-07-30 04:07:02 +02:00
|
|
|
private int quickRepliesRow;
|
2017-03-31 01:58:05 +02:00
|
|
|
private int callsSection2Row;
|
2017-07-08 18:32:04 +02:00
|
|
|
private int proxySectionRow;
|
|
|
|
private int proxyRow;
|
|
|
|
private int proxySection2Row;
|
2017-03-31 01:58:05 +02:00
|
|
|
private int rowCount;
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean onFragmentCreate() {
|
|
|
|
super.onFragmentCreate();
|
|
|
|
|
2019-03-03 21:40:48 +01:00
|
|
|
DownloadController.getInstance(currentAccount).loadAutoDownloadConfig(true);
|
|
|
|
|
2017-03-31 01:58:05 +02:00
|
|
|
rowCount = 0;
|
|
|
|
usageSectionRow = rowCount++;
|
|
|
|
storageUsageRow = rowCount++;
|
2019-03-03 21:40:48 +01:00
|
|
|
dataUsageRow = rowCount++;
|
2017-07-08 18:32:04 +02:00
|
|
|
usageSection2Row = rowCount++;
|
2017-12-08 18:35:59 +01:00
|
|
|
mediaDownloadSectionRow = rowCount++;
|
2019-03-03 21:40:48 +01:00
|
|
|
mobileRow = rowCount++;
|
|
|
|
wifiRow = rowCount++;
|
|
|
|
roamingRow = rowCount++;
|
2017-12-08 18:35:59 +01:00
|
|
|
resetDownloadRow = rowCount++;
|
|
|
|
mediaDownloadSection2Row = rowCount++;
|
2019-03-03 21:40:48 +01:00
|
|
|
autoplayHeaderRow = rowCount++;
|
|
|
|
autoplayGifsRow = rowCount++;
|
|
|
|
autoplayVideoRow = rowCount++;
|
|
|
|
autoplaySectionRow = rowCount++;
|
2018-07-30 04:07:02 +02:00
|
|
|
streamSectionRow = rowCount++;
|
|
|
|
enableStreamRow = rowCount++;
|
|
|
|
if (BuildVars.DEBUG_VERSION) {
|
2019-03-03 21:40:48 +01:00
|
|
|
enableMkvRow = rowCount++;
|
2018-07-30 04:07:02 +02:00
|
|
|
enableAllStreamRow = rowCount++;
|
|
|
|
} else {
|
|
|
|
enableAllStreamRow = -1;
|
2019-03-03 21:40:48 +01:00
|
|
|
enableMkvRow = -1;
|
2018-07-30 04:07:02 +02:00
|
|
|
}
|
|
|
|
enableAllStreamInfoRow = rowCount++;
|
|
|
|
enableCacheStreamRow = -1;//rowCount++;
|
2017-12-08 18:35:59 +01:00
|
|
|
callsSectionRow = rowCount++;
|
|
|
|
useLessDataForCallsRow = rowCount++;
|
2018-07-30 04:07:02 +02:00
|
|
|
quickRepliesRow = rowCount++;
|
2017-12-08 18:35:59 +01:00
|
|
|
callsSection2Row = rowCount++;
|
2017-07-08 18:32:04 +02:00
|
|
|
proxySectionRow = rowCount++;
|
|
|
|
proxyRow = rowCount++;
|
|
|
|
proxySection2Row = rowCount++;
|
2017-03-31 01:58:05 +02:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public View createView(Context context) {
|
|
|
|
actionBar.setBackButtonImage(R.drawable.ic_ab_back);
|
|
|
|
actionBar.setTitle(LocaleController.getString("DataSettings", R.string.DataSettings));
|
|
|
|
if (AndroidUtilities.isTablet()) {
|
|
|
|
actionBar.setOccupyStatusBar(false);
|
|
|
|
}
|
2017-07-08 18:32:04 +02:00
|
|
|
actionBar.setAllowOverlayTitle(true);
|
2017-03-31 01:58:05 +02:00
|
|
|
actionBar.setActionBarMenuOnItemClick(new ActionBar.ActionBarMenuOnItemClick() {
|
|
|
|
@Override
|
|
|
|
public void onItemClick(int id) {
|
|
|
|
if (id == -1) {
|
|
|
|
finishFragment();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
listAdapter = new ListAdapter(context);
|
|
|
|
|
|
|
|
fragmentView = new FrameLayout(context);
|
|
|
|
fragmentView.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundGray));
|
|
|
|
FrameLayout frameLayout = (FrameLayout) fragmentView;
|
|
|
|
|
|
|
|
listView = new RecyclerListView(context);
|
|
|
|
listView.setVerticalScrollBarEnabled(false);
|
2019-05-14 14:08:05 +02:00
|
|
|
listView.setLayoutManager(layoutManager = new LinearLayoutManager(context, LinearLayoutManager.VERTICAL, false));
|
2017-03-31 01:58:05 +02:00
|
|
|
frameLayout.addView(listView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, Gravity.TOP | Gravity.LEFT));
|
|
|
|
listView.setAdapter(listAdapter);
|
2019-03-03 21:40:48 +01:00
|
|
|
listView.setOnItemClickListener((view, position, x, y) -> {
|
|
|
|
if (position == mobileRow || position == roamingRow || position == wifiRow) {
|
|
|
|
if (LocaleController.isRTL && x <= AndroidUtilities.dp(76) || !LocaleController.isRTL && x >= view.getMeasuredWidth() - AndroidUtilities.dp(76)) {
|
2019-05-14 14:08:05 +02:00
|
|
|
boolean wasEnabled = listAdapter.isRowEnabled(resetDownloadRow);
|
|
|
|
|
2019-03-03 21:40:48 +01:00
|
|
|
NotificationsCheckCell cell = (NotificationsCheckCell) view;
|
|
|
|
boolean checked = cell.isChecked();
|
|
|
|
|
|
|
|
DownloadController.Preset preset;
|
|
|
|
DownloadController.Preset defaultPreset;
|
|
|
|
String key;
|
|
|
|
String key2;
|
|
|
|
int num;
|
|
|
|
if (position == mobileRow) {
|
|
|
|
preset = DownloadController.getInstance(currentAccount).mobilePreset;
|
|
|
|
defaultPreset = DownloadController.getInstance(currentAccount).mediumPreset;
|
|
|
|
key = "mobilePreset";
|
|
|
|
key2 = "currentMobilePreset";
|
|
|
|
num = 0;
|
|
|
|
} else if (position == wifiRow) {
|
|
|
|
preset = DownloadController.getInstance(currentAccount).wifiPreset;
|
|
|
|
defaultPreset = DownloadController.getInstance(currentAccount).highPreset;
|
|
|
|
key = "wifiPreset";
|
|
|
|
key2 = "currentWifiPreset";
|
|
|
|
num = 1;
|
|
|
|
} else {
|
|
|
|
preset = DownloadController.getInstance(currentAccount).roamingPreset;
|
|
|
|
defaultPreset = DownloadController.getInstance(currentAccount).lowPreset;
|
|
|
|
key = "roamingPreset";
|
|
|
|
key2 = "currentRoamingPreset";
|
|
|
|
num = 2;
|
|
|
|
}
|
|
|
|
if (!checked && preset.enabled) {
|
|
|
|
preset.set(defaultPreset);
|
|
|
|
} else {
|
|
|
|
preset.enabled = !preset.enabled;
|
|
|
|
}
|
|
|
|
SharedPreferences.Editor editor = MessagesController.getMainSettings(currentAccount).edit();
|
|
|
|
editor.putString(key, preset.toString());
|
|
|
|
editor.putInt(key2, 3);
|
|
|
|
editor.commit();
|
|
|
|
|
|
|
|
cell.setChecked(!checked);
|
|
|
|
RecyclerView.ViewHolder holder = listView.findContainingViewHolder(view);
|
|
|
|
if (holder != null) {
|
|
|
|
listAdapter.onBindViewHolder(holder, position);
|
|
|
|
}
|
|
|
|
DownloadController.getInstance(currentAccount).checkAutodownloadSettings();
|
|
|
|
DownloadController.getInstance(currentAccount).savePresetToServer(num);
|
2019-05-14 14:08:05 +02:00
|
|
|
if (wasEnabled != listAdapter.isRowEnabled(resetDownloadRow)) {
|
|
|
|
listAdapter.notifyItemChanged(resetDownloadRow);
|
|
|
|
}
|
2019-03-03 21:40:48 +01:00
|
|
|
} else {
|
|
|
|
int type;
|
|
|
|
if (position == mobileRow) {
|
|
|
|
type = 0;
|
|
|
|
} else if (position == wifiRow) {
|
|
|
|
type = 1;
|
|
|
|
} else {
|
|
|
|
type = 2;
|
|
|
|
}
|
|
|
|
presentFragment(new DataAutoDownloadActivity(type));
|
2019-01-23 18:03:33 +01:00
|
|
|
}
|
|
|
|
} else if (position == resetDownloadRow) {
|
2019-03-03 21:40:48 +01:00
|
|
|
if (getParentActivity() == null || !view.isEnabled()) {
|
2019-01-23 18:03:33 +01:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
|
|
|
|
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
|
|
|
|
builder.setMessage(LocaleController.getString("ResetAutomaticMediaDownloadAlert", R.string.ResetAutomaticMediaDownloadAlert));
|
|
|
|
builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), (dialogInterface, i) -> {
|
2019-03-03 21:40:48 +01:00
|
|
|
DownloadController.Preset preset;
|
|
|
|
DownloadController.Preset defaultPreset;
|
|
|
|
String key;
|
|
|
|
|
2019-01-23 18:03:33 +01:00
|
|
|
SharedPreferences.Editor editor = MessagesController.getMainSettings(currentAccount).edit();
|
2019-03-03 21:40:48 +01:00
|
|
|
for (int a = 0; a < 3; a++) {
|
|
|
|
if (a == 0) {
|
|
|
|
preset = DownloadController.getInstance(currentAccount).mobilePreset;
|
|
|
|
defaultPreset = DownloadController.getInstance(currentAccount).mediumPreset;
|
|
|
|
key = "mobilePreset";
|
|
|
|
} else if (a == 1) {
|
|
|
|
preset = DownloadController.getInstance(currentAccount).wifiPreset;
|
|
|
|
defaultPreset = DownloadController.getInstance(currentAccount).highPreset;
|
|
|
|
key = "wifiPreset";
|
2019-01-23 18:03:33 +01:00
|
|
|
} else {
|
2019-03-03 21:40:48 +01:00
|
|
|
preset = DownloadController.getInstance(currentAccount).roamingPreset;
|
|
|
|
defaultPreset = DownloadController.getInstance(currentAccount).lowPreset;
|
|
|
|
key = "roamingPreset";
|
2019-01-23 18:03:33 +01:00
|
|
|
}
|
2019-03-03 21:40:48 +01:00
|
|
|
preset.set(defaultPreset);
|
2019-05-14 14:08:05 +02:00
|
|
|
preset.enabled = defaultPreset.isEnabled();
|
2019-03-03 21:40:48 +01:00
|
|
|
editor.putInt("currentMobilePreset", DownloadController.getInstance(currentAccount).currentMobilePreset = 3);
|
|
|
|
editor.putInt("currentWifiPreset", DownloadController.getInstance(currentAccount).currentWifiPreset = 3);
|
|
|
|
editor.putInt("currentRoamingPreset", DownloadController.getInstance(currentAccount).currentRoamingPreset = 3);
|
|
|
|
editor.putString(key, preset.toString());
|
2017-03-31 01:58:05 +02:00
|
|
|
}
|
2019-01-23 18:03:33 +01:00
|
|
|
editor.commit();
|
|
|
|
DownloadController.getInstance(currentAccount).checkAutodownloadSettings();
|
2019-03-03 21:40:48 +01:00
|
|
|
for (int a = 0; a < 3; a++) {
|
|
|
|
DownloadController.getInstance(currentAccount).savePresetToServer(a);
|
|
|
|
}
|
|
|
|
listAdapter.notifyItemRangeChanged(mobileRow, 4);
|
2019-01-23 18:03:33 +01:00
|
|
|
});
|
|
|
|
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
|
|
|
|
builder.show();
|
|
|
|
} else if (position == storageUsageRow) {
|
|
|
|
presentFragment(new CacheControlActivity());
|
|
|
|
} else if (position == useLessDataForCallsRow) {
|
|
|
|
final SharedPreferences preferences = MessagesController.getGlobalMainSettings();
|
2019-05-14 14:08:05 +02:00
|
|
|
int selected = 0;
|
|
|
|
switch (preferences.getInt("VoipDataSaving", VoIPHelper.getDataSavingDefault())) {
|
2019-03-03 21:40:48 +01:00
|
|
|
case VoIPController.DATA_SAVING_NEVER:
|
2019-05-14 14:08:05 +02:00
|
|
|
selected = 0;
|
|
|
|
break;
|
|
|
|
case VoIPController.DATA_SAVING_ROAMING:
|
|
|
|
selected = 1;
|
2019-03-03 21:40:48 +01:00
|
|
|
break;
|
|
|
|
case VoIPController.DATA_SAVING_MOBILE:
|
2019-05-14 14:08:05 +02:00
|
|
|
selected = 2;
|
2019-03-03 21:40:48 +01:00
|
|
|
break;
|
|
|
|
case VoIPController.DATA_SAVING_ALWAYS:
|
2019-05-14 14:08:05 +02:00
|
|
|
selected = 3;
|
2019-03-03 21:40:48 +01:00
|
|
|
break;
|
|
|
|
}
|
2019-01-23 18:03:33 +01:00
|
|
|
Dialog dlg = AlertsCreator.createSingleChoiceDialog(getParentActivity(), new String[]{
|
|
|
|
LocaleController.getString("UseLessDataNever", R.string.UseLessDataNever),
|
2019-03-03 21:40:48 +01:00
|
|
|
LocaleController.getString("UseLessDataOnRoaming", R.string.UseLessDataOnRoaming),
|
2019-01-23 18:03:33 +01:00
|
|
|
LocaleController.getString("UseLessDataOnMobile", R.string.UseLessDataOnMobile),
|
|
|
|
LocaleController.getString("UseLessDataAlways", R.string.UseLessDataAlways)},
|
2019-03-03 21:40:48 +01:00
|
|
|
LocaleController.getString("VoipUseLessData", R.string.VoipUseLessData), selected, (dialog, which) -> {
|
2019-01-23 18:03:33 +01:00
|
|
|
int val = -1;
|
|
|
|
switch (which) {
|
|
|
|
case 0:
|
|
|
|
val = VoIPController.DATA_SAVING_NEVER;
|
|
|
|
break;
|
|
|
|
case 1:
|
2019-05-14 14:08:05 +02:00
|
|
|
val = VoIPController.DATA_SAVING_ROAMING;
|
2019-01-23 18:03:33 +01:00
|
|
|
break;
|
|
|
|
case 2:
|
2019-03-03 21:40:48 +01:00
|
|
|
val = VoIPController.DATA_SAVING_MOBILE;
|
|
|
|
break;
|
|
|
|
case 3:
|
2019-01-23 18:03:33 +01:00
|
|
|
val = VoIPController.DATA_SAVING_ALWAYS;
|
|
|
|
break;
|
2017-03-31 01:58:05 +02:00
|
|
|
}
|
2019-01-23 18:03:33 +01:00
|
|
|
if (val != -1) {
|
|
|
|
preferences.edit().putInt("VoipDataSaving", val).commit();
|
2017-03-31 01:58:05 +02:00
|
|
|
}
|
2019-01-23 18:03:33 +01:00
|
|
|
if (listAdapter != null) {
|
|
|
|
listAdapter.notifyItemChanged(position);
|
2017-03-31 01:58:05 +02:00
|
|
|
}
|
2019-01-23 18:03:33 +01:00
|
|
|
});
|
|
|
|
setVisibleDialog(dlg);
|
|
|
|
dlg.show();
|
2019-03-03 21:40:48 +01:00
|
|
|
} else if (position == dataUsageRow) {
|
|
|
|
presentFragment(new DataUsageActivity());
|
2019-01-23 18:03:33 +01:00
|
|
|
} else if (position == proxyRow) {
|
|
|
|
presentFragment(new ProxyListActivity());
|
|
|
|
} else if (position == enableStreamRow) {
|
|
|
|
SharedConfig.toggleStreamMedia();
|
|
|
|
TextCheckCell textCheckCell = (TextCheckCell) view;
|
|
|
|
textCheckCell.setChecked(SharedConfig.streamMedia);
|
|
|
|
} else if (position == enableAllStreamRow) {
|
|
|
|
SharedConfig.toggleStreamAllVideo();
|
|
|
|
TextCheckCell textCheckCell = (TextCheckCell) view;
|
|
|
|
textCheckCell.setChecked(SharedConfig.streamAllVideo);
|
2019-03-03 21:40:48 +01:00
|
|
|
} else if (position == enableMkvRow) {
|
|
|
|
SharedConfig.toggleStreamMkv();
|
|
|
|
TextCheckCell textCheckCell = (TextCheckCell) view;
|
|
|
|
textCheckCell.setChecked(SharedConfig.streamMkv);
|
2019-01-23 18:03:33 +01:00
|
|
|
} else if (position == enableCacheStreamRow) {
|
|
|
|
SharedConfig.toggleSaveStreamMedia();
|
|
|
|
TextCheckCell textCheckCell = (TextCheckCell) view;
|
|
|
|
textCheckCell.setChecked(SharedConfig.saveStreamMedia);
|
|
|
|
} else if (position == quickRepliesRow) {
|
|
|
|
presentFragment(new QuickRepliesSettingsActivity());
|
2019-03-03 21:40:48 +01:00
|
|
|
} else if (position == autoplayGifsRow) {
|
|
|
|
SharedConfig.toggleAutoplayGifs();
|
|
|
|
if (view instanceof TextCheckCell) {
|
|
|
|
((TextCheckCell) view).setChecked(SharedConfig.autoplayGifs);
|
|
|
|
}
|
|
|
|
} else if (position == autoplayVideoRow) {
|
|
|
|
SharedConfig.toggleAutoplayVideo();
|
|
|
|
if (view instanceof TextCheckCell) {
|
|
|
|
((TextCheckCell) view).setChecked(SharedConfig.autoplayVideo);
|
|
|
|
}
|
2017-03-31 01:58:05 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
return fragmentView;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void onDialogDismiss(Dialog dialog) {
|
2018-07-30 04:07:02 +02:00
|
|
|
DownloadController.getInstance(currentAccount).checkAutodownloadSettings();
|
2017-03-31 01:58:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onResume() {
|
|
|
|
super.onResume();
|
|
|
|
if (listAdapter != null) {
|
|
|
|
listAdapter.notifyDataSetChanged();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private class ListAdapter extends RecyclerListView.SelectionAdapter {
|
|
|
|
|
|
|
|
private Context mContext;
|
|
|
|
|
|
|
|
public ListAdapter(Context context) {
|
|
|
|
mContext = context;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getItemCount() {
|
|
|
|
return rowCount;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
|
|
|
|
switch (holder.getItemViewType()) {
|
|
|
|
case 0: {
|
2017-07-08 18:32:04 +02:00
|
|
|
if (position == proxySection2Row) {
|
2017-03-31 01:58:05 +02:00
|
|
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow));
|
|
|
|
} else {
|
|
|
|
holder.itemView.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 1: {
|
|
|
|
TextSettingsCell textCell = (TextSettingsCell) holder.itemView;
|
2019-03-03 21:40:48 +01:00
|
|
|
textCell.setCanDisable(false);
|
2017-12-08 18:35:59 +01:00
|
|
|
textCell.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
|
2017-03-31 01:58:05 +02:00
|
|
|
if (position == storageUsageRow) {
|
|
|
|
textCell.setText(LocaleController.getString("StorageUsage", R.string.StorageUsage), true);
|
|
|
|
} else if (position == useLessDataForCallsRow) {
|
2018-07-30 04:07:02 +02:00
|
|
|
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
|
2017-03-31 01:58:05 +02:00
|
|
|
String value = null;
|
2019-03-03 21:40:48 +01:00
|
|
|
switch (preferences.getInt("VoipDataSaving", VoIPHelper.getDataSavingDefault())) {
|
2017-03-31 01:58:05 +02:00
|
|
|
case VoIPController.DATA_SAVING_NEVER:
|
|
|
|
value = LocaleController.getString("UseLessDataNever", R.string.UseLessDataNever);
|
|
|
|
break;
|
|
|
|
case VoIPController.DATA_SAVING_MOBILE:
|
|
|
|
value = LocaleController.getString("UseLessDataOnMobile", R.string.UseLessDataOnMobile);
|
|
|
|
break;
|
2019-03-03 21:40:48 +01:00
|
|
|
case VoIPController.DATA_SAVING_ROAMING:
|
|
|
|
value = LocaleController.getString("UseLessDataOnRoaming", R.string.UseLessDataOnRoaming);
|
|
|
|
break;
|
2017-03-31 01:58:05 +02:00
|
|
|
case VoIPController.DATA_SAVING_ALWAYS:
|
|
|
|
value = LocaleController.getString("UseLessDataAlways", R.string.UseLessDataAlways);
|
|
|
|
break;
|
|
|
|
}
|
2018-07-30 04:07:02 +02:00
|
|
|
textCell.setTextAndValue(LocaleController.getString("VoipUseLessData", R.string.VoipUseLessData), value, true);
|
2019-03-03 21:40:48 +01:00
|
|
|
} else if (position == dataUsageRow) {
|
|
|
|
textCell.setText(LocaleController.getString("NetworkUsage", R.string.NetworkUsage), false);
|
2017-07-08 18:32:04 +02:00
|
|
|
} else if (position == proxyRow) {
|
2019-01-23 18:03:33 +01:00
|
|
|
textCell.setText(LocaleController.getString("ProxySettings", R.string.ProxySettings), false);
|
2017-12-08 18:35:59 +01:00
|
|
|
} else if (position == resetDownloadRow) {
|
2019-03-03 21:40:48 +01:00
|
|
|
textCell.setCanDisable(true);
|
2017-12-08 18:35:59 +01:00
|
|
|
textCell.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteRedText));
|
|
|
|
textCell.setText(LocaleController.getString("ResetAutomaticMediaDownload", R.string.ResetAutomaticMediaDownload), false);
|
2018-07-30 04:07:02 +02:00
|
|
|
} else if (position == quickRepliesRow){
|
|
|
|
textCell.setText(LocaleController.getString("VoipQuickReplies", R.string.VoipQuickReplies), false);
|
2017-03-31 01:58:05 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 2: {
|
|
|
|
HeaderCell headerCell = (HeaderCell) holder.itemView;
|
|
|
|
if (position == mediaDownloadSectionRow) {
|
|
|
|
headerCell.setText(LocaleController.getString("AutomaticMediaDownload", R.string.AutomaticMediaDownload));
|
|
|
|
} else if (position == usageSectionRow) {
|
|
|
|
headerCell.setText(LocaleController.getString("DataUsage", R.string.DataUsage));
|
|
|
|
} else if (position == callsSectionRow) {
|
|
|
|
headerCell.setText(LocaleController.getString("Calls", R.string.Calls));
|
2017-07-08 18:32:04 +02:00
|
|
|
} else if (position == proxySectionRow) {
|
|
|
|
headerCell.setText(LocaleController.getString("Proxy", R.string.Proxy));
|
2018-07-30 04:07:02 +02:00
|
|
|
} else if (position == streamSectionRow) {
|
|
|
|
headerCell.setText(LocaleController.getString("Streaming", R.string.Streaming));
|
2019-03-03 21:40:48 +01:00
|
|
|
} else if (position == autoplayHeaderRow) {
|
|
|
|
headerCell.setText(LocaleController.getString("AutoplayMedia", R.string.AutoplayMedia));
|
2017-03-31 01:58:05 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 3: {
|
2017-12-08 18:35:59 +01:00
|
|
|
TextCheckCell checkCell = (TextCheckCell) holder.itemView;
|
2019-03-03 21:40:48 +01:00
|
|
|
if (position == enableStreamRow) {
|
2018-07-30 04:07:02 +02:00
|
|
|
checkCell.setTextAndCheck(LocaleController.getString("EnableStreaming", R.string.EnableStreaming), SharedConfig.streamMedia, enableAllStreamRow != -1);
|
|
|
|
} else if (position == enableCacheStreamRow) {
|
|
|
|
//checkCell.setTextAndCheck(LocaleController.getString("CacheStreamFile", R.string.CacheStreamFile), SharedConfig.saveStreamMedia, true);
|
2019-03-03 21:40:48 +01:00
|
|
|
} else if (position == enableMkvRow) {
|
|
|
|
checkCell.setTextAndCheck("(beta only) Show MKV as Video", SharedConfig.streamMkv, true);
|
2018-07-30 04:07:02 +02:00
|
|
|
} else if (position == enableAllStreamRow) {
|
2019-03-03 21:40:48 +01:00
|
|
|
checkCell.setTextAndCheck("(beta only) Stream All Videos", SharedConfig.streamAllVideo, false);
|
|
|
|
} else if (position == autoplayGifsRow) {
|
|
|
|
checkCell.setTextAndCheck(LocaleController.getString("AutoplayGIF", R.string.AutoplayGIF), SharedConfig.autoplayGifs, true);
|
|
|
|
} else if (position == autoplayVideoRow) {
|
|
|
|
checkCell.setTextAndCheck(LocaleController.getString("AutoplayVideo", R.string.AutoplayVideo), SharedConfig.autoplayVideo, false);
|
2017-03-31 01:58:05 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2018-07-30 04:07:02 +02:00
|
|
|
case 4: {
|
|
|
|
TextInfoPrivacyCell cell = (TextInfoPrivacyCell) holder.itemView;
|
|
|
|
if (position == enableAllStreamInfoRow) {
|
|
|
|
cell.setText(LocaleController.getString("EnableAllStreamingInfo", R.string.EnableAllStreamingInfo));
|
|
|
|
}
|
2019-03-03 21:40:48 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 5: {
|
|
|
|
NotificationsCheckCell checkCell = (NotificationsCheckCell) holder.itemView;
|
|
|
|
|
|
|
|
String text;
|
|
|
|
StringBuilder builder = new StringBuilder();
|
|
|
|
DownloadController.Preset preset;
|
|
|
|
boolean enabled;
|
|
|
|
if (position == mobileRow) {
|
|
|
|
text = LocaleController.getString("WhenUsingMobileData", R.string.WhenUsingMobileData);
|
|
|
|
enabled = DownloadController.getInstance(currentAccount).mobilePreset.enabled;
|
|
|
|
preset = DownloadController.getInstance(currentAccount).getCurrentMobilePreset();
|
|
|
|
} else if (position == wifiRow) {
|
|
|
|
text = LocaleController.getString("WhenConnectedOnWiFi", R.string.WhenConnectedOnWiFi);
|
|
|
|
enabled = DownloadController.getInstance(currentAccount).wifiPreset.enabled;
|
|
|
|
preset = DownloadController.getInstance(currentAccount).getCurrentWiFiPreset();
|
|
|
|
} else {
|
|
|
|
text = LocaleController.getString("WhenRoaming", R.string.WhenRoaming);
|
|
|
|
enabled = DownloadController.getInstance(currentAccount).roamingPreset.enabled;
|
|
|
|
preset = DownloadController.getInstance(currentAccount).getCurrentRoamingPreset();
|
|
|
|
}
|
|
|
|
|
|
|
|
boolean photos = false;
|
|
|
|
boolean videos = false;
|
|
|
|
boolean files = false;
|
|
|
|
int count = 0;
|
|
|
|
for (int a = 0; a < preset.mask.length; a++) {
|
|
|
|
if (!photos && (preset.mask[a] & DownloadController.AUTODOWNLOAD_TYPE_PHOTO) != 0) {
|
|
|
|
photos = true;
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
if (!videos && (preset.mask[a] & DownloadController.AUTODOWNLOAD_TYPE_VIDEO) != 0) {
|
|
|
|
videos = true;
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
if (!files && (preset.mask[a] & DownloadController.AUTODOWNLOAD_TYPE_DOCUMENT) != 0) {
|
|
|
|
files = true;
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (preset.enabled && count != 0) {
|
|
|
|
if (photos) {
|
2019-05-14 14:08:05 +02:00
|
|
|
builder.append(LocaleController.getString("AutoDownloadPhotosOn", R.string.AutoDownloadPhotosOn));
|
2019-03-03 21:40:48 +01:00
|
|
|
}
|
|
|
|
if (videos) {
|
|
|
|
if (builder.length() > 0) {
|
|
|
|
builder.append(", ");
|
|
|
|
}
|
2019-05-14 14:08:05 +02:00
|
|
|
builder.append(LocaleController.getString("AutoDownloadVideosOn", R.string.AutoDownloadVideosOn));
|
2019-03-03 21:40:48 +01:00
|
|
|
builder.append(String.format(" (%1$s)", AndroidUtilities.formatFileSize(preset.sizes[DownloadController.typeToIndex(DownloadController.AUTODOWNLOAD_TYPE_VIDEO)], true)));
|
|
|
|
}
|
|
|
|
if (files) {
|
|
|
|
if (builder.length() > 0) {
|
|
|
|
builder.append(", ");
|
|
|
|
}
|
2019-05-14 14:08:05 +02:00
|
|
|
builder.append(LocaleController.getString("AutoDownloadFilesOn", R.string.AutoDownloadFilesOn));
|
2019-03-03 21:40:48 +01:00
|
|
|
builder.append(String.format(" (%1$s)", AndroidUtilities.formatFileSize(preset.sizes[DownloadController.typeToIndex(DownloadController.AUTODOWNLOAD_TYPE_DOCUMENT)], true)));
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
builder.append(LocaleController.getString("NoMediaAutoDownload", R.string.NoMediaAutoDownload));
|
|
|
|
}
|
|
|
|
checkCell.setTextAndValueAndCheck(text, builder, (photos || videos || files) && enabled, 0, true, true);
|
|
|
|
break;
|
2018-07-30 04:07:02 +02:00
|
|
|
}
|
2017-03-31 01:58:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-08 18:35:59 +01:00
|
|
|
@Override
|
|
|
|
public void onViewAttachedToWindow(RecyclerView.ViewHolder holder) {
|
|
|
|
int viewType = holder.getItemViewType();
|
2019-03-03 21:40:48 +01:00
|
|
|
if (viewType == 3) {
|
2017-12-08 18:35:59 +01:00
|
|
|
TextCheckCell checkCell = (TextCheckCell) holder.itemView;
|
2018-07-30 04:07:02 +02:00
|
|
|
int position = holder.getAdapterPosition();
|
|
|
|
if (position == enableCacheStreamRow) {
|
|
|
|
checkCell.setChecked(SharedConfig.saveStreamMedia);
|
|
|
|
} else if (position == enableStreamRow) {
|
|
|
|
checkCell.setChecked(SharedConfig.streamMedia);
|
|
|
|
} else if (position == enableAllStreamRow) {
|
|
|
|
checkCell.setChecked(SharedConfig.streamAllVideo);
|
2019-03-03 21:40:48 +01:00
|
|
|
} else if (position == enableMkvRow) {
|
|
|
|
checkCell.setChecked(SharedConfig.streamMkv);
|
|
|
|
} else if (position == autoplayGifsRow) {
|
|
|
|
checkCell.setChecked(SharedConfig.autoplayGifs);
|
|
|
|
} else if (position == autoplayVideoRow) {
|
|
|
|
checkCell.setChecked(SharedConfig.autoplayVideo);
|
2018-07-30 04:07:02 +02:00
|
|
|
}
|
2017-12-08 18:35:59 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-05-14 14:08:05 +02:00
|
|
|
public boolean isRowEnabled(int position) {
|
2019-03-03 21:40:48 +01:00
|
|
|
if (position == resetDownloadRow) {
|
|
|
|
DownloadController controller = DownloadController.getInstance(currentAccount);
|
2019-05-14 14:08:05 +02:00
|
|
|
return !controller.lowPreset.equals(controller.getCurrentRoamingPreset()) || controller.lowPreset.isEnabled() != controller.roamingPreset.enabled ||
|
|
|
|
!controller.mediumPreset.equals(controller.getCurrentMobilePreset()) || controller.mediumPreset.isEnabled() != controller.mobilePreset.enabled ||
|
|
|
|
!controller.highPreset.equals(controller.getCurrentWiFiPreset()) || controller.highPreset.isEnabled() != controller.wifiPreset.enabled;
|
2017-12-08 18:35:59 +01:00
|
|
|
}
|
2019-03-03 21:40:48 +01:00
|
|
|
return position == mobileRow || position == roamingRow || position == wifiRow || position == storageUsageRow || position == useLessDataForCallsRow || position == dataUsageRow || position == proxyRow ||
|
|
|
|
position == enableCacheStreamRow || position == enableStreamRow || position == enableAllStreamRow || position == enableMkvRow || position == quickRepliesRow || position == autoplayVideoRow || position == autoplayGifsRow;
|
2017-03-31 01:58:05 +02:00
|
|
|
}
|
|
|
|
|
2019-05-14 14:08:05 +02:00
|
|
|
@Override
|
|
|
|
public boolean isEnabled(RecyclerView.ViewHolder holder) {
|
|
|
|
return isRowEnabled(holder.getAdapterPosition());
|
|
|
|
}
|
|
|
|
|
2017-03-31 01:58:05 +02:00
|
|
|
@Override
|
|
|
|
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
|
|
|
View view = null;
|
|
|
|
switch (viewType) {
|
|
|
|
case 0:
|
|
|
|
view = new ShadowSectionCell(mContext);
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
view = new TextSettingsCell(mContext);
|
|
|
|
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
view = new HeaderCell(mContext);
|
|
|
|
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
|
|
|
|
break;
|
|
|
|
case 3:
|
2017-12-08 18:35:59 +01:00
|
|
|
view = new TextCheckCell(mContext);
|
2017-03-31 01:58:05 +02:00
|
|
|
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
|
|
|
|
break;
|
2018-07-30 04:07:02 +02:00
|
|
|
case 4:
|
|
|
|
view = new TextInfoPrivacyCell(mContext);
|
|
|
|
view.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
|
|
|
|
break;
|
2019-03-03 21:40:48 +01:00
|
|
|
case 5:
|
|
|
|
view = new NotificationsCheckCell(mContext);
|
|
|
|
view.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundWhite));
|
|
|
|
break;
|
2017-03-31 01:58:05 +02:00
|
|
|
}
|
|
|
|
view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, RecyclerView.LayoutParams.WRAP_CONTENT));
|
|
|
|
return new RecyclerListView.Holder(view);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getItemViewType(int position) {
|
2019-03-03 21:40:48 +01:00
|
|
|
if (position == mediaDownloadSection2Row || position == usageSection2Row || position == callsSection2Row || position == proxySection2Row || position == autoplaySectionRow) {
|
2017-03-31 01:58:05 +02:00
|
|
|
return 0;
|
2019-03-03 21:40:48 +01:00
|
|
|
} else if (position == mediaDownloadSectionRow || position == streamSectionRow || position == callsSectionRow || position == usageSectionRow || position == proxySectionRow || position == autoplayHeaderRow) {
|
2017-03-31 01:58:05 +02:00
|
|
|
return 2;
|
2019-03-03 21:40:48 +01:00
|
|
|
} else if (position == enableCacheStreamRow || position == enableStreamRow || position == enableAllStreamRow || position == enableMkvRow || position == autoplayGifsRow || position == autoplayVideoRow) {
|
2017-12-08 18:35:59 +01:00
|
|
|
return 3;
|
2018-07-30 04:07:02 +02:00
|
|
|
} else if (position == enableAllStreamInfoRow) {
|
|
|
|
return 4;
|
2019-03-03 21:40:48 +01:00
|
|
|
} else if (position == mobileRow || position == wifiRow || position == roamingRow) {
|
|
|
|
return 5;
|
2017-03-31 01:58:05 +02:00
|
|
|
} else {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ThemeDescription[] getThemeDescriptions() {
|
|
|
|
return new ThemeDescription[]{
|
2019-03-03 21:40:48 +01:00
|
|
|
new ThemeDescription(listView, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[]{TextSettingsCell.class, TextCheckCell.class, HeaderCell.class, NotificationsCheckCell.class}, null, null, null, Theme.key_windowBackgroundWhite),
|
2017-03-31 01:58:05 +02:00
|
|
|
new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundGray),
|
|
|
|
|
|
|
|
new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault),
|
|
|
|
new ThemeDescription(listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefault),
|
|
|
|
new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarDefaultIcon),
|
|
|
|
new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle),
|
|
|
|
new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector),
|
|
|
|
|
2019-03-03 21:40:48 +01:00
|
|
|
new ThemeDescription(listView, 0, new Class[]{NotificationsCheckCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
|
|
|
|
new ThemeDescription(listView, 0, new Class[]{NotificationsCheckCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2),
|
|
|
|
new ThemeDescription(listView, 0, new Class[]{NotificationsCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrack),
|
|
|
|
new ThemeDescription(listView, 0, new Class[]{NotificationsCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrackChecked),
|
|
|
|
|
2017-03-31 01:58:05 +02:00
|
|
|
new ThemeDescription(listView, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector),
|
|
|
|
|
|
|
|
new ThemeDescription(listView, 0, new Class[]{View.class}, Theme.dividerPaint, null, null, Theme.key_divider),
|
|
|
|
|
|
|
|
new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[]{ShadowSectionCell.class}, null, null, null, Theme.key_windowBackgroundGrayShadow),
|
|
|
|
|
|
|
|
new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
|
|
|
|
new ThemeDescription(listView, 0, new Class[]{TextSettingsCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteValueText),
|
|
|
|
|
|
|
|
new ThemeDescription(listView, 0, new Class[]{HeaderCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlueHeader),
|
|
|
|
|
2017-12-08 18:35:59 +01:00
|
|
|
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteBlackText),
|
|
|
|
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"valueTextView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText2),
|
|
|
|
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrack),
|
|
|
|
new ThemeDescription(listView, 0, new Class[]{TextCheckCell.class}, new String[]{"checkBox"}, null, null, null, Theme.key_switchTrackChecked),
|
2018-07-30 04:07:02 +02:00
|
|
|
|
|
|
|
new ThemeDescription(listView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[]{TextInfoPrivacyCell.class}, null, null, null, Theme.key_windowBackgroundGrayShadow),
|
|
|
|
new ThemeDescription(listView, 0, new Class[]{TextInfoPrivacyCell.class}, new String[]{"textView"}, null, null, null, Theme.key_windowBackgroundWhiteGrayText4),
|
2017-03-31 01:58:05 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|