Last active
March 22, 2021 07:45
-
-
Save novotnyr/9e1fade9406d10cf729356bfd5d0c603 to your computer and use it in GitHub Desktop.
UINF/VMA Android 2021 - Appka Presentr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implementation 'androidx.activity:activity-ktx:1.2.1' | |
implementation 'com.squareup.retrofit2:retrofit:2.9.0' | |
implementation 'com.google.code.gson:gson:2.8.6' | |
implementation 'com.squareup.retrofit2:converter-gson:2.9.0' | |
------------ | |
REST API: | |
https://ics.upjs.sk/~novotnyr/android/demo/presentr/index.php/available-users | |
---- | |
private const val BASE_URL = "https://ics.upjs.sk/~novotnyr/android/demo/presentr/index.php/" | |
val presentr: PresentrApi by lazy { | |
Retrofit.Builder() | |
.baseUrl(BASE_URL) | |
.addConverterFactory(GsonConverterFactory.create()) | |
.build() | |
.create(PresentrApi::class.java) | |
} | |
---- | |
<com.google.android.material.floatingactionbutton.FloatingActionButton | |
android:id="@+id/floatingActionButton" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_marginEnd="16dp" | |
android:layout_marginBottom="16dp" | |
android:clickable="true" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:srcCompat="@drawable/ic_baseline_person_add_24" /> | |
----- | |
<ListView | |
android:id="@+id/userListView" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:layout_constraintBottom_toBottomOf="parent" | |
app:layout_constraintEnd_toEndOf="parent" | |
app:layout_constraintStart_toStartOf="parent" | |
app:layout_constraintTop_toTopOf="parent" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment