Skip to content

Instantly share code, notes, and snippets.

View colabug's full-sized avatar

Corey Leigh Latislaw colabug

View GitHub Profile
@colabug
colabug / PerformancePatterns.md
Last active February 8, 2022 12:33
Performance Patterns Notes
@colabug
colabug / Book.txt
Created January 21, 2015 17:00
Menu, File, and Key Formatting in Softcover
cover
frontmatter:
maketitle
preface.md
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/calculator_buttons"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--1-->
<Button
android:id="@+id/button1"

Plugin Route

Trying this plugin: https://github.com/kageiit/gradle-robojava-plugin

I am starting from a Blank Activity wizard hello world project - nothing fancy. I stashed by attempts at the manual configuration route that I was pursuing yesterday.

Added tdd module

Used the drop down menu, selected Java at the very bottom.

@colabug
colabug / DynamicFragmentSwappingActivity.java
Last active July 9, 2018 03:01
Static and Dynamic Views
import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.app.FragmentTransaction;
import android.os.Bundle;
public class DynamicFragmentSwappingActivity extends Activity
{
@Override
public void onCreate( Bundle savedInstanceState )
@colabug
colabug / HelloTardisActivity.java
Created May 30, 2013 22:55
Final code for Fragment Transition Workshop, Labs 1 & 2. Note: Package names differ for each lab. If using these snippets for Lab 1, make sure to change the name to match the project.
package com.colabug.TardisNoFragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.widget.Toast;
public class HelloTardisActivity extends FragmentActivity
{
@colabug
colabug / .zshrc
Created August 3, 2012 15:51
Integrating Robolectric with IntelliJ
# Shell Settings
export ANDROID_HOME="/usr/bin/android-sdk-macosx"
export PATH="/usr/bin/android-sdk-macosx/platform-tools:/usr/bin:/usr/bin/android-sdk-macosx/tools:/usr/local/apache-maven-2.1.2/bin:$PATH"
@colabug
colabug / ActivityStart.java
Created July 23, 2012 20:03
Chariot Blog Android Unit Testing With Robolectric
@Test
public void buttonClickShouldStartNewActivity() throws Exception
{
Button button = activity.findViewById( R.id.next_screen_button );
button.performClick();
Intent intent = NewActivity.createIntent( activity );
assertThat( activity, new StartedMatcher( intent ) );
}