Skip to content

Instantly share code, notes, and snippets.

@claireliu14
claireliu14 / index.html
Created January 6, 2023 07:39
Test website orientation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
@claireliu14
claireliu14 / main.dart
Created February 23, 2020 04:35
Horizontal ListWheelScrollView Sample
import 'package:flutter/material.dart';
const String kTitle = 'Horizontal ListWheelScrollView Sample';
void main() => runApp(new ListWheelScrollViewSample());
class ListWheelScrollViewSample extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(
@claireliu14
claireliu14 / MainActivity.java
Created September 11, 2019 04:13
Make App bar and status bar transparent without FLAG_LAYOUT_NO_LIMITS
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setting status bar
final Window window = this.getWindow();
window.getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR
@claireliu14
claireliu14 / MainActivity.java
Created July 24, 2019 05:59
Calculus FOV ( Field of View ) of ARCore camera
@Override
public void onUpdate(FrameTime frameTime) {
Log.e(TAG, "Elephant rotation angle: " + rotationAngle);
// from arcore
try {
Frame frame = arFragment.getArSceneView().getSession().update();
Camera camera = frame.getCamera();
CameraIntrinsics intrinsics = camera.getImageIntrinsics();
@claireliu14
claireliu14 / main.dart
Last active June 27, 2019 07:55
Sample of Future
import 'dart:async';
void main() {
getAJoke().then((value) {
print(value);
})
.whenComplete(() {
print('Complete');
})
.catchError((error) {
@claireliu14
claireliu14 / MainActivity.java
Last active June 27, 2019 07:59
Make App bar and Status bar transparent.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setting status bar
Window window = this.getWindow();
window.setFlags(
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
apply plugin: 'com.android.application'
apply plugin: 'com.google.ar.sceneform.plugin'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.osensetech.taoyuan"
minSdkVersion 24
targetSdkVersion 27
versionCode 1