-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathandroid.html
More file actions
395 lines (355 loc) · 13.1 KB
/
android.html
File metadata and controls
395 lines (355 loc) · 13.1 KB
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
<!doctype html><html>
<head>
<meta charset="utf-8">
<title>Android</title>
<style>body{font-size: 12px}code,pre{margin:0;padding:0;}
body>pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space: -o-pre-wrap;word-wrap:break-word;}
</style></head><body><h1>Android</h1>
<script>
function getRandomColor() {
var letters = '0123456789ABCDEF';
var color = '#';
for (var i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}
function graph(t){
t.style.borderCollapse='collapse';
t=t.rows[0];
for(var i=0;i<t.children.length;i++){
t.children[i].style.textAlign = 'center';
t.children[i].innerHTML = "<div style='display:inline-block;background:"+getRandomColor()+";width:20px;height:"+t.children[i].innerHTML+"px'></div><br>"+t.children[i].innerHTML;
t.children[i].style.verticalAlign = 'bottom';
}
}
window.onload = function(){
var t = document.getElementsByClassName('bargraph');
for(var i=0;i<t.length;i++)graph(t[i]);
}
</script><pre><b>10 Most Prescribed Psychiatric Drugs in the the U.S. (in millions)</b>
<table border="1" cellspacing="2" cellpadding="0" class="bargraph">
<tr>
<td>258</td>
<td>246</td>
<td>2</td>
<td>26</td>
<td>12</td>
<td>43</td>
<td>3</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>Java[android]</td>
<td>ReactJS</td>
<td>reactjs[android]</td>
<td>kotlin</td>
<td>Xamarin[android]</td>
<td>xamarin</td>
<td>corona</td>
<td>phonegap</td>
<td>lua</td>
</tr>
</table>
<p>
<a href="https://www.ifixit.com/Guide/How+to+Remove+a+Stripped+Screw/13213">How to remove stripped screws</a>
Blackberry pointer mode may be close to what I need.
<a href="https://www.youtube.com/watch?time_continue=139&v=SEZyUzt8xys&feature=emb_logo">How to remove stripped screws.</a>
<br>
I wish/want for Android is to have a class of phones not in a virtual
machine because it works way to poorly on low budget phones.
They need a compiled down version.
</p>
<p>Try ConstraintLayout. Notification badges have a de facto standard using shortcutbadge app on github, but that doesn't work if you have notifications disabled
So my plan is to create a nova launcher competitor that displays notification badges for the handful of apps that support it and allows you to display notification badges for apps that don't buy counting the number of notifications and auto dismissing them to essentially duplicate the iphone behavior. The better idea is to just create 1by1 widgets that block whatever applications selected notifications while still displaying the badge icon. The notifications should be dismissed when you open the widget. https://developer.android.com/reference/android/service/notification/NotificationListenerService.html#getActiveNotifications()
Invoking a Java Method by string name https://stackoverflow.com/questions/160970/how-do-i-invoke-a-java-method-when-given-the-method-name-as-a-string
</p>
<p><a href="https://www.xda-developers.com/notification-importance-controls-all-apps-android-oreo/">Notification Importance for all apps Oreo</a>
Fail to call Google Assistant https://stackoverflow.com/q/46120774</p>
<p>Scroll to Top of Page https://stackoverflow.com/q/49042654</p>
<p>Android notification system is stupid. It dismisses all notifications for an application when you open the app. This can be changed but isn't the default behavior. https://chat.stackoverflow.com/transcript/message/41374472#41374472
Samsung appears to have gotten this right.
https://stackoverflow.com/q/46120774
Absolute positioning = FrameLayou<br>
CoordinatorLayout<br>
google makes a flexbox layout<br>
@+/ means
android:id="@+id/activity_main"
http://www.tutorialride.com/android/android-gravity.htm
https://www.tutorialspoint.com/android/android_user_interface_layouts.htm
</p>
<p><input type=Text> = <TextView></p>
<p>layout_weight for width %<br>
always use android:id="@+id/test"</p>
<pre><code>@android:id/mywidget</code> References an id that exists in android.R.java, e.g. resources that are already provided by the framework</pre>
<p>PercentRelativeLayout depreciated but allows you to set both height & width as percentage </p>
<p><br>
android:layout_width="match_parent" <=> width: 100%;display:block;</p>
<p><img src="https://i.stack.imgur.com/TBMwG.png"></p>
<div></div>
<table style="width:100%" border="1"><tbody>
<tr>
<td width="25%"><pre>What it looks like</pre></td>
<td width="25%">HTML & CSS</td>
<td width="25%">Android XML</td>
<td width="25%">Symbolic JavaLink<br>
JavaLink[] </td>
</tr>
<tr>
<td><img src="https://www.tutorialspoint.com/android/images/liner1.jpg"></td>
<td><pre>
</pre></td>
<td><xmp><?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<Button android:id="@+id/btnStartService"
android:layout_width="270dp"
android:layout_height="wrap_content"
android:text="start_service"/>
<Button android:id="@+id/btnPauseService"
android:layout_width="270dp"
android:layout_height="wrap_content"
android:text="pause_service"/>
<Button android:id="@+id/btnStopService"
android:layout_width="270dp"
android:layout_height="wrap_content"
android:text="stop_service"/>
</LinearLayout></xmp></td>
<td width="25%"></td>
</tr>
<tr>
<td></td>
<td></td>
<td><xmp><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:text="@string/username"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<EditText
android:width="150px"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:text="@string/password"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<EditText
android:width="150px"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout></xmp></td>
<td width="25%"></td>
</tr>
<tr>
<td>ListView</td>
<td><pre><ul>
<li></li>
</ul></pre></td>
<td><xmp><?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|left"
android:orientation="vertical" >
Here is your layout!
</LinearLayout>
</ScrollView></xmp><xmp>
</xmp>
</td>
<td></td>
</tr>
<tr>
<td>Style Stuff
<p></p>
</td>
<td><style>
</style>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td><input type=password style="width:100%;border:0px;outline:1px solid grey;"></td>
<td><pre><EditText android:id="@+id/phone" android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="@string/phone_hint" android:inputType="phone" /><br>
android:inputType="textCapSentences|textAutoCorrect"</pre>
</td>
<td></td>
</tr>
<tr>
<td></td>
<td><p>vertical-align = android:gravity=top
android:layout_gravity = "center|left" = float:left;
</p>
</td>
<td><xmp><?xml version = "1.0" encoding = "utf-8"?>
<LinearLayoutxmlns:android = "http://schemas.android.com/apk/res/android"
xmlns:app = "http://schemas.android.com/apk/res-auto"
xmlns:tools = "http://schemas.android.com/tools"
android:layout_width = "match_parent"
android:layout_height = "match_parent"
app:layout_behavior = "@string/appbar_scrolling_view_behavior"
tools:context = "com.example.custom.and gravity.MainActivity"
tools:showIn = "@layout/activity_main"
android:orientation = "vertical"
>
<Button
android:layout_width = "130dp"
android:layout_height = "130dp"
android:text = "Button1"
android:id = "@+id/button1"
android:gravity = "top"
android:textSize = "20dp"
android:background = "#FF0000"
/>
<Button
android:layout_width = "130dp"
android:layout_height = "130dp"
android:text = "Button2"
android:id = "@+id/button2"
android:gravity = "bottom"
android:textSize = "20dp"
android:background = "#00FF00"
/>
<Button
android:layout_width = "130dp"
android:layout_height = "130dp"
android:text = "Button3"
android:id = "@+id/button3"
android:textSize = "20dp"
android:layout_gravity = "right"
android:gravity = "top"
android:background = "#FFFF00"
/>
</LinearLayout></xmp></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td><xmp><Button
android:id="@+id/login"
android:text="@string/login" android:width="200px" android:layout_width="wrap_content" android:layout_height="wrap_content" /></xmp></td>
<td></td>
</tr>
<tr>
<td><img src="https://images.thoughtbot.com/blog-vellum-image-uploads/wDbiaqGSQyyErtXGSh6w_scaletype.png" width=300></td>
<td><img src="image.png"></td>
<td><xmp><Button><ImageView
android:src="@drawable/ic_launcher"
android:scaleType="fitCenter"
android:layout_height="250px"
android:layout_width="250px"/></Button>
<ImageButton
android:id="@+id/ImageButton01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/album_icon"
android:background="@drawable/round_button" /></xmp></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td><xmp><?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base application theme. -->
<style name="MyTheme" parent="Theme.AppCompat">
<item name="android:textViewStyle">@style/MyTextViewStyle</item>
</style>
<style name="MyTextViewStyle" parent="android:Widget.TextView">
<item name="android:textColor">#F00</item>
<item name="android:textStyle">bold</item>
</style>
</resources>
<application […] android:theme="@style/MyTheme">
http://www.hidroh.com/2015/02/25/support-multiple-themes-android-app-part-2/</xmp></td>
<td></td>
</tr>
<tr>
<td><xmp><?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="1">
<TableRow>
<TextView
android:text="@string/table_layout_4_open"
android:padding="3dip" />
<TextView
android:text="@string/table_layout_4_open_shortcut"
android:gravity="right"
android:padding="3dip" />
</TableRow>
<TableRow>
<TextView
android:text="@string/table_layout_4_save"
android:padding="3dip" />
<TextView
android:text="@string/table_layout_4_save_shortcut"
android:gravity="right"
android:padding="3dip" />
</TableRow>
</TableLayout></xmp></td>
<td><img src="https://developer.android.com/images/table_layout.png"></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<pre>Upgraded to HTML5 and Wordpress
Wordpress is intendend to be used as a blogging platform
HTML
Creative Commons
http://en.wikipedia.org/wiki/Permalink
SEO
Social Media
Social Media Monitoring
TagCloud
Creative Commons vs GNU GPL
- one of the terms given in class was GPL
</pre>
<pre>
Clove.co.uk - Exynos samsung have unlocked bootloader
new NotificationCompat.Builder(context).
.setLargeIcon()
.setSmallIcon()
getIcon() MEDIA_TRACK_TYPE_METADATA
notification.contentView.setImageViewBitmap(R.id.imageViewAlbumArt, albumArt);
WallpaperManager.getInstance(this).setStream(inputStream,null,true,WallpaperManager.FLAG_LOCK);
maybe I can disable the lockscreen request the lockscreen background and create a custom lockscreen.
startActivity(new Intent(Intent.ACTION_VOICE_COMMAND).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "test");
sendIntent.setType("text/plain");
if (sendIntent.resolveActivity(getPackageManager()) != null) {
startActivity(sendIntent);
}
https://stackoverflow.com/q/22585891
doesn't work
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setClassName("com.google.android.googlequicksearchbox",
"com.google.android.googlequicksearchbox.VoiceSearchActivity");
try {
startActivity(intent);
} catch (ActivityNotFoundException anfe) {
Log.d(TAG, "Google Voice Search is not found");
}
maybe works?
startActivity(new Intent(Intent.ACTION_VOICE_COMMAND).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
doesn't work
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
startActivityForResult(intent, 1234);
</pre>
</body>
</html>