Can someone please tell me how to do this? here is the code:
public class MainActivity extends Activity implements
ActionBar.TabListener, android.content.SharedPreferences.OnSharedPreferenceChangeListener{
public s fg = new s();
public static class Others extends PreferenceFragment{
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preference_other);
Preference pref = findPreference("start");
pref.setOnPreferenceClickListener(new OnPreferenceClickListener(){
@Override
public boolean onPreferenceClick(Preference preference) {
HOW CAN I CALL S CLASS HERE
return false;
}
});
}
}
}
My question is how do I call fg.start() from the Others class. Thanks in advance.