12

Crear y llenar una tabla en Android Studio y Mysql [12]

En este video vamos a crear y llenar una tabla en Android Studio y Mysql siguiendo estos pasos.

  • Creamos un archivo de tipo “AndroidResourceFile” donde insertamos un TableRow con dos TextView y dos Botones.
    • Nombre, Email y los botones Editar y Borrar.
  • En nuestro MainActivity llenamos el TableLayout.
  • A nuestros botones Editar y Borrar les personalizamos el id.
Crear y llenar una tabla en Android Studio y Mysql

Codigo: https://github.com/programadornovato/AndroidMysql/commit/3736cd8b97e54808538a62e5e0f8e13a36e24c48

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
//app/src/main/java/com/programadornovato/androidmysql/MainActivity.kt
package com.programadornovato.androidmysql
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.widget.EditText
import android.widget.TableLayout
import android.widget.TextView
import android.widget.Toast
import com.android.volley.Request
import com.android.volley.Response
import com.android.volley.toolbox.StringRequest
import com.android.volley.toolbox.Volley
class MainActivity : AppCompatActivity() {
var txtNombre:EditText?=null
var txtEmail:EditText?=null
var txtTelefono:EditText?=null
var txtPass:EditText?=null
var tbUsuarios:TableLayout?=null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
txtNombre=findViewById(R.id.txtNombre)
txtEmail=findViewById(R.id.txtEmail)
txtTelefono=findViewById(R.id.txtTelefono)
txtPass=findViewById(R.id.txtPass)
tbUsuarios=findViewById(R.id.tbUsuarios)
tbUsuarios?.removeAllViews()
for (i in 0 until 5){
val registro=LayoutInflater.from(this).inflate(R.layout.table_row_np,null,false)
val colNombre=registro.findViewById<View>(R.id.colNombre) as TextView
val colEmail=registro.findViewById<View>(R.id.colEmail) as TextView
val colEditar=registro.findViewById<View>(R.id.colEditar)
val colBorrar=registro.findViewById<View>(R.id.colBorrar)
colNombre.text="Nombre $i"
colEmail.text="Email $i"
colEditar.id=i
colBorrar.id=i
tbUsuarios?.addView(registro)
}
}
fun clickTablaEditar(view: View){
Toast.makeText(this,view.id.toString(),Toast.LENGTH_LONG).show()
}
fun clickTablaBorrar(view: View){
Toast.makeText(this,view.id.toString(),Toast.LENGTH_LONG).show()
}
fun clickBtnInsertar(view:View){
val url="http://192.168.8.100/android_mysql/insertar.php"
val queue=Volley.newRequestQueue(this)
var resultadoPost = object : StringRequest(Request.Method.POST,url,
Response.Listener<String> { response ->
Toast.makeText(this,"Usuario insertado exitosamente",Toast.LENGTH_LONG).show()
},Response.ErrorListener { error ->
Toast.makeText(this,"Error $error ",Toast.LENGTH_LONG).show()
}){
override fun getParams(): MutableMap<String, String> {
val parametros=HashMap<String,String>()
parametros.put("nombre",txtNombre?.text.toString())
parametros.put("email",txtEmail?.text.toString())
parametros.put("telefono",txtTelefono?.text.toString())
parametros.put("pass",txtPass?.text.toString())
return parametros
}
}
queue.add(resultadoPost)
}
fun cickVer(view: View){
var txtId=findViewById<EditText>(R.id.txtId)
var intent= Intent(this,MainActivity2::class.java)
intent.putExtra("id",txtId.text.toString())
startActivity(intent)
}
}
///app/src/main/res/layout/activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<EditText
android:id="@+id/txtNombre"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:ems="10"
android:hint="Nombre"
android:inputType="textPersonName"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tbUsuarios" />
<EditText
android:id="@+id/txtId"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginLeft="20dp"
android:layout_marginTop="52dp"
android:ems="10"
android:hint="ID"
android:inputType="number"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnInsertar" />
<Button
android:id="@+id/btnVer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="48dp"
android:layout_marginLeft="48dp"
android:layout_marginTop="52dp"
android:onClick="cickVer"
android:text="Ver"
app:layout_constraintStart_toEndOf="@+id/txtId"
app:layout_constraintTop_toBottomOf="@+id/btnInsertar" />
<EditText
android:id="@+id/txtTelefono"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:ems="10"
android:hint="Telefono"
android:inputType="phone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.484"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtEmail" />
<EditText
android:id="@+id/txtPass"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:ems="10"
android:hint="Password"
android:inputType="textPassword"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.484"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtTelefono" />
<Button
android:id="@+id/btnInsertar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="68dp"
android:layout_marginEnd="20dp"
android:layout_marginRight="20dp"
android:onClick="clickBtnInsertar"
android:text="Guardar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtPass" />
<EditText
android:id="@+id/txtEmail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:ems="10"
android:hint="Email"
android:inputType="textEmailAddress"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.484"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtNombre" />
<TableLayout
android:id="@+id/tbUsuarios"
android:layout_width="361dp"
android:layout_height="200dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent" />
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent" />
</TableLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
///app/src/main/res/layout/table_row_np.xml
<?xml version="1.0" encoding="utf-8"?>
<TableRow
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/colNombre"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="TextView" />
<TextView
android:id="@+id/colEmail"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="TextView" />
<ImageButton
android:id="@+id/colEditar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="clickTablaEditar"
app:srcCompat="@android:drawable/ic_menu_edit" />
<ImageButton
android:id="@+id/colBorrar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="clickTablaBorrar"
app:srcCompat="@android:drawable/ic_input_delete" />
</TableRow>
//app/src/main/java/com/programadornovato/androidmysql/MainActivity.kt package com.programadornovato.androidmysql import android.content.Intent import androidx.appcompat.app.AppCompatActivity import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.widget.EditText import android.widget.TableLayout import android.widget.TextView import android.widget.Toast import com.android.volley.Request import com.android.volley.Response import com.android.volley.toolbox.StringRequest import com.android.volley.toolbox.Volley class MainActivity : AppCompatActivity() { var txtNombre:EditText?=null var txtEmail:EditText?=null var txtTelefono:EditText?=null var txtPass:EditText?=null var tbUsuarios:TableLayout?=null override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) txtNombre=findViewById(R.id.txtNombre) txtEmail=findViewById(R.id.txtEmail) txtTelefono=findViewById(R.id.txtTelefono) txtPass=findViewById(R.id.txtPass) tbUsuarios=findViewById(R.id.tbUsuarios) tbUsuarios?.removeAllViews() for (i in 0 until 5){ val registro=LayoutInflater.from(this).inflate(R.layout.table_row_np,null,false) val colNombre=registro.findViewById<View>(R.id.colNombre) as TextView val colEmail=registro.findViewById<View>(R.id.colEmail) as TextView val colEditar=registro.findViewById<View>(R.id.colEditar) val colBorrar=registro.findViewById<View>(R.id.colBorrar) colNombre.text="Nombre $i" colEmail.text="Email $i" colEditar.id=i colBorrar.id=i tbUsuarios?.addView(registro) } } fun clickTablaEditar(view: View){ Toast.makeText(this,view.id.toString(),Toast.LENGTH_LONG).show() } fun clickTablaBorrar(view: View){ Toast.makeText(this,view.id.toString(),Toast.LENGTH_LONG).show() } fun clickBtnInsertar(view:View){ val url="http://192.168.8.100/android_mysql/insertar.php" val queue=Volley.newRequestQueue(this) var resultadoPost = object : StringRequest(Request.Method.POST,url, Response.Listener<String> { response -> Toast.makeText(this,"Usuario insertado exitosamente",Toast.LENGTH_LONG).show() },Response.ErrorListener { error -> Toast.makeText(this,"Error $error ",Toast.LENGTH_LONG).show() }){ override fun getParams(): MutableMap<String, String> { val parametros=HashMap<String,String>() parametros.put("nombre",txtNombre?.text.toString()) parametros.put("email",txtEmail?.text.toString()) parametros.put("telefono",txtTelefono?.text.toString()) parametros.put("pass",txtPass?.text.toString()) return parametros } } queue.add(resultadoPost) } fun cickVer(view: View){ var txtId=findViewById<EditText>(R.id.txtId) var intent= Intent(this,MainActivity2::class.java) intent.putExtra("id",txtId.text.toString()) startActivity(intent) } } ///app/src/main/res/layout/activity_main.xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <EditText android:id="@+id/txtNombre" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="12dp" android:ems="10" android:hint="Nombre" android:inputType="textPersonName" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/tbUsuarios" /> <EditText android:id="@+id/txtId" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="20dp" android:layout_marginLeft="20dp" android:layout_marginTop="52dp" android:ems="10" android:hint="ID" android:inputType="number" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/btnInsertar" /> <Button android:id="@+id/btnVer" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="48dp" android:layout_marginLeft="48dp" android:layout_marginTop="52dp" android:onClick="cickVer" android:text="Ver" app:layout_constraintStart_toEndOf="@+id/txtId" app:layout_constraintTop_toBottomOf="@+id/btnInsertar" /> <EditText android:id="@+id/txtTelefono" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="24dp" android:ems="10" android:hint="Telefono" android:inputType="phone" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.484" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/txtEmail" /> <EditText android:id="@+id/txtPass" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="20dp" android:ems="10" android:hint="Password" android:inputType="textPassword" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.484" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/txtTelefono" /> <Button android:id="@+id/btnInsertar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="68dp" android:layout_marginEnd="20dp" android:layout_marginRight="20dp" android:onClick="clickBtnInsertar" android:text="Guardar" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@+id/txtPass" /> <EditText android:id="@+id/txtEmail" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="32dp" android:ems="10" android:hint="Email" android:inputType="textEmailAddress" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.484" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/txtNombre" /> <TableLayout android:id="@+id/tbUsuarios" android:layout_width="361dp" android:layout_height="200dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent"> <TableRow android:layout_width="match_parent" android:layout_height="match_parent" /> <TableRow android:layout_width="match_parent" android:layout_height="match_parent" /> <TableRow android:layout_width="match_parent" android:layout_height="match_parent" /> <TableRow android:layout_width="match_parent" android:layout_height="match_parent" /> </TableLayout> </androidx.constraintlayout.widget.ConstraintLayout> ///app/src/main/res/layout/table_row_np.xml <?xml version="1.0" encoding="utf-8"?> <TableRow xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:id="@+id/colNombre" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="TextView" /> <TextView android:id="@+id/colEmail" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="TextView" /> <ImageButton android:id="@+id/colEditar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="clickTablaEditar" app:srcCompat="@android:drawable/ic_menu_edit" /> <ImageButton android:id="@+id/colBorrar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick="clickTablaBorrar" app:srcCompat="@android:drawable/ic_input_delete" /> </TableRow>
//app/src/main/java/com/programadornovato/androidmysql/MainActivity.kt
package com.programadornovato.androidmysql

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.widget.EditText
import android.widget.TableLayout
import android.widget.TextView
import android.widget.Toast
import com.android.volley.Request
import com.android.volley.Response
import com.android.volley.toolbox.StringRequest
import com.android.volley.toolbox.Volley

class MainActivity : AppCompatActivity() {
    var txtNombre:EditText?=null
    var txtEmail:EditText?=null
    var txtTelefono:EditText?=null
    var txtPass:EditText?=null
    var tbUsuarios:TableLayout?=null
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        txtNombre=findViewById(R.id.txtNombre)
        txtEmail=findViewById(R.id.txtEmail)
        txtTelefono=findViewById(R.id.txtTelefono)
        txtPass=findViewById(R.id.txtPass)
        tbUsuarios=findViewById(R.id.tbUsuarios)
        tbUsuarios?.removeAllViews()
        for (i in 0 until 5){
            val registro=LayoutInflater.from(this).inflate(R.layout.table_row_np,null,false)
            val colNombre=registro.findViewById<View>(R.id.colNombre) as TextView
            val colEmail=registro.findViewById<View>(R.id.colEmail) as TextView
            val colEditar=registro.findViewById<View>(R.id.colEditar)
            val colBorrar=registro.findViewById<View>(R.id.colBorrar)
            colNombre.text="Nombre $i"
            colEmail.text="Email $i"
            colEditar.id=i
            colBorrar.id=i
            tbUsuarios?.addView(registro)
        }
    }
    fun clickTablaEditar(view: View){
        Toast.makeText(this,view.id.toString(),Toast.LENGTH_LONG).show()
    }
    fun clickTablaBorrar(view: View){
        Toast.makeText(this,view.id.toString(),Toast.LENGTH_LONG).show()
    }
    fun clickBtnInsertar(view:View){
        val url="http://192.168.8.100/android_mysql/insertar.php"
        val queue=Volley.newRequestQueue(this)
        var resultadoPost = object : StringRequest(Request.Method.POST,url,
        Response.Listener<String> { response ->
            Toast.makeText(this,"Usuario insertado exitosamente",Toast.LENGTH_LONG).show()
        },Response.ErrorListener { error ->
                Toast.makeText(this,"Error $error ",Toast.LENGTH_LONG).show()
            }){
            override fun getParams(): MutableMap<String, String> {
                val parametros=HashMap<String,String>()
                parametros.put("nombre",txtNombre?.text.toString())
                parametros.put("email",txtEmail?.text.toString())
                parametros.put("telefono",txtTelefono?.text.toString())
                parametros.put("pass",txtPass?.text.toString())
                return parametros
            }
        }
        queue.add(resultadoPost)
    }
    fun cickVer(view: View){
        var txtId=findViewById<EditText>(R.id.txtId)
        var intent= Intent(this,MainActivity2::class.java)
        intent.putExtra("id",txtId.text.toString())
        startActivity(intent)
    }
}




///app/src/main/res/layout/activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <EditText
        android:id="@+id/txtNombre"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:ems="10"
        android:hint="Nombre"
        android:inputType="textPersonName"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/tbUsuarios" />

    <EditText
        android:id="@+id/txtId"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="20dp"
        android:layout_marginLeft="20dp"
        android:layout_marginTop="52dp"
        android:ems="10"
        android:hint="ID"
        android:inputType="number"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/btnInsertar" />

    <Button
        android:id="@+id/btnVer"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="48dp"
        android:layout_marginLeft="48dp"
        android:layout_marginTop="52dp"
        android:onClick="cickVer"
        android:text="Ver"
        app:layout_constraintStart_toEndOf="@+id/txtId"
        app:layout_constraintTop_toBottomOf="@+id/btnInsertar" />

    <EditText
        android:id="@+id/txtTelefono"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="24dp"
        android:ems="10"
        android:hint="Telefono"
        android:inputType="phone"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.484"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/txtEmail" />

    <EditText
        android:id="@+id/txtPass"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="20dp"
        android:ems="10"
        android:hint="Password"
        android:inputType="textPassword"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.484"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/txtTelefono" />

    <Button
        android:id="@+id/btnInsertar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="68dp"
        android:layout_marginEnd="20dp"
        android:layout_marginRight="20dp"
        android:onClick="clickBtnInsertar"
        android:text="Guardar"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/txtPass" />

    <EditText
        android:id="@+id/txtEmail"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="32dp"
        android:ems="10"
        android:hint="Email"
        android:inputType="textEmailAddress"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.484"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/txtNombre" />

    <TableLayout
        android:id="@+id/tbUsuarios"
        android:layout_width="361dp"
        android:layout_height="200dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <TableRow
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </TableLayout>

</androidx.constraintlayout.widget.ConstraintLayout>





///app/src/main/res/layout/table_row_np.xml
<?xml version="1.0" encoding="utf-8"?>
    <TableRow
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TextView
            android:id="@+id/colNombre"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="TextView" />

        <TextView
            android:id="@+id/colEmail"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="TextView" />

    <ImageButton
        android:id="@+id/colEditar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="clickTablaEditar"
        app:srcCompat="@android:drawable/ic_menu_edit" />

    <ImageButton
        android:id="@+id/colBorrar"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="clickTablaBorrar"
        app:srcCompat="@android:drawable/ic_input_delete" />

</TableRow>

🎦 Lista de reproducción de este curso: https://www.youtube.com/watch?v=915R9eq_r-s&list=PLCTD_CpMeEKSiUQ_svD3ovD1qXdKQFMvO&ab_channel=programadornovato
🎦 [Curso] Android Studio con Bases de datos: https://www.youtube.com/watch?v=CeQZ0c1l_pY&list=PLCTD_CpMeEKQJiP5LPFF4x-1gIf-19LVe&ab_channel=programadornovato
🎦 Curso de Android Studio: https://www.youtube.com/watch?v=AHyTqIB_8Rs&list=PLCTD_CpMeEKTT9pb9J-89j1SPtqHzU7sF&ab_channel=programadornovato
🎦 [Curso] Android Studio con Interfaz Grafica de 0 a 100: https://www.youtube.com/watch?v=3ZUlE_tvfaM&list=PLCTD_CpMeEKRL2-HaZThebGcyyR3_RshO&ab_channel=programadornovato
🎦 [CURSO] MARIADB DE 0 A 100: https://www.youtube.com/watch?v=oV0zZvTz4Ak&list=PLCTD_CpMeEKRoPFmVqG-COyGptWcbeesj&ab_channel=programadornovato
🎦 [CURSO] MYSQL DE 0 A 100🐬: https://www.youtube.com/watch?v=UzN-lDFvu3k&list=PLCTD_CpMeEKQmH9cRKWWHahygZFtIdwYG&ab_channel=programadornovato
🎦 [Curso] Kotlin de 0 a 100: https://www.youtube.com/playlist?list=PLCTD_CpMeEKSjzbsW_zmVNz23GyOVsdbS
🎦 [Curso] Java Netbeans Completo☕: https://www.youtube.com/playlist?list=PLCTD_CpMeEKTT-qEHGqZH3fkBgXH4GOTF

🔗 Facebook: https://facebook.com/ProgramadorNovatoOficial
🔗 Twitter: https://twitter.com/programadornova
🔗 Linkedin: https://www.linkedin.com/in/programadornovato/
🔗 Instagram: https://www.instagram.com/programadornovato/
🔗 Pagina oficial: https://www.programadornovato.com
🔗 Gracias por apoyar este canal: https://www.patreon.com/programadornovato

Anterior tutorial Siguiente tutorial

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *