enable java8 language features

pull/1/head
Felix Prahl-Kamps 2019-07-24 13:48:55 +02:00
parent 6233f139c0
commit c67d49eccb
2 changed files with 6 additions and 8 deletions

View File

@ -19,6 +19,11 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
} }
} }
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
buildToolsVersion = '29.0.1'
} }
dependencies { dependencies {

View File

@ -8,7 +8,6 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction; import androidx.fragment.app.FragmentTransaction;
import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat; import androidx.preference.PreferenceFragmentCompat;
import lu.circl.mispbump.R; import lu.circl.mispbump.R;
@ -41,13 +40,7 @@ public class PreferenceActivity extends AppCompatActivity {
@Override @Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) { public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
setPreferencesFromResource(R.xml.preference_screen_main, rootKey); setPreferencesFromResource(R.xml.preference_screen_main, rootKey);
findPreference("PREF_DELETE_ALL_SYNCS").setOnPreferenceClickListener(preference -> true);
findPreference("PREF_DELETE_ALL_SYNCS").setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
return true;
}
});
} }
} }
} }