Merge dictionary list activity content and layout
app/src/main/java/eu/lepiller/nani/DictionaryActivity.java
| 37 | 37 | protected void onCreate(Bundle savedInstanceState) { | |
| 38 | 38 | super.onCreate(savedInstanceState); | |
| 39 | 39 | setContentView(R.layout.activity_dictionary); | |
| 40 | - | Toolbar toolbar = findViewById(R.id.toolbar); | |
| 41 | - | toolbar.setTitle(R.string.title_activity_dictionary); | |
| 42 | - | setSupportActionBar(toolbar); | |
| 43 | 40 | ||
| 44 | 41 | final ListView list_view = findViewById(R.id.dictionary_view); | |
| 45 | 42 | final SwipeRefreshLayout refresher = findViewById(R.id.dictionary_refresh_layout); |
app/src/main/res/layout/activity_dictionary.xml
| 1 | 1 | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | - | <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 2 | + | <androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | 3 | xmlns:app="http://schemas.android.com/apk/res-auto" | |
| 4 | 4 | xmlns:tools="http://schemas.android.com/tools" | |
| 5 | 5 | android:layout_width="match_parent" | |
| 6 | 6 | android:layout_height="match_parent" | |
| 7 | - | tools:context=".DictionaryActivity"> | |
| 7 | + | app:layout_behavior="@string/appbar_scrolling_view_behavior" | |
| 8 | + | tools:context=".DictionaryActivity" | |
| 9 | + | tools:showIn="@layout/activity_dictionary" | |
| 10 | + | android:id="@+id/dictionary_refresh_layout"> | |
| 8 | 11 | ||
| 9 | - | <com.google.android.material.appbar.AppBarLayout | |
| 12 | + | <ListView | |
| 13 | + | android:id="@+id/dictionary_view" | |
| 10 | 14 | android:layout_width="match_parent" | |
| 11 | 15 | android:layout_height="wrap_content" | |
| 12 | - | android:theme="@style/AppTheme.AppBarOverlay"> | |
| 16 | + | android:layout_marginStart="8dp" | |
| 17 | + | android:layout_marginLeft="8dp" | |
| 18 | + | android:layout_marginTop="32dp" | |
| 19 | + | android:layout_marginEnd="8dp" | |
| 20 | + | android:layout_marginRight="8dp" | |
| 21 | + | android:layout_marginBottom="8dp" /> | |
| 13 | 22 | ||
| 14 | - | <androidx.appcompat.widget.Toolbar | |
| 15 | - | android:id="@+id/toolbar" | |
| 16 | - | android:layout_width="match_parent" | |
| 17 | - | android:layout_height="?attr/actionBarSize" | |
| 18 | - | android:background="?attr/colorPrimary" | |
| 19 | - | app:popupTheme="@style/AppTheme.PopupOverlay" /> | |
| 20 | - | ||
| 21 | - | </com.google.android.material.appbar.AppBarLayout> | |
| 22 | - | ||
| 23 | - | <include layout="@layout/content_dictionary" /> | |
| 24 | - | ||
| 25 | - | </androidx.coordinatorlayout.widget.CoordinatorLayout> | |
| 25 | > | ||
| 26 | 0 | > | \ No newline at end of file |
| 23 | + | </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> | |
| 23 | < | ||
| 0 | 24 | < | \ No newline at end of file |
app/src/main/res/layout/content_dictionary.xml unknown status 2
| 1 | - | <?xml version="1.0" encoding="utf-8"?> | |
| 2 | - | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| 3 | - | xmlns:app="http://schemas.android.com/apk/res-auto" | |
| 4 | - | xmlns:tools="http://schemas.android.com/tools" | |
| 5 | - | android:layout_width="match_parent" | |
| 6 | - | android:layout_height="match_parent" | |
| 7 | - | app:layout_behavior="@string/appbar_scrolling_view_behavior" | |
| 8 | - | tools:context=".DictionaryActivity" | |
| 9 | - | tools:showIn="@layout/activity_dictionary"> | |
| 10 | - | ||
| 11 | - | <androidx.swiperefreshlayout.widget.SwipeRefreshLayout | |
| 12 | - | android:layout_width="match_parent" | |
| 13 | - | android:layout_height="wrap_content" | |
| 14 | - | android:id="@+id/dictionary_refresh_layout"> | |
| 15 | - | ||
| 16 | - | <ListView | |
| 17 | - | android:id="@+id/dictionary_view" | |
| 18 | - | android:layout_width="395dp" | |
| 19 | - | android:layout_height="659dp" | |
| 20 | - | android:layout_marginStart="8dp" | |
| 21 | - | android:layout_marginLeft="8dp" | |
| 22 | - | android:layout_marginTop="32dp" | |
| 23 | - | android:layout_marginEnd="8dp" | |
| 24 | - | android:layout_marginRight="8dp" | |
| 25 | - | android:layout_marginBottom="8dp" /> | |
| 26 | - | </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> | |
| 27 | - | </LinearLayout> | |
| 27 | > | ||
| 28 | 0 | > | \ No newline at end of file |