VKID Protection alert in music settings
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
package ru.vtosters.lite.ui.fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import static ru.vtosters.lite.utils.Globals.getContext;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.preference.Preference;
|
||||
|
||||
import com.vk.navigation.Navigator;
|
||||
import com.vk.webapp.VKConnect;
|
||||
import com.vtosters.lite.R;
|
||||
import com.vtosters.lite.fragments.MaterialPreferenceToolbarFragment;
|
||||
|
||||
@@ -10,5 +17,23 @@ public class MusicFragment extends MaterialPreferenceToolbarFragment {
|
||||
public void b(Bundle bundle) {
|
||||
super.b(bundle);
|
||||
a(R.xml.preferences_music);
|
||||
prefs();
|
||||
}
|
||||
|
||||
private void prefs() {
|
||||
a("vkid_warn").a(new MusicFragment.openvkid());
|
||||
}
|
||||
|
||||
public static class openvkid implements Preference.c {
|
||||
openvkid() {
|
||||
}
|
||||
|
||||
@Override // android.support.v7.preference.Preference.c
|
||||
public boolean a(Preference preference) {
|
||||
Context context = getContext();
|
||||
Intent a2 = new Navigator(VKConnect.class).a(context);
|
||||
context.startActivity(a2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<Preference
|
||||
android:key="vkid_warn"
|
||||
android:summary="@string/vkidsumm"
|
||||
android:title="@string/debug_warning" />
|
||||
<PreferenceCategory android:title="@string/vkx_title">
|
||||
<Preference
|
||||
android:enabled="false"
|
||||
|
||||
Reference in New Issue
Block a user