Skip to content

Commit 961d9e0

Browse files
committed
Make the full title of the open article visible
1 parent 7062cc1 commit 961d9e0

4 files changed

Lines changed: 78 additions & 68 deletions

File tree

.idea/codeStyles/Project.xml

Lines changed: 0 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/java/kz/gvsx/tou/ui/news/News.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package kz.gvsx.tou.ui.news
22

3-
import java.time.LocalDate
43
import java.time.LocalDateTime
54

65
data class News(
Lines changed: 68 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,92 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
xmlns:app="http://schemas.android.com/apk/res-auto"
44
xmlns:tools="http://schemas.android.com/tools"
55
android:id="@+id/container"
66
android:layout_width="match_parent"
77
android:layout_height="fill_parent"
8+
android:fitsSystemWindows="true"
89
tools:context=".ui.article.ArticleFragment">
910

10-
<androidx.appcompat.widget.Toolbar
11-
android:id="@+id/toolbar"
11+
<com.google.android.material.appbar.AppBarLayout
12+
android:id="@+id/app_bar_layout"
1213
android:layout_width="match_parent"
13-
android:layout_height="?actionBarSize"
14-
android:background="?attr/colorPrimary"
15-
android:theme="@style/Theme.ToU.AppBarOverlay"
16-
app:layout_constraintEnd_toEndOf="parent"
17-
app:layout_constraintStart_toStartOf="parent"
18-
app:layout_constraintTop_toTopOf="parent"
19-
app:navigationIcon="?attr/homeAsUpIndicator"
20-
app:popupTheme="@style/Theme.ToU.PopupOverlay" />
14+
android:layout_height="200dp"
15+
android:fitsSystemWindows="true"
16+
android:theme="@style/Theme.ToU.AppBarOverlay">
17+
18+
<com.google.android.material.appbar.CollapsingToolbarLayout
19+
android:id="@+id/toolbar_layout"
20+
android:layout_width="match_parent"
21+
android:layout_height="match_parent"
22+
app:expandedTitleGravity="bottom"
23+
app:expandedTitleMarginBottom="16dp"
24+
app:expandedTitleMarginStart="16dp"
25+
app:expandedTitleTextAppearance="?textAppearanceHeadline5"
26+
app:layout_scrollFlags="scroll|exitUntilCollapsed"
27+
app:maxLines="5"
28+
app:toolbarId="@id/toolbar">
29+
30+
<com.google.android.material.appbar.MaterialToolbar
31+
android:id="@+id/toolbar"
32+
android:layout_width="match_parent"
33+
android:layout_height="?actionBarSize"
34+
android:elevation="0dp"
35+
app:layout_collapseMode="pin"
36+
app:navigationIcon="?attr/homeAsUpIndicator"
37+
app:popupTheme="@style/Theme.ToU.PopupOverlay"
38+
tools:title="@tools:sample/lorem/random" />
39+
40+
</com.google.android.material.appbar.CollapsingToolbarLayout>
2141

22-
<androidx.constraintlayout.widget.ConstraintLayout
42+
</com.google.android.material.appbar.AppBarLayout>
43+
44+
<androidx.core.widget.NestedScrollView
2345
android:layout_width="match_parent"
2446
android:layout_height="match_parent"
25-
android:layout_below="@id/toolbar">
47+
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
48+
app:layout_constraintEnd_toEndOf="parent"
49+
app:layout_constraintStart_toStartOf="parent">
2650

27-
<ScrollView
51+
<LinearLayout
2852
android:layout_width="match_parent"
29-
android:layout_height="match_parent"
30-
app:layout_constraintEnd_toEndOf="parent"
31-
app:layout_constraintStart_toStartOf="parent">
53+
android:layout_height="wrap_content"
54+
android:orientation="vertical">
3255

33-
<LinearLayout
56+
<androidx.recyclerview.widget.RecyclerView
57+
android:id="@+id/recycler_view"
3458
android:layout_width="match_parent"
35-
android:layout_height="wrap_content"
36-
android:orientation="vertical">
37-
38-
<androidx.recyclerview.widget.RecyclerView
39-
android:id="@+id/recycler_view"
40-
android:layout_width="match_parent"
41-
android:layout_height="match_parent"
42-
android:layout_gravity="center"
43-
android:layout_marginStart="16dp"
44-
android:layout_marginTop="16dp"
45-
android:layout_marginEnd="16dp"
46-
android:layout_marginBottom="16dp"
47-
android:clipChildren="false"
48-
android:clipToPadding="false"
49-
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
50-
tools:itemCount="5"
51-
tools:listitem="@layout/list_item_image" />
59+
android:layout_height="match_parent"
60+
android:layout_gravity="center"
61+
android:layout_marginStart="16dp"
62+
android:layout_marginTop="16dp"
63+
android:layout_marginEnd="16dp"
64+
android:layout_marginBottom="16dp"
65+
android:clipChildren="false"
66+
android:clipToPadding="false"
67+
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
68+
tools:itemCount="5"
69+
tools:listitem="@layout/list_item_image" />
5270

53-
<TextView
54-
android:id="@+id/textView"
55-
android:layout_width="wrap_content"
56-
android:layout_height="wrap_content"
57-
android:layout_marginStart="16dp"
58-
android:layout_marginTop="16dp"
59-
android:layout_marginEnd="16dp"
60-
android:layout_marginBottom="16dp"
61-
android:lineSpacingExtra="8sp"
62-
android:textColor="#24292E"
63-
android:textSize="18sp"
64-
tools:text="В 2018 году при ТОО «Победа» организовали круглогодичный учебный центр дуального обучения студентов. После кончины директора Александра Полякова руководство предприятия в продолжение сотрудничества и в память о нем учредило именную стипендию. Кроме того, выделили три образовательных гранта по сельхозспециальностям для вновь поступающих абитуриентов, которые в последующем будут работать по этим направлениям.\n\n– Сельскохозяйственный факультет Торайгыров университета около 20 лет сотрудничает в направлении подготовки кадров для сельского хозяйства и научном сопровождении отраслей сельхозпроизводства с ТОО «Победа» Павлодарской области. В этом большая заслуга Александра Владимировича Полякова. Это решение достойно благодарности и хороший пример для поддержания, – подчеркнул декан факультета Токтар Бексеитов." />
65-
</LinearLayout>
66-
</ScrollView>
67-
</androidx.constraintlayout.widget.ConstraintLayout>
71+
<TextView
72+
android:id="@+id/textView"
73+
android:layout_width="wrap_content"
74+
android:layout_height="wrap_content"
75+
android:layout_marginStart="16dp"
76+
android:layout_marginTop="16dp"
77+
android:layout_marginEnd="16dp"
78+
android:layout_marginBottom="16dp"
79+
android:lineSpacingExtra="8sp"
80+
android:textColor="#24292E"
81+
android:textSize="18sp"
82+
tools:text="@tools:sample/lorem/random" />
83+
</LinearLayout>
84+
</androidx.core.widget.NestedScrollView>
6885

6986
<ImageView
7087
android:id="@+id/expanded_image"
7188
android:layout_width="match_parent"
7289
android:layout_height="match_parent"
7390
android:visibility="invisible" />
74-
</RelativeLayout>
91+
</androidx.coordinatorlayout.widget.CoordinatorLayout>
7592

0 commit comments

Comments
 (0)