diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2015-11-14 17:36:44 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2015-11-14 17:36:44 +0100 |
commit | 3768198a4b89738845ae50298611dd92ad0d722d (patch) | |
tree | 9a357082dd60d6a8f1716d5027052708168b98b0 | |
parent | fc1ac0c175a4085c3d0ba144ad17e3adbb3e2ea1 (diff) | |
parent | 059ef16dc237d26861813cac3a43ba6723fd9556 (diff) | |
download | AntennaPod-3768198a4b89738845ae50298611dd92ad0d722d.zip |
Merge pull request #1363 from mfietz/issue/1256-dark-dialogs
Dialogs: Sleep timer, Material dialogs
31 files changed, 205 insertions, 402 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/activity/DirectoryChooserActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/DirectoryChooserActivity.java index 559fa0574..86ca90eb5 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/DirectoryChooserActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/DirectoryChooserActivity.java @@ -1,7 +1,6 @@ package de.danoeh.antennapod.activity; import android.app.Activity; -import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; @@ -9,6 +8,7 @@ import android.os.Environment; import android.os.FileObserver; import android.support.v4.app.NavUtils; import android.support.v7.app.ActionBarActivity; +import android.support.v7.app.AlertDialog; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; @@ -84,65 +84,41 @@ public class DirectoryChooserActivity extends ActionBarActivity { adb.setTitle(R.string.folder_not_empty_dialog_title); adb.setMessage(R.string.folder_not_empty_dialog_msg); adb.setNegativeButton(R.string.cancel_label, - new DialogInterface.OnClickListener() { - - @Override - public void onClick(DialogInterface dialog, - int which) { - dialog.dismiss(); - } - }); + (dialog, which) -> { + dialog.dismiss(); + }); adb.setPositiveButton(R.string.confirm_label, - new DialogInterface.OnClickListener() { - - @Override - public void onClick(DialogInterface dialog, - int which) { - dialog.dismiss(); - returnSelectedFolder(); - } - }); + (dialog, which) -> { + dialog.dismiss(); + returnSelectedFolder(); + }); adb.create().show(); } }); - butCancel.setOnClickListener(new OnClickListener() { - - @Override - public void onClick(View v) { - setResult(Activity.RESULT_CANCELED); - finish(); - } - }); - - listDirectories.setOnItemClickListener(new OnItemClickListener() { - - @Override - public void onItemClick(AdapterView<?> adapter, View view, - int position, long id) { - if (BuildConfig.DEBUG) - Log.d(TAG, "Selected index: " + position); - if (filesInDir != null && position >= 0 - && position < filesInDir.length) { - changeDirectory(filesInDir[position]); - } - } - }); - - butNavUp.setOnClickListener(new OnClickListener() { - - @Override - public void onClick(View v) { - File parent = null; - if (selectedDir != null - && (parent = selectedDir.getParentFile()) != null) { - changeDirectory(parent); - } - } - }); - - filenames = new ArrayList<String>(); - listDirectoriesAdapter = new ArrayAdapter<String>(this, + butCancel.setOnClickListener(v -> { + setResult(Activity.RESULT_CANCELED); + finish(); + }); + + listDirectories.setOnItemClickListener((adapter, view, position, id) -> { + Log.d(TAG, "Selected index: " + position); + if (filesInDir != null && position >= 0 + && position < filesInDir.length) { + changeDirectory(filesInDir[position]); + } + }); + + butNavUp.setOnClickListener(v -> { + File parent = null; + if (selectedDir != null + && (parent = selectedDir.getParentFile()) != null) { + changeDirectory(parent); + } + }); + + filenames = new ArrayList<>(); + listDirectoriesAdapter = new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, filenames); listDirectories.setAdapter(listDirectoriesAdapter); changeDirectory(Environment.getExternalStorageDirectory()); diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java index df680a297..6915c817b 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MainActivity.java @@ -1,7 +1,6 @@ package de.danoeh.antennapod.activity; import android.annotation.TargetApi; -import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; @@ -20,6 +19,7 @@ import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBarDrawerToggle; +import android.support.v7.app.AlertDialog; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.ContextMenu; diff --git a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java index e34b4dc67..c53a5257b 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/MediaplayerActivity.java @@ -1,6 +1,5 @@ package de.danoeh.antennapod.activity; -import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.graphics.PixelFormat; @@ -8,6 +7,7 @@ import android.media.AudioManager; import android.net.Uri; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; +import android.support.v7.app.AlertDialog; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; @@ -19,6 +19,8 @@ import android.widget.SeekBar; import android.widget.SeekBar.OnSeekBarChangeListener; import android.widget.TextView; +import com.afollestad.materialdialogs.MaterialDialog; + import de.danoeh.antennapod.R; import de.danoeh.antennapod.core.feed.FeedItem; import de.danoeh.antennapod.core.feed.FeedMedia; @@ -291,49 +293,40 @@ public abstract class MediaplayerActivity extends ActionBarActivity switch (item.getItemId()) { case R.id.disable_sleeptimer_item: if (controller.serviceAvailable()) { - AlertDialog.Builder stDialog = new AlertDialog.Builder(this); - stDialog.setTitle(R.string.sleep_timer_label); - stDialog.setMessage(getString(R.string.time_left_label) + + MaterialDialog.Builder stDialog = new MaterialDialog.Builder(this); + stDialog.title(R.string.sleep_timer_label); + stDialog.content(getString(R.string.time_left_label) + Converter.getDurationStringLong((int) controller .getSleepTimerTimeLeft())); - stDialog.setPositiveButton( - R.string.disable_sleeptimer_label, - new DialogInterface.OnClickListener() { - - @Override - public void onClick(DialogInterface dialog, - int which) { - dialog.dismiss(); - controller.disableSleepTimer(); - } - } - ); - stDialog.setNegativeButton(R.string.cancel_label, - new DialogInterface.OnClickListener() { - - @Override - public void onClick(DialogInterface dialog, - int which) { - dialog.dismiss(); - } - } - ); - stDialog.create().show(); + stDialog.positiveText(R.string.disable_sleeptimer_label); + stDialog.negativeText(R.string.cancel_label); + stDialog.callback(new MaterialDialog.ButtonCallback() { + @Override + public void onPositive(MaterialDialog dialog) { + dialog.dismiss(); + controller.disableSleepTimer(); + } + + @Override + public void onNegative(MaterialDialog dialog) { + dialog.dismiss(); + } + }); + stDialog.build().show(); } break; case R.id.set_sleeptimer_item: if (controller.serviceAvailable()) { - SleepTimerDialog td = new SleepTimerDialog(this, 0, 0) { + SleepTimerDialog td = new SleepTimerDialog(this) { @Override public void onTimerSet(long millis, boolean shakeToReset, boolean vibrate) { controller.setSleepTimer(millis, shakeToReset, vibrate); } }; - td.show(); - - break; - + td.createNewDialog().show(); } + break; case R.id.visit_website_item: Uri uri = Uri.parse(media.getWebsiteLink()); startActivity(new Intent(Intent.ACTION_VIEW, uri)); @@ -500,19 +493,13 @@ public abstract class MediaplayerActivity extends ActionBarActivity AlertDialog.Builder builder = new AlertDialog.Builder(MediaplayerActivity.this); builder.setTitle(R.string.pref_fast_forward); builder.setSingleChoiceItems(choices, checked, - new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - choice = values[which]; - } + (dialog, which) -> { + choice = values[which]; }); builder.setNegativeButton(R.string.cancel_label, null); - builder.setPositiveButton(R.string.confirm_label, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - UserPreferences.setPrefFastForwardSecs(choice); - txtvFF.setText(String.valueOf(choice)); - } + builder.setPositiveButton(R.string.confirm_label, (dialog, which) -> { + UserPreferences.setPrefFastForwardSecs(choice); + txtvFF.setText(String.valueOf(choice)); }); builder.create().show(); return true; diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java index a629b8758..c67d65a9d 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/OnlineFeedViewActivity.java @@ -1,6 +1,5 @@ package de.danoeh.antennapod.activity; -import android.app.AlertDialog; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; @@ -9,6 +8,7 @@ import android.os.Bundle; import android.os.Looper; import android.support.v4.app.NavUtils; import android.support.v7.app.ActionBarActivity; +import android.support.v7.app.AlertDialog; import android.util.Log; import android.view.LayoutInflater; import android.view.MenuItem; diff --git a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromIntentActivity.java b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromIntentActivity.java index f7e9256c0..46e5f0e8e 100644 --- a/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromIntentActivity.java +++ b/app/src/main/java/de/danoeh/antennapod/activity/OpmlImportFromIntentActivity.java @@ -1,8 +1,8 @@ package de.danoeh.antennapod.activity; -import android.app.AlertDialog; import android.net.Uri; import android.os.Bundle; +import android.support.v7.app.AlertDialog; import android.util.Log; import de.danoeh.antennapod.core.preferences.UserPreferences; diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/ChapterListAdapter.java b/app/src/main/java/de/danoeh/antennapod/adapter/ChapterListAdapter.java index 22c15949a..cf0532cf1 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/ChapterListAdapter.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/ChapterListAdapter.java @@ -138,9 +138,9 @@ public class ChapterListAdapter extends ArrayAdapter<Chapter> { if (current != null) { if (current == sc) { holder.title.setTextColor(convertView.getResources().getColor( - R.color.bright_blue)); + R.color.holo_blue_light)); holder.start.setTextColor(convertView.getResources().getColor( - R.color.bright_blue)); + R.color.holo_blue_light)); } else { holder.title.setTextColor(defaultTextColor); holder.start.setTextColor(defaultTextColor); diff --git a/app/src/main/java/de/danoeh/antennapod/adapter/DefaultActionButtonCallback.java b/app/src/main/java/de/danoeh/antennapod/adapter/DefaultActionButtonCallback.java index 445e4832c..efdf1a3c9 100644 --- a/app/src/main/java/de/danoeh/antennapod/adapter/DefaultActionButtonCallback.java +++ b/app/src/main/java/de/danoeh/antennapod/adapter/DefaultActionButtonCallback.java @@ -1,9 +1,9 @@ package de.danoeh.antennapod.adapter; -import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; +import android.support.v7.app.AlertDialog; import android.widget.Toast; import org.apache.commons.lang3.Validate; diff --git a/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlExportWorker.java b/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlExportWorker.java index 3656c3638..3940eb8b6 100644 --- a/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlExportWorker.java +++ b/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlExportWorker.java @@ -1,13 +1,13 @@ package de.danoeh.antennapod.asynctask; import android.annotation.SuppressLint; -import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; import android.os.AsyncTask; +import android.support.v7.app.AlertDialog; import android.util.Log; import java.io.File; diff --git a/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlImportWorker.java b/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlImportWorker.java index 5486bc4fb..86636485d 100644 --- a/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlImportWorker.java +++ b/app/src/main/java/de/danoeh/antennapod/asynctask/OpmlImportWorker.java @@ -1,12 +1,12 @@ package de.danoeh.antennapod.asynctask; import android.annotation.SuppressLint; -import android.app.AlertDialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import android.os.AsyncTask; +import android.support.v7.app.AlertDialog; import android.util.Log; import de.danoeh.antennapod.core.BuildConfig; import de.danoeh.antennapod.core.R; @@ -37,8 +37,7 @@ public class OpmlImportWorker extends @Override protected ArrayList<OpmlElement> doInBackground(Void... params) { - if (BuildConfig.DEBUG) - Log.d(TAG, "Starting background work"); + Log.d(TAG, "Starting background work"); if (mReader==null) { return null; @@ -72,21 +71,14 @@ public class OpmlImportWorker extends } progDialog.dismiss(); if (exception != null) { - if (BuildConfig.DEBUG) - Log.d(TAG, - "An error occurred while trying to parse the opml document"); + Log.d(TAG, "An error occurred while trying to parse the opml document"); AlertDialog.Builder alert = new AlertDialog.Builder(context); alert.setTitle(R.string.error_label); alert.setMessage(context.getString(R.string.opml_reader_error) + exception.getMessage()); - alert.setNeutralButton(android.R.string.ok, new OnClickListener() { - - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - } - - }); + alert.setNeutralButton(android.R.string.ok, (dialog, which) -> { + dialog.dismiss(); + }); alert.create().show(); } } diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/AutoFlattrPreferenceDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/AutoFlattrPreferenceDialog.java index 1585f9b86..75b1bc8d2 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/AutoFlattrPreferenceDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/AutoFlattrPreferenceDialog.java @@ -2,9 +2,9 @@ package de.danoeh.antennapod.dialog; import android.annotation.SuppressLint; import android.app.Activity; -import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; +import android.support.v7.app.AlertDialog; import android.view.View; import android.widget.CheckBox; import android.widget.SeekBar; diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/GpodnetSetHostnameDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/GpodnetSetHostnameDialog.java index 16fb77f2a..5f531e88f 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/GpodnetSetHostnameDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/GpodnetSetHostnameDialog.java @@ -1,8 +1,8 @@ package de.danoeh.antennapod.dialog; -import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; +import android.support.v7.app.AlertDialog; import android.text.Editable; import android.text.InputType; import android.view.View; @@ -26,28 +26,19 @@ public class GpodnetSetHostnameDialog { et.setInputType(InputType.TYPE_TEXT_VARIATION_URI); dialog.setTitle(R.string.pref_gpodnet_sethostname_title) .setView(setupContentView(context, et)) - .setPositiveButton(R.string.confirm_label, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - final Editable e = et.getText(); - if (e != null) { - GpodnetPreferences.setHostname(e.toString()); - } - dialog.dismiss(); + .setPositiveButton(R.string.confirm_label, (dialog1, which) -> { + final Editable e = et.getText(); + if (e != null) { + GpodnetPreferences.setHostname(e.toString()); } + dialog1.dismiss(); }) - .setNegativeButton(R.string.cancel_label, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.cancel(); - } + .setNegativeButton(R.string.cancel_label, (dialog1, which) -> { + dialog1.cancel(); }) - .setNeutralButton(R.string.pref_gpodnet_sethostname_use_default_host, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - GpodnetPreferences.setHostname(GpodnetService.DEFAULT_BASE_HOST); - dialog.dismiss(); - } + .setNeutralButton(R.string.pref_gpodnet_sethostname_use_default_host, (dialog1, which) -> { + GpodnetPreferences.setHostname(GpodnetService.DEFAULT_BASE_HOST); + dialog1.dismiss(); }) .setCancelable(true); return dialog.show(); diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/SleepTimerDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/SleepTimerDialog.java index a699706a8..930079e40 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/SleepTimerDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/SleepTimerDialog.java @@ -17,11 +17,14 @@ import android.widget.EditText; import android.widget.Spinner; import android.widget.Toast; +import com.afollestad.materialdialogs.DialogAction; +import com.afollestad.materialdialogs.MaterialDialog; + import java.util.concurrent.TimeUnit; import de.danoeh.antennapod.R; -public abstract class SleepTimerDialog extends Dialog { +public abstract class SleepTimerDialog { private static final String TAG = SleepTimerDialog.class.getSimpleName(); @@ -35,39 +38,54 @@ public abstract class SleepTimerDialog extends Dialog { private String PREF_SHAKE_TO_RESET = "ShakeToReset"; private SharedPreferences prefs; + private MaterialDialog dialog; private EditText etxtTime; private Spinner spTimeUnit; private CheckBox cbShakeToReset; private CheckBox cbVibrate; - private Button butConfirm; - private Button butCancel; + private TimeUnit[] units = { TimeUnit.SECONDS, TimeUnit.MINUTES, TimeUnit.HOURS }; - public SleepTimerDialog(Context context, int titleTextId, int leftButtonTextId) { - super(context); + public SleepTimerDialog(Context context) { this.context = context; prefs = context.getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); } - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - requestWindowFeature(Window.FEATURE_NO_TITLE); - String[] spinnerContent = new String[] { - context.getString(R.string.time_seconds), - context.getString(R.string.time_minutes), - context.getString(R.string.time_hours) }; - - setContentView(R.layout.time_dialog); - etxtTime = (EditText) findViewById(R.id.etxtTime); - spTimeUnit = (Spinner) findViewById(R.id.spTimeUnit); - cbShakeToReset = (CheckBox) findViewById(R.id.cbShakeToReset); - cbVibrate = (CheckBox) findViewById(R.id.cbVibrate); - butConfirm = (Button) findViewById(R.id.butConfirm); - butCancel = (Button) findViewById(R.id.butCancel); + public MaterialDialog createNewDialog() { + MaterialDialog.Builder builder = new MaterialDialog.Builder(context); + builder.title(R.string.set_sleeptimer_label); + builder.customView(R.layout.time_dialog, false); + builder.positiveText(R.string.set_sleeptimer_label); + builder.negativeText(R.string.cancel_label); + builder.callback(new MaterialDialog.ButtonCallback() { + @Override + public void onNegative(MaterialDialog dialog) { + dialog.dismiss(); + } - setTitle(R.string.set_sleeptimer_label); + @Override + public void onPositive(MaterialDialog dialog) { + try { + savePreferences(); + long input = readTimeMillis(); + onTimerSet(input, cbShakeToReset.isChecked(), cbVibrate.isChecked()); + dialog.dismiss(); + } catch (NumberFormatException e) { + e.printStackTrace(); + Toast toast = Toast.makeText(context, R.string.time_dialog_invalid_input, + Toast.LENGTH_LONG); + toast.show(); + } + } + }); + dialog = builder.build(); + + View view = dialog.getView(); + etxtTime = (EditText) view.findViewById(R.id.etxtTime); + spTimeUnit = (Spinner) view.findViewById(R.id.spTimeUnit); + cbShakeToReset = (CheckBox) view.findViewById(R.id.cbShakeToReset); + cbVibrate = (CheckBox) view.findViewById(R.id.cbVibrate); etxtTime.setText(prefs.getString(PREF_VALUE, "15")); etxtTime.addTextChangedListener(new TextWatcher() { @@ -84,15 +102,16 @@ public abstract class SleepTimerDialog extends Dialog { public void onTextChanged(CharSequence s, int start, int before, int count) { } }); - etxtTime.postDelayed(new Runnable() { - @Override - public void run() { - InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); - imm.showSoftInput(etxtTime, InputMethodManager.SHOW_IMPLICIT); - } + etxtTime.postDelayed(() -> { + InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); + imm.showSoftInput(etxtTime, InputMethodManager.SHOW_IMPLICIT); }, 100); - ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(this.getContext(), + String[] spinnerContent = new String[] { + context.getString(R.string.time_seconds), + context.getString(R.string.time_minutes), + context.getString(R.string.time_hours) }; + ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(context, android.R.layout.simple_spinner_item, spinnerContent); spinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spTimeUnit.setAdapter(spinnerAdapter); @@ -102,40 +121,16 @@ public abstract class SleepTimerDialog extends Dialog { cbShakeToReset.setChecked(prefs.getBoolean(PREF_SHAKE_TO_RESET, true)); cbVibrate.setChecked(prefs.getBoolean(PREF_VIBRATE, true)); - butConfirm.setText(R.string.set_sleeptimer_label); - butConfirm.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - try { - savePreferences(); - long input = readTimeMillis(); - onTimerSet(input, cbShakeToReset.isChecked(), cbVibrate.isChecked()); - dismiss(); - } catch (NumberFormatException e) { - e.printStackTrace(); - Toast toast = Toast.makeText(context, R.string.time_dialog_invalid_input, - Toast.LENGTH_LONG); - toast.show(); - } - } - }); - - butCancel.setText(R.string.cancel_label); - butCancel.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - dismiss(); - } - }); + return dialog; } private void checkInputLength(int length) { if (length > 0) { Log.d(TAG, "Length is larger than 0, enabling confirm button"); - butConfirm.setEnabled(true); + dialog.getActionButton(DialogAction.POSITIVE).setEnabled(true); } else { Log.d(TAG, "Length is smaller than 0, disabling confirm button"); - butConfirm.setEnabled(false); + dialog.getActionButton(DialogAction.POSITIVE).setEnabled(false); } } diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/VariableSpeedDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/VariableSpeedDialog.java index 5f6e3d0e2..4b512a48d 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/VariableSpeedDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/VariableSpeedDialog.java @@ -1,11 +1,11 @@ package de.danoeh.antennapod.dialog; -import android.app.AlertDialog; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Build; +import android.support.v7.app.AlertDialog; import android.util.Log; import android.view.View; diff --git a/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedMenuHandler.java b/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedMenuHandler.java index f32a1c2ee..84da32a40 100644 --- a/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedMenuHandler.java +++ b/app/src/main/java/de/danoeh/antennapod/menuhandler/FeedMenuHandler.java @@ -1,10 +1,10 @@ package de.danoeh.antennapod.menuhandler; -import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; +import android.support.v7.app.AlertDialog; import android.util.Log; import android.view.Menu; import android.view.MenuInflater; diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/CustomEditTextPreference.java b/app/src/main/java/de/danoeh/antennapod/preferences/CustomEditTextPreference.java deleted file mode 100644 index 898a56004..000000000 --- a/app/src/main/java/de/danoeh/antennapod/preferences/CustomEditTextPreference.java +++ /dev/null @@ -1,33 +0,0 @@ -package de.danoeh.antennapod.preferences; - -import android.app.AlertDialog; -import android.content.Context; -import android.os.Build; -import android.preference.EditTextPreference; -import android.util.AttributeSet; - -import de.danoeh.antennapod.R; - -public class CustomEditTextPreference extends EditTextPreference { - - public CustomEditTextPreference(Context context, AttributeSet attrs, int defStyle) { - super(context, attrs, defStyle); - } - - public CustomEditTextPreference(Context context, AttributeSet attrs) { - super(context, attrs); - } - - public CustomEditTextPreference(Context context) { - super(context); - } - - @Override - protected void onPrepareDialogBuilder(AlertDialog.Builder builder) { - if(Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) { - builder.setInverseBackgroundForced(true); - getEditText().setTextColor(getContext().getResources().getColor(R.color.black)); - } - } - -} diff --git a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java index 138246038..f729ef807 100644 --- a/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java +++ b/app/src/main/java/de/danoeh/antennapod/preferences/PreferenceController.java @@ -1,7 +1,6 @@ package de.danoeh.antennapod.preferences; import android.app.Activity; -import android.app.AlertDialog; import android.app.TimePickerDialog; import android.content.Context; import android.content.DialogInterface; @@ -17,6 +16,7 @@ import android.preference.ListPreference; import android.preference.Preference; import android.preference.PreferenceManager; import android.preference.PreferenceScreen; +import android.support.v7.app.AlertDialog; import android.text.Editable; import android.text.TextWatcher; import android.text.format.DateFormat; diff --git a/app/src/main/res/layout-v14/directory_chooser.xml b/app/src/main/res/layout-v14/directory_chooser.xml index 8f9c4ee93..14e2f6a38 100644 --- a/app/src/main/res/layout-v14/directory_chooser.xml +++ b/app/src/main/res/layout-v14/directory_chooser.xml @@ -101,7 +101,7 @@ android:layout_width="match_parent" android:layout_height="1dp" android:layout_below="@id/butNavUp" - android:background="@color/bright_blue" /> + android:background="@color/holo_blue_light" /> </RelativeLayout> <ListView diff --git a/app/src/main/res/layout-v14/download_authentication_activity.xml b/app/src/main/res/layout-v14/download_authentication_activity.xml index 8d2c7fb17..f6925dc3a 100644 --- a/app/src/main/res/layout-v14/download_authentication_activity.xml +++ b/app/src/main/res/layout-v14/download_authentication_activity.xml @@ -12,7 +12,7 @@ android:layout_alignParentTop="true" android:textSize="@dimen/text_size_large" android:layout_margin="16dp" - android:textColor="@color/bright_blue" + android:textColor="@color/holo_blue_light" android:textStyle="italic"/> <TextView diff --git a/app/src/main/res/layout-v14/time_dialog.xml b/app/src/main/res/layout-v14/time_dialog.xml index aefb82b8b..06c2cce14 100644 --- a/app/src/main/res/layout-v14/time_dialog.xml +++ b/app/src/main/res/layout-v14/time_dialog.xml @@ -1,21 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical"> + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:gravity="center"> <LinearLayout - android:layout_width="match_parent" + android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" > <EditText android:id="@+id/etxtTime" - android:layout_width="0dp" + android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:layout_margin="8dp" - android:ems="7" + android:ems="2" android:hint="@string/enter_time_here_label" android:inputType="number" android:maxLength="2" > @@ -25,18 +26,13 @@ <Spinner android:id="@+id/spTimeUnit" - android:layout_width="180dp" + android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginTop="8dp" /> </LinearLayout> <LinearLayout - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:gravity="center"> - - <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical"> @@ -58,52 +54,6 @@ android:layout_height="wrap_content" android:text="@string/timer_vibration_label"/> - </LinearLayout> - </LinearLayout> - <RelativeLayout - android:id="@+id/footer" - android:layout_width="fill_parent" - android:layout_height="48dp" > - - <View - android:layout_width="match_parent" - android:layout_height="1dip" - android:layout_alignParentTop="true" - android:background="?android:attr/dividerVertical" /> - - <View - android:id="@+id/horizontal_divider" - android:layout_width="1dip" - android:layout_height="fill_parent" - android:layout_alignParentTop="true" - android:layout_centerHorizontal="true" - android:layout_marginBottom="4dp" - android:layout_marginTop="4dp" - android:background="?android:attr/dividerVertical" /> - - <Button - android:id="@+id/butCancel" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentBottom="true" - android:layout_alignParentLeft="true" - android:layout_alignParentTop="true" - android:layout_toLeftOf="@id/horizontal_divider" - android:background="?android:attr/selectableItemBackground" - android:text="@string/cancel_label" /> - - <Button - android:id="@+id/butConfirm" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_alignParentBottom="true" - android:layout_alignParentRight="true" - android:layout_alignParentTop="true" - android:layout_toRightOf="@id/horizontal_divider" - android:background="?android:attr/selectableItemBackground" - android:text="@string/confirm_label" /> - </RelativeLayout> - </LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/layout/directory_chooser.xml b/app/src/main/res/layout/directory_chooser.xml index 93cd1c0d3..635a73cf4 100644 --- a/app/src/main/res/layout/directory_chooser.xml +++ b/app/src/main/res/layout/directory_chooser.xml @@ -78,7 +78,7 @@ android:layout_width="match_parent" android:layout_height="1dp" android:layout_below="@id/butNavUp" - android:background="@color/bright_blue" /> + android:background="@color/holo_blue_light" /> </RelativeLayout> <ListView diff --git a/app/src/main/res/layout/download_authentication_activity.xml b/app/src/main/res/layout/download_authentication_activity.xml index b035f2516..27604973a 100644 --- a/app/src/main/res/layout/download_authentication_activity.xml +++ b/app/src/main/res/layout/download_authentication_activity.xml @@ -12,7 +12,7 @@ android:layout_alignParentTop="true" android:textSize="@dimen/text_size_large" android:layout_margin="16dp" - android:textColor="@color/bright_blue" + android:textColor="@color/holo_blue_light" android:textStyle="italic"/> <TextView diff --git a/app/src/main/res/layout/external_player_fragment.xml b/app/src/main/res/layout/external_player_fragment.xml index f9608fafc..ef83baa17 100644 --- a/app/src/main/res/layout/external_player_fragment.xml +++ b/app/src/main/res/layout/external_player_fragment.xml @@ -13,7 +13,7 @@ <View android:layout_width="match_parent" android:layout_height="2dp" - android:background="@color/bright_blue"/> + android:background="@color/holo_blue_light"/> <LinearLayout android:layout_width="match_parent" diff --git a/app/src/main/res/layout/feedinfo.xml b/app/src/main/res/layout/feedinfo.xml index edae51847..2b49b4b35 100644 --- a/app/src/main/res/layout/feedinfo.xml +++ b/app/src/main/res/layout/feedinfo.xml @@ -46,7 +46,7 @@ android:layout_height="1dp" android:layout_below="@id/imgvCover" android:layout_marginTop="8dp" - android:background="@color/bright_blue"/> + android:background="@color/holo_blue_light"/> </RelativeLayout> <ScrollView diff --git a/app/src/main/res/layout/time_dialog.xml b/app/src/main/res/layout/time_dialog.xml index e387a1689..b270e82f7 100644 --- a/app/src/main/res/layout/time_dialog.xml +++ b/app/src/main/res/layout/time_dialog.xml @@ -1,46 +1,40 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:tools="http://schemas.android.com/tools" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical" > + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:orientation="vertical" + android:gravity="center"> <LinearLayout - android:layout_width="match_parent" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:orientation="horizontal" > + android:orientation="horizontal"> <EditText android:id="@+id/etxtTime" - android:layout_width="0dp" + android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:layout_margin="8dp" - android:ems="7" + android:ems="2" android:hint="@string/enter_time_here_label" - android:inputType="number" - android:maxLength="2" > - - </EditText> + android:inputType="number" + android:maxLength="2" /> <Spinner android:id="@+id/spTimeUnit" - android:layout_width="180dp" + android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:layout_marginTop="8dp" /> + </LinearLayout> <LinearLayout - android:layout_width="match_parent" + android:layout_width="wrap_content" android:layout_height="wrap_content" - android:gravity="center"> - - <LinearLayout - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical"> + android:orientation="vertical"> <TextView android:layout_width="wrap_content" @@ -59,30 +53,6 @@ android:layout_height="wrap_content" android:text="@string/timer_vibration_label"/> - </LinearLayout> - - </LinearLayout> - - <LinearLayout - style="@android:style/ButtonBar" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="horizontal" > - - <Button - android:id="@+id/butConfirm" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginRight="8dp" - android:layout_weight="1" - tools:text="Confirm" /> - - <Button - android:id="@+id/butCancel" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_weight="1" - tools:text="Cancel" /> </LinearLayout> </LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 09cf48b02..38350155a 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -2,7 +2,7 @@ <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceCategory android:title="@string/user_interface_label"> - <ListPreference + <com.afollestad.materialdialogs.prefs.MaterialListPreference android:entryValues="@array/theme_values" android:entries="@array/theme_options" android:title="@string/pref_set_theme_title" @@ -17,14 +17,14 @@ android:key="prefHiddenDrawerItems" android:summary="@string/pref_nav_drawer_items_sum" android:title="@string/pref_nav_drawer_items_title" /> - <ListPreference + <com.afollestad.materialdialogs.prefs.MaterialListPreference android:entryValues="@array/nav_drawer_feed_order_values" android:entries="@array/nav_drawer_feed_order_options" android:title="@string/pref_nav_drawer_feed_order_title" android:key="prefDrawerFeedOrder" android:summary="@string/pref_nav_drawer_feed_order_sum" android:defaultValue="0"/> - <ListPreference + <com.afollestad.materialdialogs.prefs.MaterialListPreference android:entryValues="@array/nav_drawer_feed_counter_values" android:entries="@array/nav_drawer_feed_counter_options" android:title="@string/pref_nav_drawer_feed_counter_title" @@ -107,7 +107,7 @@ android:key="prefAutoDelete" android:summary="@string/pref_auto_delete_sum" android:title="@string/pref_auto_delete_title"/> - <ListPreference + <com.afollestad.materialdialogs.prefs.MaterialListPreference android:defaultValue="30" android:entries="@array/smart_mark_as_played_values" android:entryValues="@array/smart_mark_as_played_values" @@ -145,7 +145,7 @@ android:summary="@string/pref_mobileUpdate_sum" android:title="@string/pref_mobileUpdate_title"/> - <ListPreference + <com.afollestad.materialdialogs.prefs.MaterialListPreference android:defaultValue="-1" android:entries="@array/episode_cleanup_entries" android:key="prefEpisodeCleanup" @@ -153,12 +153,12 @@ android:summary="@string/pref_episode_cleanup_summary" android:entryValues="@array/episode_cleanup_values"/> - <de.danoeh.antennapod.preferences.CustomEditTextPreference - android:defaultValue="6" + <com.afollestad.materialdialogs.prefs.MaterialEditTextPreference + android:defaultValue="4" android:inputType="number" android:key="prefParallelDownloads" android:title="@string/pref_parallel_downloads_title"/> - <ListPreference + <com.afollestad.materialdialogs.prefs.MaterialListPreference android:defaultValue="20" android:entries="@array/episode_cache_size_entries" android:key="prefEpisodeCacheSize" diff --git a/core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java b/core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java index fea2bbb2b..abb75e5e7 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java +++ b/core/src/main/java/de/danoeh/antennapod/core/dialog/ConfirmationDialog.java @@ -1,8 +1,8 @@ package de.danoeh.antennapod.core.dialog; -import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; +import android.support.v7.app.AlertDialog; import android.util.Log; import de.danoeh.antennapod.core.R; diff --git a/core/src/main/java/de/danoeh/antennapod/core/dialog/DownloadRequestErrorDialogCreator.java b/core/src/main/java/de/danoeh/antennapod/core/dialog/DownloadRequestErrorDialogCreator.java index 3d174bd8e..b7e79431d 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/dialog/DownloadRequestErrorDialogCreator.java +++ b/core/src/main/java/de/danoeh/antennapod/core/dialog/DownloadRequestErrorDialogCreator.java @@ -1,8 +1,9 @@ package de.danoeh.antennapod.core.dialog; -import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; +import android.support.v7.app.AlertDialog; + import de.danoeh.antennapod.core.R; /** Creates Alert Dialogs if a DownloadRequestException has happened. */ diff --git a/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrUtils.java b/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrUtils.java index f37933876..318839e1d 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrUtils.java +++ b/core/src/main/java/de/danoeh/antennapod/core/util/flattr/FlattrUtils.java @@ -1,6 +1,5 @@ package de.danoeh.antennapod.core.util.flattr; -import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; @@ -8,6 +7,7 @@ import android.content.Intent; import android.content.SharedPreferences; import android.net.Uri; import android.preference.PreferenceManager; +import android.support.v7.app.AlertDialog; import android.util.Log; import org.apache.commons.lang3.StringUtils; diff --git a/core/src/main/res/values-v16/styles.xml b/core/src/main/res/values-v16/styles.xml index e7c56b5f5..a92790152 100644 --- a/core/src/main/res/values-v16/styles.xml +++ b/core/src/main/res/values-v16/styles.xml @@ -9,7 +9,7 @@ <style name="AntennaPod.Dialog.Title" parent="@android:style/TextAppearance.Medium"> <item name="android:textSize">@dimen/text_size_medium</item> - <item name="android:textColor">@color/bright_blue</item> + <item name="android:textColor">@color/holo_blue_light</item> <item name="android:maxLines">2</item> <item name="android:ellipsize">end</item> <item name="android:fontFamily">sans-serif-light</item> diff --git a/core/src/main/res/values/colors.xml b/core/src/main/res/values/colors.xml index 566032da8..72897ed07 100644 --- a/core/src/main/res/values/colors.xml +++ b/core/src/main/res/values/colors.xml @@ -6,7 +6,8 @@ <color name="grey600">#757575</color> <color name="light_gray">#bfbfbf</color> <color name="black">#000000</color> - <color name="bright_blue">#33B5E5</color> + <color name="holo_blue_light">#33B5E5</color> + <color name="holo_blue_dark">#0099CC</color> <color name="ics_gray">#858585</color> <color name="actionbar_gray">#DDDDDD</color> <color name="download_success_green">#669900</color> @@ -26,7 +27,6 @@ <!-- Theme colors --> <color name="primary_light">#FFFFFF</color> - <color name="color_accent">#009EC8</color> -</resources>
\ No newline at end of file +</resources> diff --git a/core/src/main/res/values/styles.xml b/core/src/main/res/values/styles.xml index 5d1eac12d..b9ee70dbf 100644 --- a/core/src/main/res/values/styles.xml +++ b/core/src/main/res/values/styles.xml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="utf-8"?> <resources xmlns:android="http://schemas.android.com/apk/res/android"> - <style name="Theme.AntennaPod.Light" parent="@style/Theme.AppCompat.Light"> + <style name="Theme.AntennaPod.Light" parent="Theme.AppCompat.Light"> <item name="colorPrimary">@color/primary_light</item> - <item name="colorAccent">@color/color_accent</item> + <item name="colorAccent">@color/holo_blue_light</item> <item name="buttonStyle">@style/Widget.AntennaPod.Button</item> + <item name="alertDialogTheme">@style/AntennaPod.Dialog.Light</item> <item name="attr/action_bar_icon_color">@color/grey600</item> <item name="attr/action_about">@drawable/ic_info_grey600_24dp</item> <item name="attr/action_search">@drawable/ic_search_grey600_24dp</item> @@ -49,11 +50,12 @@ <item name="attr/ic_filter">@drawable/ic_filter_grey600_24dp</item> </style> - <style name="Theme.AntennaPod.Dark" parent="@style/Theme.AppCompat"> - <item name="colorAccent">@color/color_accent</item> + <style name="Theme.AntennaPod.Dark" parent="Theme.AppCompat"> + <item name="colorAccent">@color/holo_blue_dark</item> <item name="buttonStyle">@style/Widget.AntennaPod.Button</item> + <item name="alertDialogTheme">@style/AntennaPod.Dialog.Dark</item> <item name="attr/action_bar_icon_color">@color/white</item> - <item name="attr/action_about">@drawable/ic_info_white_24dp</item> + <item name="attr/action_about">@drawable/ic_info_white_24dp</item>g <item name="attr/action_search">@drawable/ic_search_white_24dp</item> <item name="attr/action_stream">@drawable/ic_settings_input_antenna_white_24dp</item> <item name="attr/av_download">@drawable/ic_file_download_white_24dp</item> @@ -96,12 +98,13 @@ <item name="attr/ic_filter">@drawable/ic_filter_white_24dp</item> </style> - <style name="Theme.AntennaPod.Light.NoTitle" parent="@style/Theme.AppCompat.Light.NoActionBar"> + <style name="Theme.AntennaPod.Light.NoTitle" parent="Theme.AppCompat.Light.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowActionModeOverlay">true</item> <item name="colorPrimary">@color/primary_light</item> - <item name="colorAccent">@color/color_accent</item> + <item name="colorAccent">@color/holo_blue_light</item> <item name="buttonStyle">@style/Widget.AntennaPod.Button</item> + <item name="alertDialogTheme">@style/AntennaPod.Dialog.Light</item> <item name="attr/action_about">@drawable/ic_info_grey600_24dp</item> <item name="attr/action_search">@drawable/ic_search_grey600_24dp</item> <item name="attr/action_stream">@drawable/ic_settings_input_antenna_grey600_24dp</item> @@ -145,11 +148,12 @@ <item name="attr/ic_filter">@drawable/ic_filter_grey600_24dp</item> </style> - <style name="Theme.AntennaPod.Dark.NoTitle" parent="@style/Theme.AppCompat.NoActionBar"> + <style name="Theme.AntennaPod.Dark.NoTitle" parent="Theme.AppCompat.NoActionBar"> <item name="windowActionBar">false</item> <item name="windowActionModeOverlay">true</item> - <item name="colorAccent">@color/color_accent</item> + <item name="colorAccent">@color/holo_blue_dark</item> <item name="buttonStyle">@style/Widget.AntennaPod.Button</item> + <item name="alertDialogTheme">@style/AntennaPod.Dialog.Dark</item> <item name="attr/action_about">@drawable/ic_info_white_24dp</item> <item name="attr/action_search">@drawable/ic_search_white_24dp</item> <item name="attr/action_stream">@drawable/ic_settings_input_antenna_white_24dp</item> @@ -197,44 +201,6 @@ <item name="windowActionBarOverlay">true</item> </style> - <style name="UndoBar"> - <item name="android:layout_width">match_parent</item> - <item name="android:layout_height">48dp</item> - <item name="android:layout_gravity">bottom</item> - <item name="android:layout_marginLeft">8dp</item> - <item name="android:layout_marginRight">8dp</item> - <item name="android:layout_marginBottom">16dp</item> - <item name="android:orientation">horizontal</item> - <item name="android:background">@drawable/undobar</item> - <item name="android:clickable">true</item> - <item name="android:divider">@drawable/undobar_divider</item> - </style> - - <style name="UndoBarMessage"> - <item name="android:layout_width">0dp</item> - <item name="android:layout_weight">1</item> - <item name="android:layout_height">wrap_content</item> - <item name="android:layout_marginLeft">16dp</item> - <item name="android:layout_gravity">center_vertical</item> - <item name="android:layout_marginRight">16dp</item> - <item name="android:textAppearance">?android:textAppearanceMedium</item> - <item name="android:textColor">#fff</item> - </style> - - <style name="UndoBarButton"> - <item name="android:layout_width">wrap_content</item> - <item name="android:layout_height">match_parent</item> - <item name="android:paddingLeft">16dp</item> - <item name="android:paddingRight">16dp</item> - <item name="android:background">@drawable/undobar_button</item> - <item name="android:drawableLeft">@drawable/ic_undobar_undo</item> - <item name="android:drawablePadding">12dp</item> - <item name="android:textAppearance">?android:textAppearanceSmall</item> - <item name="android:textStyle">bold</item> - <item name="android:textColor">#fff</item> - <item name="android:text">@string/undo</item> - </style> - <style name="AntennaPod.TextView.Heading" parent="@android:style/TextAppearance.Medium"> <item name="android:textSize">@dimen/text_size_large</item> <item name="android:textColor">?android:attr/textColorPrimary</item> @@ -271,6 +237,14 @@ <item name="textAllCaps">false</item> </style> + <style name="AntennaPod.Dialog.Light" parent="Theme.AppCompat.Light.Dialog"> + <item name="colorAccent">@color/holo_blue_light</item> + </style> + + <style name="AntennaPod.Dialog.Dark" parent="Theme.AppCompat.Dialog"> + <item name="colorAccent">@color/holo_blue_dark</item> + </style> + <style name="BigBlurryBackground"> <item name="android:scaleType">centerCrop</item> <!-- <item name="android:tint">@color/image_readability_tint</item> --> |