🎨 Set up a basic layout

main
Alexis Drai 1 year ago
parent d57b9eabe2
commit 8dbc123064

@ -6,13 +6,66 @@
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
<SearchView
android:id="@+id/searchView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginTop="32dp"
android:background="#EEE"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/searchView" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/addDefinitionBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:clickable="true"
android:contentDescription="@string/add_def_prompt"
android:focusable="true"
app:backgroundTint="#55752F"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/searchView"
app:srcCompat="@android:drawable/ic_input_add" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/addTermBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:clickable="true"
android:contentDescription="@string/add_term_prompt"
android:focusable="true"
app:backgroundTint="#3E4E83"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/searchView"
app:srcCompat="@android:drawable/ic_input_add" />
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/add_term_prompt"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/addTermBtn" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/add_def_prompt"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/addDefinitionBtn" />
</androidx.constraintlayout.widget.ConstraintLayout>

@ -1,3 +1,5 @@
<resources>
<string name="app_name">Urban Dictionary Light</string>
<string name="add_def_prompt">New definition</string>
<string name="add_term_prompt">New term</string>
</resources>
Loading…
Cancel
Save