-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNew_material_card_color_design.patch
192 lines (189 loc) · 7.84 KB
/
New_material_card_color_design.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
Index: app/src/main/res/values/colors.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/src/main/res/values/colors.xml (date 1424595492000)
+++ app/src/main/res/values/colors.xml (revision )
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
- <color name="action_bar_primary_color">#83B5D8</color>
+ <color name="action_bar_primary_color">#1D5479</color>
<color name="action_bar_primary_dark_color">#5389AF</color>
<color name="transperant">#00000000</color>
- <color name="divider_color_light">#B3D4E5</color>
+ <color name="divider_color_light">#fafafa</color>
<color name="divider_color_dark">#89AFDB</color>
<color name="text_color_white">#fafafa</color>
<color name="actionbar_transperant">#ccc6c6c6</color>
\ No newline at end of file
Index: app/src/main/res/drawable/usage2.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/src/main/res/drawable/usage2.xml (date 1424595492000)
+++ app/src/main/res/drawable/usage2.xml (revision )
@@ -4,5 +4,5 @@
android:drawable="@drawable/ic_usage" />
<item android:state_selected="true"
android:drawable="@drawable/ic_usage" />
- <item android:drawable="@drawable/ic_usage_selected" />
+ <item android:drawable="@drawable/ic_usage_dim" />
</selector>
\ No newline at end of file
Index: app/src/main/res/color/tab_button_text_color2.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/src/main/res/color/tab_button_text_color2.xml (date 1424595492000)
+++ app/src/main/res/color/tab_button_text_color2.xml (revision )
@@ -4,5 +4,5 @@
android:color="#fafafa" /> <!-- pressed -->
<item android:state_selected="true"
android:color="#fafafa" /> <!-- focused -->
- <item android:color="#333333" /> <!-- default -->
+ <item android:color="#eeb6b6b6" /> <!-- default -->
</selector>
\ No newline at end of file
Index: app/src/main/res/layout/activity_home.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/src/main/res/layout/activity_home.xml (date 1424595492000)
+++ app/src/main/res/layout/activity_home.xml (revision )
@@ -10,7 +10,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:background="@drawable/blue_stroke">
+ android:background="@color/action_bar_primary_color">
<LinearLayout
android:id="@+id/today_summary"
Index: app/src/main/res/drawable/tab_button_background2.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/src/main/res/drawable/tab_button_background2.xml (date 1424595492000)
+++ app/src/main/res/drawable/tab_button_background2.xml (revision )
@@ -10,7 +10,7 @@
<shape android:shape="rectangle" >
<stroke
android:width="3dp"
- android:color="#FFF0FAFA" />
+ android:color="#aaFAFAFA" />
<solid android:color="#00FFFFFF" />
\ No newline at end of file
Index: app/src/main/res/drawable/calendar2.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/src/main/res/drawable/calendar2.xml (date 1424595492000)
+++ app/src/main/res/drawable/calendar2.xml (revision )
@@ -4,5 +4,5 @@
android:drawable="@drawable/ic_calendar" />
<item android:state_selected="true"
android:drawable="@drawable/ic_calendar" />
- <item android:drawable="@drawable/ic_calendar_selected" />
+ <item android:drawable="@drawable/ic_calendar_dim" />
</selector>
\ No newline at end of file
Index: app/src/main/res/drawable/logs2.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/src/main/res/drawable/logs2.xml (date 1424595492000)
+++ app/src/main/res/drawable/logs2.xml (revision )
@@ -4,5 +4,5 @@
android:drawable="@drawable/ic_logs" />
<item android:state_selected="true"
android:drawable="@drawable/ic_logs" />
- <item android:drawable="@drawable/ic_logs_selected" />
+ <item android:drawable="@drawable/ic_logs_dim" />
</selector>
\ No newline at end of file
Index: app/src/main/java/com/finch/mycalls/PixelScrollDetector.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/src/main/java/com/finch/mycalls/PixelScrollDetector.java (revision )
+++ app/src/main/java/com/finch/mycalls/PixelScrollDetector.java (revision )
@@ -0,0 +1,70 @@
+package com.finch.mycalls;
+
+import android.view.View;
+import android.widget.AbsListView;
+
+/**
+ * Created by budius on 16.05.14.
+ * This improves on Zsolt Safrany answer on stack-overflow (see link)
+ * by making it a detector that can be attached to any AbsListView.
+ * http://stackoverflow.com/questions/8471075/android-listview-find-the-amount-of-pixels-scrolled
+ */
+public class PixelScrollDetector implements AbsListView.OnScrollListener {
+ private final PixelScrollListener listener;
+ private View mTrackedChild;
+ private int mTrackedChildPrevPosition;
+ private int mTrackedChildPrevTop;
+
+ public PixelScrollDetector(PixelScrollListener pixelScrollListener) {
+ this.listener = pixelScrollListener;
+ }
+
+ @Override
+ public void onScrollStateChanged(AbsListView view, int scrollState) {
+ // init the values every time the list is moving
+ if (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_TOUCH_SCROLL ||
+ scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING) {
+ if (mTrackedChild == null) {
+ syncState(view);
+ }
+ }
+ }
+
+ @Override
+ public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
+ if (mTrackedChild == null) {
+ // case we don't have any reference yet, try again here
+ syncState(view);
+ } else {
+ boolean childIsSafeToTrack = (mTrackedChild.getParent() == view) && (view.getPositionForView(mTrackedChild) == mTrackedChildPrevPosition);
+ if (childIsSafeToTrack) {
+ int top = mTrackedChild.getTop();
+ if (listener != null) {
+ float deltaY = top - mTrackedChildPrevTop;
+ listener.onScroll(view, deltaY);
+ }
+ // re-syncing the state make the tracked child change as the list scrolls,
+ // and that gives a much higher true state for `childIsSafeToTrack`
+ syncState(view);
+ } else {
+ mTrackedChild = null;
+ }
+ }
+ }
+
+ private void syncState(AbsListView view) {
+ if (view.getChildCount() > 0) {
+ mTrackedChild = getChildInTheMiddle(view);
+ mTrackedChildPrevTop = mTrackedChild.getTop();
+ mTrackedChildPrevPosition = view.getPositionForView(mTrackedChild);
+ }
+ }
+
+ private View getChildInTheMiddle(AbsListView view) {
+ return view.getChildAt(view.getChildCount() / 2);
+ }
+
+ public static interface PixelScrollListener {
+ public void onScroll(AbsListView view, float deltaY);
+ }
+}
\ No newline at end of file