LibreOffice Module android (master) 1
SettingsListenerModel.java
Go to the documentation of this file.
1/*
2 *
3 * * This file is part of the LibreOffice project.
4 * * This Source Code Form is subject to the terms of the Mozilla Public
5 * * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 *
8 */
9package org.libreoffice;
10
11import android.content.SharedPreferences;
12
14
16 void settingsPreferenceChanged(SharedPreferences sharedPreferences, String key);
17 }
18
21 private SharedPreferences sharedPreferences;
22 private String key;
23
25
27 if(mInstance == null) {
29 }
30 return mInstance;
31 }
32
34 mListener = listener;
35 }
36
37 public void changePreferenceState(SharedPreferences sharedPreferences, String key) {
38 if(mListener != null) {
39 this.sharedPreferences = sharedPreferences;
40 this.key = key;
42 }
43 }
44
45 public SharedPreferences getSharedPreferences() {
46 return sharedPreferences;
47 }
48
49 public String getKey(){
50 return key;
51 }
52
53 private void notifyPreferenceChange(SharedPreferences preferences, String key) {
55 }
56}
void setListener(OnSettingsPreferenceChangedListener listener)
void notifyPreferenceChange(SharedPreferences preferences, String key)
void changePreferenceState(SharedPreferences sharedPreferences, String key)
OnSettingsPreferenceChangedListener mListener
static SettingsListenerModel getInstance()
void settingsPreferenceChanged(SharedPreferences sharedPreferences, String key)