В моей деятельности я имею 15% экрана для входа в систему, это TextView и кнопка:обновить часть деятельности
<TextView
android:id="@+id/registered_text"
android:color = "@color/white"
android:layout_width="wrap_content"
android:textSize="20dip"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
></TextView>
<Button
style="@style/myButton"
android:id="@+id/reg_button"
android:layout_width="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginRight="10dip"
android:layout_height="wrap_content"
>
</Button>
Значение TextView и текст кнопки и слушателем, зависит от пользователя зарегистрирован или нет:
loginDB login = new loginDB(context);
Cursor cursor = login.logData(new String[]{"userJoomla", "idUSER", "name","email"});
if (cursor.moveToFirst()) {
userJoomla = cursor.getInt(0);
userID = cursor.getInt(1);
name = cursor.getString(2);
email = cursor.getString(3);
greeting.setText("Hola " + name);
loginLogout.setText("Desconectarme");
loginLogout.setOnClickListener(logout);
} else {
name = "usuario móvil";
greeting.setText("");
loginLogout.setText("Identificarme");
loginLogout.setOnClickListener(newLogin);
}
login.close();
Как обновить его при входе в систему или выходе из системы?
Спасибо заранее
что вы хотите обновить? Вы хотите поменять весь экран? –