// Path: Demo/src/main/java/com/braintreepayments/demo/fragments/SettingsFragment.java
// public class SettingsFragment extends PreferenceFragment
//         implements OnSharedPreferenceChangeListener {
// 
//     @Override
//     public void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         addPreferencesFromResource(R.xml.settings);
// 
//         SharedPreferences preferences = getPreferenceManager().getSharedPreferences();
//         onSharedPreferenceChanged(preferences, "paypal_payment_type");
//         preferences.registerOnSharedPreferenceChangeListener(this);
//     }
// 
//     @Override
//     public void onDestroy() {
//         super.onDestroy();
//         getPreferenceManager().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
//     }
// 
//     @Override
//     public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
//         Preference preference = findPreference(key);
//         if (preference instanceof ListPreference) {
//             preference.setSummary(((ListPreference) preference).getEntry());
//         } else if (preference instanceof SummaryEditTestPreference) {
//             preference.setSummary(preference.getSummary());
//         }
//     }
// }


import android.os.Bundle;
import android.view.MenuItem;
import com.braintreepayments.demo.fragments.SettingsFragment;
import androidx.appcompat.app.AppCompatActivity;
package com.braintreepayments.demo;




public class SettingsActivity extends AppCompatActivity {

    @SuppressWarnings("ConstantConditions")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);

        getFragmentManager().beginTransaction()
// Path: Demo/src/main/java/com/braintreepayments/demo/fragments/SettingsFragment.java
// public class SettingsFragment extends PreferenceFragment
//         implements OnSharedPreferenceChangeListener {
// 
//     @Override
//     public void onCreate(Bundle savedInstanceState) {
//         super.onCreate(savedInstanceState);
//         addPreferencesFromResource(R.xml.settings);
// 
//         SharedPreferences preferences = getPreferenceManager().getSharedPreferences();
//         onSharedPreferenceChanged(preferences, "paypal_payment_type");
//         preferences.registerOnSharedPreferenceChangeListener(this);
//     }
// 
//     @Override
//     public void onDestroy() {
//         super.onDestroy();
//         getPreferenceManager().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
//     }
// 
//     @Override
//     public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
//         Preference preference = findPreference(key);
//         if (preference instanceof ListPreference) {
//             preference.setSummary(((ListPreference) preference).getEntry());
//         } else if (preference instanceof SummaryEditTestPreference) {
//             preference.setSummary(preference.getSummary());
//         }
//     }
// }


// Path: Demo/src/main/java/com/braintreepayments/demo/SettingsActivity.java
import android.os.Bundle;
import android.view.MenuItem;
import com.braintreepayments.demo.fragments.SettingsFragment;
import androidx.appcompat.app.AppCompatActivity;

package com.braintreepayments.demo;




public class SettingsActivity extends AppCompatActivity {

    @SuppressWarnings("ConstantConditions")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        getSupportActionBar().setDisplayHomeAsUpEnabled(true);

        getFragmentManager().beginTransaction()
                .replace(android.R.id.content, new SettingsFragment())