Plz me ajudar eu tenho um aplicativo com um botão e também uma exibição de texto (ex numérico. 100)
eu sou clique no botão em seguida, incrementar Textview (valor) +5.
Estou tentando enviar valor para Php Tabela Row e também recuperar a tabela de dados Row no mesmo texto View.
no aplicativo foi fechar e abrir, em seguida, buscar PHP dados (servidor) como por Texview
minha mesa
- identidade
- USER_NAME
- montante
MyActivity.java
public class MainActivity extends AppCompatActivity {
int minteger = 0;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void increaseInteger(View view) {
minteger = minteger + 5 ;
display(minteger);
}
private void display(int number) {
TextView displayInteger = (TextView) findViewById(
R.id.integer_number);
displayInteger.setText(Integer: + number);
}
}
activity_main.xml
<?xml version=1.0 encoding=utf-8?>
<LinearLayout xmlns:android=http://schemas.android.com/apk/res/android
xmlns:tools=http://schemas.android.com/tools
android:layout_width=match_parent
android:layout_height=match_parent
android:layout_margin=16dp
android:orientation=vertical
android:gravity=center_horizontal
tools:context=.MainActivity>
<TextView
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=Click the plus button to increase integer number />
<TextView
android:id=@+id/integer_number
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_marginTop=16dp
android:layout_marginBottom=16dp
android:textSize=30sp
android:text=Integer: 0 />
<Button
android:id=@+id/increase
android:onClick=increaseInteger
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=INCREASE />
<TextView
android:layout_width=wrap_content
android:layout_height=match_parent
android:gravity=bottom
android:textSize=20sp
android:text=viralandroid.com/>
</LinearLayout>
Por favor responda