Skip to content

Commit d94012e

Browse files
committed
style #9: add layout for the list
1 parent 4900148 commit d94012e

File tree

4 files changed

+21
-8
lines changed

4 files changed

+21
-8
lines changed

Affirmations/.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Affirmations/.idea/workspace.xml

Lines changed: 17 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Affirmations/app/src/main/java/com/example/affirmations/MainActivity.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ class MainActivity : AppCompatActivity() {
1010
super.onCreate(savedInstanceState)
1111
setContentView(R.layout.activity_main)
1212

13-
// add reference link with the text view
14-
val textView: TextView = findViewById(R.id.textview)
1513

16-
// get the total list from affirmation data source and call loadAffirmations() function
17-
textView.text = Datasource().loadAffirmations().size.toString()
1814
}
1915
}
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
3-
android:layout_width="match_parent" android:layout_height="match_parent">
3+
android:id="@+id/item_title"
4+
android:layout_width="wrap_content"
5+
android:layout_height="wrap_content">
46

57
</TextView>

0 commit comments

Comments
 (0)