Displaying.

This commit is contained in:
Aminecmi
2020-01-17 11:25:53 +01:00
parent 257d9fa401
commit 77c3efb96f
5 changed files with 133 additions and 11 deletions

View File

@ -135,6 +135,7 @@ class MainActivity : AppCompatActivity() {
override fun onResponse(call: Call<ForecastResponse>, response: Response<ForecastResponse>) {
Toast.makeText(this@MainActivity, "Ok", Toast.LENGTH_LONG).show()
textView.setText(response.body()?.hourly.toString())
swipeRefreshLayout.isRefreshing = false
}

View File

@ -19,6 +19,7 @@
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
@ -31,13 +32,11 @@
android:id="@+id/toolBar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:theme="@style/ToolBarStyle"/>
app:theme="@style/ToolBarStyle" />
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -47,15 +46,25 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="?android:attr/windowBackground">
android:paddingBottom="55dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/windowBackground"
android:orientation="vertical">
</LinearLayout>
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="TextView" />
</LinearLayout>
</ScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>