Show repository name in the details activity
This commit is contained in:
@@ -1,12 +1,27 @@
|
||||
package fr.uca.iut.clfreville2.teaiswarm
|
||||
|
||||
import android.os.Bundle
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
class RepositoryDetailActivity : AppCompatActivity() {
|
||||
|
||||
private lateinit var repositoryName: TextView
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_repository_detail)
|
||||
|
||||
repositoryName = findViewById(R.id.repository_detail_name)
|
||||
|
||||
var currentRepositoryName: String? = null
|
||||
val bundle: Bundle? = intent.extras
|
||||
if (bundle != null) {
|
||||
currentRepositoryName = bundle.getString(REPOSITORY_NAME)
|
||||
}
|
||||
|
||||
currentRepositoryName?.let {
|
||||
repositoryName.text = currentRepositoryName
|
||||
}
|
||||
}
|
||||
}
|
@@ -17,5 +17,6 @@
|
||||
android:id="@+id/repository_detail_description"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/repository_description"
|
||||
android:padding="16dp" />
|
||||
</LinearLayout>
|
Reference in New Issue
Block a user