This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.uphyca.fragmenttest; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentActivity; | |
import android.support.v4.app.FragmentManager; | |
import android.test.ActivityUnitTestCase; | |
import android.view.LayoutInflater; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From b2dd2a804ad2030b4a92d8ee8b9bf8129b1eee70 Mon Sep 17 00:00:00 2001 | |
From: ianhanniballake <ian.hannibal.lake@gmail.com> | |
Date: Tue, 21 May 2013 12:04:16 -0700 | |
Subject: [PATCH] Adds ActionBarDrawerToggle compatible with ActionBarSherlock | |
Signed-off-by: ianhanniballake <ian.hannibal.lake@gmail.com> | |
--- | |
actionbarsherlock/libs/android-support-v4.jar | Bin 271754 -> 484258 bytes | |
.../src/com/actionbarsherlock/app/ActionBar.java | 14 + | |
.../app/ActionBarDrawerToggle.java | 441 +++++++++++++++++++++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example; | |
import android.test.suitebuilder.annotation.SmallTest; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import static org.junit.Assert.*; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ペーストのショートカットCtrl+Vを打鍵すればおk | |
// Espresso | |
Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); | |
instrumentation.sendKeySync(new KeyEvent(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(), KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_V, 0, KeyEvent.META_CTRL_ON)); | |
instrumentation.sendKeySync(new KeyEvent(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(), KeyEvent.ACTION_UP, KeyEvent.KEYCODE_V, 0, KeyEvent.META_CTRL_ON)); | |
//uiautomator | |
UiDevice device = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); | |
device.pressKeyCode(KeyEvent.KEYCODE_V, KeyEvent.META_CTRL_ON); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String packageName = "com.example.app"; // アプリケーションのパッケージ名(AndroidManifestに書くやつ) | |
int identifier = context.getResources() | |
.getIdentifier("foo", "id", packageName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Context context = ... | |
String name = context.getResources().getResourceName(R.id.action_bar); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var backing = MOON.getCurrentPage().backing; | |
var paper = MOON.getPaperJSON(backing); | |
var white = -1; | |
var penColor = (0x00aaff | (0xff000000)); | |
var pressure = 0.5; | |
paper.color = white; | |
paper.strokes = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/App/MOONBlock/js/block.enchant.js b/App/MOONBlock/js/block.enchant.js | |
index 499ed94..ddcb39e 100755 | |
--- a/App/MOONBlock/js/block.enchant.js | |
+++ b/App/MOONBlock/js/block.enchant.js | |
@@ -1620,6 +1620,11 @@ enchant.block.BlockLabel = enchant.Class.create(enchant.Label, { | |
initialize: function(text) { | |
enchant.Label.call(this, text); | |
}, | |
+ _update: function() { | |
+ var metrics = this.getMetrics(this.text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test( "pressure", function() { | |
var backing = MOON.getCurrentPage().backing; | |
var paper = MOON.getPaperJSON(backing); | |
//console.log(paper); | |
paper.strokes = []; | |
var pressure = 1.0; | |
var w = paper.width; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2013 uPhyca Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
NewerOlder