Skip to content

Commit

Permalink
update splashscreen layout
Browse files Browse the repository at this point in the history
  • Loading branch information
anprimordi committed Nov 25, 2019
1 parent 33dc7c2 commit cb645dd
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class DiagnosisAdapter internal constructor(private val context: Context) :
}
}

class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
var mCbGejala: CheckBox = itemView.findViewById(R.id.checkbox_gejala)
}

Expand Down Expand Up @@ -389,9 +389,7 @@ class DiagnosisAdapter internal constructor(private val context: Context) :
intent.putExtra("solusi", solusi)
intent.putExtra("pencegahan", pencegahan)
intent.putExtra("persentaseCBR", persentaseCbr.toString())
// Toast.makeText(context, R.string.diagnosis_empty_msg, Toast.LENGTH_SHORT).show()
// if (mCheckedGejala.isEmpty()) nilai = 0
// else nilai = 1

context.startActivity(intent)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,12 @@ class HasilActivity : AppCompatActivity() {
textHasilDiagnosis.text = penyakitBurung!!.toString()
textSolusi.text = solusi
textPencegahan.text = pencegahan

}

private fun bindView() {
rvGejalaDialami = findViewById(R.id.rv_gejala_dialami)
rvGejalaDialami.layoutManager = LinearLayoutManager(this)
adapter = HasilAdapter()
rvGejalaDialami.adapter = adapter

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class HasilAdapter : RecyclerView.Adapter<HasilAdapter.ViewHolder>() {
holder.textGejalaDialami.text = gejala.gejalaDialami
}

class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
var textGejalaDialami: TextView = itemView.findViewById(R.id.text_hasil_gejala)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import com.makaryostudio.lovebird.feature.diagnosis.DiagnosisActivity

class HomeActivity : AppCompatActivity() {

lateinit var btnMulai: Button
private lateinit var btnMulai: Button

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Expand Down
Binary file added app/src/main/res/drawable/app_logo_text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions app/src/main/res/drawable/ic_app_logo_text.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<bitmap android:src="@drawable/app_logo_text" />
</item>
</layer-list>
5 changes: 3 additions & 2 deletions app/src/main/res/layout/activity_diagnosis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,14 @@

<TextView
android:id="@+id/title_pilih_gejala"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:text="@string/diagnosis_pilih_gejala_text"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/primary_text"
android:textColor="@color/colorAccent"
android:textStyle="italic"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/layout/activity_hasil.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@
android:id="@+id/title_gejala_dialami"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginTop="16dp"
android:text="@string/hasil_gejala_dialami_text"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/primary_text"
android:textColor="@color/textPrimary"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

Expand All @@ -112,7 +112,7 @@
android:layout_marginTop="16dp"
android:text="@string/hasil_diagnosis_penyakit_text"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/primary_text"
android:textColor="@color/textPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/rv_gejala_dialami" />
Expand All @@ -136,7 +136,7 @@
android:layout_marginTop="16dp"
android:text="@string/hasil_solusi_text"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/primary_text"
android:textColor="@color/textPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/text_hasil_diagnosis" />
Expand All @@ -161,7 +161,7 @@
android:layout_marginTop="16dp"
android:text="@string/hasil_pencegahan_text"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="@color/primary_text"
android:textColor="@color/textPrimary"
app:layout_constraintBottom_toTopOf="@id/title_pencegahan"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/layout/activity_home.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@
android:ellipsize="end"
android:maxLines="15"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="@color/primary_text"
android:textColor="@color/textPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/lorem/random" />

</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>

Expand All @@ -91,7 +92,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/btn_rounded_blue"
android:text="@string/action_mulai"
android:text="@string/home_mulai_action"
app:layout_constraintBottom_toBottomOf="@id/card_home_app_description"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
21 changes: 11 additions & 10 deletions app/src/main/res/layout/activity_splash_screen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/colorPrimary"
app:layout_constraintBottom_toTopOf="@id/guideline_horizontal_25"
app:layout_constraintBottom_toTopOf="@id/guideline_horizontal_45"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_horizontal_25"
android:id="@+id/guideline_horizontal_45"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.5" />
app:layout_constraintGuide_percent="0.45" />

<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/image_splashscreen_logo"
Expand All @@ -30,17 +30,18 @@
app:civ_border_color="@color/solid_white"
app:civ_border_width="4dp"
app:civ_circle_background_color="@color/solid_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintBottom_toBottomOf="@id/guideline_horizontal_45"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="@id/guideline_horizontal_45" />

<TextView
android:id="@+id/text_splashscreen_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
<ImageView
android:id="@+id/image_splashscreen_title"
android:layout_width="232dp"
android:layout_height="40dp"
android:layout_marginTop="16dp"
android:text="@string/app_name"
android:contentDescription="@string/splashscreen_applogo_text"
android:src="@drawable/app_logo_text"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
12 changes: 3 additions & 9 deletions app/src/main/res/layout/item_hasil.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@
android:layout_height="wrap_content"
android:orientation="horizontal">

<ImageView
android:layout_marginStart="4dp"
android:layout_gravity="center"
android:src="@drawable/ic_circle_green_8dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/hasil_green_dot_img" />

<TextView
android:layout_marginStart="4dp"
android:id="@+id/text_hasil_gejala"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:drawableStart="@drawable/ic_circle_green_8dp"
android:drawablePadding="4dp"
android:ellipsize="end"
android:maxLines="1"
tools:text="@tools:sample/lorem/random" />
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<color name="colorPrimaryDark">#0092dc</color>
<color name="colorAccent">#ee4102</color>

<color name="primary_text">#212121</color>
<color name="secondary_text">#757575</color>
<color name="divider">#BDBDBD</color>
<color name="textPrimary">#212121</color>
<color name="textSecondary">#757575</color>
<color name="divider">#bdbdbd</color>

<color name="solid_white">#ffffff</color>
<color name="darker_white">#eaeaea</color>
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<!-- home -->
<string name="home_logo_img_description">Logo aplikasi pada home</string>
<string name="action_mulai">mulai</string>
<string name="home_mulai_action">mulai</string>

<!-- input -->
<string name="diagnosis_pilih_gejala_text">Pilih gejala yang timbul</string>
Expand All @@ -23,6 +23,7 @@
<string name="hasil_green_dot_img">Gambar titik hijau pada item hasil</string>
<string name="hasil_pencegahan_text">Pencegahan</string>
<string name="hasil_hasil_text">Hasil</string>
<string name="splashscreen_applogo_text">teks logo splashscreen</string>

<!-- nama penyakit -->
<array name="array_nama_penyakit">
Expand Down

0 comments on commit cb645dd

Please sign in to comment.