Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This is a branch called bugfix-1
# it will fix the issue about jumbled interface
10 changes: 9 additions & 1 deletion app/src/main/java/edu/temple/helloworld/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ import android.widget.TextView

class MainActivity : AppCompatActivity() {

// for it
// Declare view properties - the first one is done for you
lateinit var displayTextView: TextView
// other two view properties
lateinit var nameEditText: EditText
lateinit var clickMeButton: Button

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand All @@ -18,11 +22,15 @@ class MainActivity : AppCompatActivity() {
// Initialize with views defined in Layout - the first one is done for you
displayTextView = findViewById(R.id.displayTextView)

// initalize other two views fir tge layout
nameEditText = findViewById(R.id.nameEditText)
clickMeButton = findViewById(R.id.clickMeButton)


findViewById<Button>(R.id.clickMeButton).setOnClickListener {
displayTextView.text = "Hello, ${findViewById<EditText>(R.id.nameEditText).text}"
}


}
}
}
21 changes: 16 additions & 5 deletions app/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,39 @@
android:id="@+id/displayTextView"
android:layout_width="411dp"
android:layout_height="wrap_content"
android:layout_marginTop="53dp"
android:gravity="center"
android:text="Hello World!"
android:textSize="24sp"
tools:layout_editor_absoluteY="53dp" />
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<Button
android:id="@+id/clickMeButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="154dp"
android:layout_marginEnd="153dp"
android:layout_marginBottom="343dp"
android:text="Click Me"
tools:layout_editor_absoluteX="154dp"
tools:layout_editor_absoluteY="340dp" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

<EditText
android:id="@+id/nameEditText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="102dp"
android:layout_marginEnd="100dp"
android:layout_marginBottom="60dp"
android:ems="10"
android:hint="Enter your name"
android:inputType="textPersonName"
android:minHeight="48dp"
tools:layout_editor_absoluteX="101dp"
tools:layout_editor_absoluteY="240dp" />
app:layout_constraintBottom_toTopOf="@+id/clickMeButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>