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
# Kifu for Android 棋譜ファイル | |
開始日時:2015/10/31 17:25:34 | |
手合割:平手 | |
先手:先手 | |
後手:後手 | |
手数----指手---------消費時間-- | |
1 7六歩(77) ( 0:06/00:00:06) | |
2 3四歩(33) ( 0:02/00:00:02) | |
3 7五歩(76) ( 0:02/00:00:08) | |
4 8八角成(22) ( 0:06/00:00:08) |
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
<LinearLayout | |
android:orientation="vertical" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<RelativeLayout | |
android:layout_weight="1" | |
android:layout_width="match_parent" | |
android:layout_height="0dp" > |
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
# Kifu for Android 棋譜ファイル | |
開始日時:2015/09/14 20:33:54 | |
手合割:平手 | |
先手:先手 | |
後手:後手 | |
手数----指手---------消費時間-- | |
1 7六歩(77) ( 0:23/00:00:23) | |
2 8四歩(83) ( 0:03/00:00:03) | |
3 2六歩(27) ( 0:20/00:00:43) | |
4 8五歩(84) ( 0:01/00:00:04) |
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
# Kifu for Android 棋譜ファイル | |
開始日時:2015/09/05 17:19:26 | |
手合割:平手 | |
先手:先手 | |
後手:後手 | |
手数----指手---------消費時間-- | |
1 2六歩(27) ( 0:35/00:00:35) | |
2 8四歩(83) ( 0:01/00:00:01) | |
3 2五歩(26) ( 0:01/00:00:36) | |
4 8五歩(84) ( 0:02/00:00:03) |
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
# Kifu for Android 棋譜ファイル | |
開始日時:2015/09/05 16:14:50 | |
手合割:平手 | |
先手:先手 | |
後手:後手 | |
手数----指手---------消費時間-- | |
1 7六歩(77) ( 0:01/00:00:01) | |
2 8四歩(83) ( 0:04/00:00:04) | |
3 6八銀(79) ( 0:06/00:00:07) | |
4 8五歩(84) ( 0:15/00:00:19) |
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
public class CustomRobolectricTestRunner extends RobolectricTestRunner { | |
public CustomRobolectricTestRunner(Class<?> testClass) throws InitializationError { | |
super(testClass); | |
String buildVariant = (BuildConfig.FLAVOR.isEmpty() ? "" : BuildConfig.FLAVOR + "/") + BuildConfig.BUILD_TYPE; | |
System.setProperty("android.package", BuildConfig.APPLICATION_ID); | |
System.setProperty("android.manifest", "build/intermediates/manifests/full/" + buildVariant + "/AndroidManifest.xml"); | |
System.setProperty("android.resources", "build/intermediates/res/" + buildVariant); | |
System.setProperty("android.assets", "build/intermediates/assets/" + buildVariant); | |
} | |
} |
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
@RunWith(RobolectricGradleTestRunner.class) | |
@Config(constants = BuildConfig.class, sdk = 21) | |
public class ApplicationTest { | |
@Test | |
public void testAppName() { | |
String actual = RuntimeEnvironment.application.getString(R.string.app_name); | |
String expected = "RobolectricSample"; | |
assertThat(actual, is(expected)); | |
} |
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
import android.support.test.rule.ActivityTestRule; | |
import android.support.test.runner.AndroidJUnit4; | |
import android.test.suitebuilder.annotation.LargeTest; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import static android.support.test.espresso.Espresso.onView; | |
import static android.support.test.espresso.assertion.ViewAssertions.matches; |
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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
Button btn = (Button)findViewById(R.id.button); | |
btn.setOnClickListener(new View.OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
// new IntentIntegrator(MainActivity.this).initiateScan(IntentIntegrator.ONE_D_CODE_TYPES); |
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
private static Matrix getMatrix(String path) { | |
Matrix m = new Matrix(); | |
m.reset(); | |
try { | |
ExifInterface ei = new ExifInterface(path); | |
int orientation = ei.getAttributeInt(ExifInterface.TAG_ORIENTATION,1); | |
switch(orientation) | |
{ | |
case 1://only scaling |