I have Two activity
In one I receive attributes and save them to SharedPreferences
ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences (this);
ISharedPreferencesEditor editor = prefs.Edit ();
Console.WriteLine(Code1);
editor.PutString ("title", (string)(firstitem ["post_title"]));
editor.PutString ("price", (string)(firstitem ["price"] + " грн"));
editor.PutString ("count", counttext.Text);
editor.Apply ();
On second I show what in SharedPreferences.
ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences (this);
string product = prefs.GetString ("title","");
string _weight = prefs.GetString ("count","");
string _price = prefs.GetString ("price","");
Code2 = Intent.GetStringExtra ("Code1");
_count = _weight;
productname.Text = product;
weight.Text = _weight;
price.Text = _price;
I need to keep LinearLayout visibility:GONE when attribute doesn't write to shared preference in first activity.
How I can do this?
And second question. Can I save to SharedPreferences attributes and show them on same activity?