質問編集履歴
1
誤字
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Androidアプリ開発 タ
|
1
|
+
Androidアプリ開発 CollapsingToolbarLayoutのタイトルについて
|
test
CHANGED
@@ -6,66 +6,106 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
|
9
|
+
CollapsingToolbarLayoutのタイトルについてですが、
|
10
10
|
|
11
|
-
表示させ
|
11
|
+
初めは表示させずに、ツールバーにタイトルがきたときに、表示させるにはどうしたらいいでしょうか?
|
12
12
|
|
13
13
|
|
14
14
|
|
15
|
-
こちら、ご回答いただけましたら幸いです。
|
16
|
-
|
17
|
-
よろしくお願い
|
15
|
+
よろしくお願いいたします。
|
18
16
|
|
19
17
|
|
20
18
|
|
21
|
-
```
|
19
|
+
```XML
|
22
20
|
|
21
|
+
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
22
|
+
|
23
|
-
|
23
|
+
xmlns:app="http://schemas.android.com/apk/res-auto"
|
24
24
|
|
25
25
|
android:layout_width="match_parent"
|
26
26
|
|
27
|
-
android:layout_height="
|
27
|
+
android:layout_height="match_parent"
|
28
28
|
|
29
|
-
android:
|
29
|
+
android:fitsSystemWindows="true">
|
30
|
-
|
31
|
-
android:layout_alignParentLeft="true"
|
32
|
-
|
33
|
-
android:orientation="horizontal" >
|
34
30
|
|
35
31
|
|
36
32
|
|
37
|
-
<
|
33
|
+
<android.support.design.widget.AppBarLayout
|
38
34
|
|
39
|
-
android:
|
35
|
+
android:id="@+id/app_bar_layout"
|
40
36
|
|
41
|
-
android:layout_
|
37
|
+
android:layout_width="match_parent"
|
42
38
|
|
43
|
-
android:layout_
|
39
|
+
android:layout_height="192dp"
|
44
40
|
|
45
|
-
android:
|
41
|
+
android:fitsSystemWindows="true"
|
46
42
|
|
47
|
-
android:gravity="center"
|
48
|
-
|
49
|
-
android:te
|
43
|
+
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
|
50
44
|
|
51
45
|
|
52
46
|
|
53
|
-
<
|
47
|
+
<android.support.design.widget.CollapsingToolbarLayout
|
54
48
|
|
55
|
-
android:
|
49
|
+
android:id="@+id/collapsing_toolbar"
|
56
50
|
|
57
|
-
android:layout_
|
51
|
+
android:layout_width="match_parent"
|
58
52
|
|
59
|
-
android:layout_
|
53
|
+
android:layout_height="match_parent"
|
60
54
|
|
61
|
-
android:
|
55
|
+
android:fitsSystemWindows="true"
|
62
56
|
|
63
|
-
an
|
57
|
+
app:contentScrim="?attr/colorPrimary"
|
64
58
|
|
59
|
+
app:expandedTitleMarginEnd="64dp"
|
60
|
+
|
65
|
-
and
|
61
|
+
app:expandedTitleMarginStart="48dp"
|
62
|
+
|
63
|
+
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
|
66
64
|
|
67
65
|
|
68
66
|
|
67
|
+
<ImageView
|
68
|
+
|
69
|
+
android:layout_width="match_parent"
|
70
|
+
|
71
|
+
android:layout_height="match_parent"
|
72
|
+
|
73
|
+
android:background="@mipmap/list_noimage"
|
74
|
+
|
75
|
+
android:fitsSystemWindows="true"
|
76
|
+
|
77
|
+
android:scaleType="centerCrop"
|
78
|
+
|
79
|
+
app:layout_collapseMode="parallax" />
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
<android.support.v7.widget.Toolbar
|
84
|
+
|
85
|
+
android:id="@+id/toolbar"
|
86
|
+
|
87
|
+
android:layout_width="match_parent"
|
88
|
+
|
89
|
+
android:layout_height="?attr/actionBarSize"
|
90
|
+
|
91
|
+
app:layout_collapseMode="pin"
|
92
|
+
|
93
|
+
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
</android.support.design.widget.CollapsingToolbarLayout>
|
98
|
+
|
99
|
+
|
100
|
+
|
69
|
-
</
|
101
|
+
</android.support.design.widget.AppBarLayout>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
<!-- コンテンツ -->
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
</android.support.design.widget.CoordinatorLayout>
|
70
110
|
|
71
111
|
```
|