- added long click support to disable/enabled all layers

- some refactoring
This commit is contained in:
Philipp Schaefer
2013-08-04 00:43:37 +02:00
parent 8563498ded
commit 756dabacfa
9 changed files with 293 additions and 263 deletions

View File

@@ -12,23 +12,23 @@ import android.widget.TextView;
public class IITC_AboutDialogPreference extends DialogPreference {
private final Context context;
private final Context mContext;
public IITC_AboutDialogPreference(Context context, AttributeSet attrs) {
super(context, attrs);
this.context = context;
this.mContext = context;
}
/*
* start a little about-dialog srsly...I found no better way for clickable
* start an about-dialog...I found no better way for clickable
* links in a TextView then using Html.fromHtml...Linkify is just broken and
* does not understand html href tags...so let's tag the @string/about_msg
* with CDATA and use Html.fromHtml(...) for clickable hrefs with tags.
*/
@Override
protected void onPrepareDialogBuilder(Builder builder) {
final TextView message = new TextView(context);
String about_msg = context.getText(R.string.pref_about_msg).toString();
final TextView message = new TextView(mContext);
String about_msg = mContext.getText(R.string.pref_about_msg).toString();
message.setText(Html.fromHtml(about_msg));
message.setMovementMethod(LinkMovementMethod.getInstance());
builder.setView(message).setTitle(R.string.about)