۱۳۹۴/۰۸/۳۰, ۰۱:۵۰ ق.ظ
(آخرین تغییر در ارسال: ۱۳۹۴/۰۸/۳۰, ۰۱:۵۲ ق.ظ توسط fvddesigner.)
این کدهاست و ولی خطا میده ... با آی دی هم که سرچ می کنم بین ویوها خطا داد.
کد پیاچپی:
int totalid = main.getChildCount();
SharedPreferences shared = getSharedPreferences("Prefs", MODE_PRIVATE);
String sTag;
k = 0;
for (int c = 0; c <= totalid; c++) {
sTag = String.valueOf(view.findViewById(++c).getTag());
if (sTag == "btn" + String.valueOf(++c)) {
x1[k] = view.findViewById(++c).getX();
y1[k] = view.findViewById(++c).getY();
k++;
SharedPreferences.Editor editor = shared.edit();
editor.putFloat("x" + k, x1[k]);
editor.apply();
}
}