Skip to content

Commit

Permalink
More spotlight improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
therealbluepandabear committed Jul 24, 2022
1 parent 3ed03d6 commit c869fd9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.lifecycle.Lifecycle
import com.google.android.material.bottomnavigation.BottomNavigationView
import com.therealbluepandabear.pixapencil.BuildConfig
import com.therealbluepandabear.pixapencil.R
import com.therealbluepandabear.pixapencil.activities.main.MainActivity
import com.therealbluepandabear.pixapencil.databinding.FragmentAppInfoBinding

class AppInfoFragment : Fragment() {
Expand All @@ -27,6 +28,8 @@ class AppInfoFragment : Fragment() {
binding.fragmentAppInfoCommunityText.movementMethod = LinkMovementMethod.getInstance()
binding.fragmentAppInfoCreatedByText.movementMethod = LinkMovementMethod.getInstance()
binding.fragmentAppInfoAboutText.movementMethod = LinkMovementMethod.getInstance()

(activity as MainActivity).supportActionBar?.setDisplayHomeAsUpEnabled(true)
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,19 @@ fun NewProjectFragment.startSpotLight() {
var current = 1

lyt.findViewById<Button>(R.id.layoutTarget_nextButton).setOnClickListener {
if (current == 1 && binding.fragmentNewCanvasProjectTitleTextInputEditText.text.toString().isNotBlank()) {
if (current == 1 && binding.fragmentNewCanvasProjectTitleTextInputEditText.text.toString().isNotBlank()) {7
lyt.findViewById<TextView>(R.id.layoutTarget_errorText).text = ""
current++
spotlight.next()
} else if (current == 2 && binding.fragmentNewCanvasWidthTextInputEditText.text.toString().isNotBlank()) {
lyt.findViewById<TextView>(R.id.layoutTarget_errorText).text = ""
current++
spotlight.next()
} else if (current == 3 && binding.fragmentNewCanvasHeightTextInputEditText.text.toString().isNotBlank()) {
lyt.findViewById<TextView>(R.id.layoutTarget_errorText).text = ""
spotlight.next()
} else {
lyt.findViewById<TextView>(R.id.layoutTarget_errorText).text = "Please input a value"
}
}

Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/layout/fragment_app_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
android:layout_height="match_parent"
tools:context=".fragments.appinfo.AppInfoFragment"
style="@style/defaultFragmentStyle">

<ImageView
android:id="@+id/imageView"
android:layout_width="150dp"
Expand Down
21 changes: 19 additions & 2 deletions app/src/main/res/layout/layout_target.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">


<Button
Expand Down Expand Up @@ -31,12 +32,28 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="32dp"
android:layout_marginBottom="8dp"
android:fontFamily="@font/manrope_medium"
android:text="TextView"
android:textAlignment="textStart"
android:textColor="@color/white"
android:textSize="24sp"
app:layout_constraintBottom_toTopOf="@+id/layoutTarget_errorText"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/layoutTarget_nextButton"
tools:textColor="@color/black" />

<TextView
android:id="@+id/layoutTarget_errorText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:fontFamily="@font/manrope_medium"
android:text=""
android:textAlignment="textStart"
android:textColor="@android:color/holo_red_dark"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/layoutTarget_nextButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/layoutTarget_nextButton" />
Expand Down

0 comments on commit c869fd9

Please sign in to comment.