質問編集履歴

2

xmlの修正、画像の追加

2016/03/06 04:22

投稿

worldrun
worldrun

スコア19

test CHANGED
File without changes
test CHANGED
@@ -22,7 +22,9 @@
22
22
 
23
23
 
24
24
 
25
- linear.xml
25
+ linear.xml
26
+
27
+ ```xml
26
28
 
27
29
  <?xml version="1.0" encoding="utf-8"?>
28
30
 
@@ -86,9 +88,11 @@
86
88
 
87
89
  </LinearLayout>
88
90
 
89
-
91
+ ```
90
92
 
91
93
  preference.xml
94
+
95
+ ```xml
92
96
 
93
97
  <?xml version="1.0" encoding="utf-8"?>
94
98
 
@@ -109,3 +113,11 @@
109
113
  </PreferenceCategory>
110
114
 
111
115
  </PreferenceScreen>
116
+
117
+ ```
118
+
119
+
120
+
121
+ 現在こんな感じで透けています。ボタンを押しても下のメニューにチェックが入ります。
122
+
123
+ ![![こんな感じで透けています](913fbbe1a3b068f5fe78d6851a5c1d77.png)](7dfc2e1d10b718c9de08d7cf781406d5.png)

1

xmlの追記

2016/03/06 04:22

投稿

worldrun
worldrun

スコア19

test CHANGED
File without changes
test CHANGED
@@ -19,3 +19,93 @@
19
19
 
20
20
 
21
21
  ScrollViewでやっているときはweight=1がうまくいったのですが、PreferenceActivityは何か特殊な処理が必要なのでしょうか
22
+
23
+
24
+
25
+ ・linear.xml
26
+
27
+ <?xml version="1.0" encoding="utf-8"?>
28
+
29
+ <LinearLayout
30
+
31
+ xmlns:android="http://schemas.android.com/apk/res/android"
32
+
33
+ android:orientation="vertical"
34
+
35
+ android:layout_width="fill_parent"
36
+
37
+ android:layout_height="fill_parent">
38
+
39
+ <ListView
40
+
41
+ android:id="@android:id/list"
42
+
43
+ android:layout_width="fill_parent"
44
+
45
+ android:layout_height="0dp"
46
+
47
+ android:layout_weight="1" />
48
+
49
+ <LinearLayout
50
+
51
+ android:layout_width="match_parent"
52
+
53
+ android:background="#EDE6D6"
54
+
55
+ android:gravity="center_horizontal"
56
+
57
+ android:padding="10dp"
58
+
59
+ android:layout_height="wrap_content">
60
+
61
+
62
+
63
+ <Button
64
+
65
+ android:id="@+id/settingButton"
66
+
67
+ android:layout_width="0dp"
68
+
69
+ android:layout_weight="1"
70
+
71
+ android:layout_height="wrap_content"
72
+
73
+ android:adjustViewBounds="true"
74
+
75
+ android:background="@drawable/underbutton_design"
76
+
77
+ android:textColor="#fff"
78
+
79
+ android:text="@string/settingButton"
80
+
81
+ android:layout_marginRight="10dp"
82
+
83
+ />
84
+
85
+ </LinearLayout>
86
+
87
+ </LinearLayout>
88
+
89
+
90
+
91
+ preference.xml
92
+
93
+ <?xml version="1.0" encoding="utf-8"?>
94
+
95
+ <PreferenceScreen
96
+
97
+ xmlns:android="http://schemas.android.com/apk/res/android">
98
+
99
+ <PreferenceCategory
100
+
101
+ android:title="@string/preference_title01">
102
+
103
+ </PreferenceCategory>
104
+
105
+
106
+
107
+ <PreferenceCategory android:title="@string/preference_title02">
108
+
109
+ </PreferenceCategory>
110
+
111
+ </PreferenceScreen>