so what can i do?
2011/6/21 Kostya Vasilyev kmans...@gmail.com
Ariel,
Pass an existing instance of Activity / Service / whatever extending
Context to your class, as needed. Call getApplicationContext as necessary,
to avoid keeping a reference to something which may go away (such as an
On Wed, Jun 22, 2011 at 4:36 AM, אריאל arielgordon...@gmail.com wrote:
so what can i do?
Did you read Kostya's post? 'Cause your question was answered quite well.
-
TreKing
yes i know this but how i used this from some activities?
2011/6/21 TreKing treking...@gmail.com
On Mon, Jun 20, 2011 at 5:15 PM, אריאל arielgordon...@gmail.com wrote:
so how i can to save setting with SharedPreferences and to get and set
from other activity?
Read the documentation. Using
It just depends on what class settingM is.
I somehow have a feeling it's a subclass of Activity or Context, and you
instantiate it yourself with new settingM - is that true?
-- Kostya
2011/6/21 אריאל arielgordon...@gmail.com
yes i know this but how i used this from some activities?
yes because SharedPreferences must to extract Activity or Context
how i repair this?
2011/6/21 Kostya Vasilyev kmans...@gmail.com
It just depends on what class settingM is.
I somehow have a feeling it's a subclass of Activity or Context, and you
instantiate it yourself with new settingM - is
Ariel,
Pass an existing instance of Activity / Service / whatever extending Context
to your class, as needed. Call getApplicationContext as necessary, to avoid
keeping a reference to something which may go away (such as an activity).
As a rule, never instantiate Activity or Service subclasses
hello
sorry about my english...
i have a class settingM:
static SharedPreferences myPreferences;
public final String PREF_FILE_NAME = PrefFile;
public settingM()
{
myPreferences = getSharedPreferences(PREF_FILE_NAME, MODE_WORLD_READABLE);
}
when i create a obj from this class i get the
On Mon, Jun 20, 2011 at 12:54 PM, אריאל arielgordon...@gmail.com wrote:
when i create a obj from this class i get the force close message
what the problem with the constructor?
What does the LogCat say?
06-20 17:30:52.020: ERROR/AndroidRuntime(17614): java.lang.RuntimeException:
Unable to start activity ComponentInfo{Hello.ariel/Hello.ariel.road}:
java.lang.NullPointerException
2011/6/20 TreKing treking...@gmail.com
On Mon, Jun 20, 2011 at 12:54 PM, אריאל arielgordon...@gmail.com wrote:
On Mon, Jun 20, 2011 at 1:03 PM, אריאל arielgordon...@gmail.com wrote:
06-20 17:30:52.020: ERROR/AndroidRuntime(17614):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{Hello.ariel/Hello.ariel.road}: java.lang.NullPointerException
Something is null. Use your debugger and
so how i can to save setting with SharedPreferences and to get and set from
other activity?
2011/6/20 TreKing treking...@gmail.com
On Mon, Jun 20, 2011 at 1:03 PM, אריאל arielgordon...@gmail.com wrote:
06-20 17:30:52.020: ERROR/AndroidRuntime(17614):
java.lang.RuntimeException: Unable to
On Mon, Jun 20, 2011 at 5:15 PM, אריאל arielgordon...@gmail.com wrote:
so how i can to save setting with SharedPreferences and to get and set from
other activity?
Read the documentation. Using SharedPreferences is very straight forward and
well-documented.
I've a problem with this code:
public class Xml extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.liste);
}
13 matches
Mail list logo