Skip to content

Instantly share code, notes, and snippets.

View px-amaac's full-sized avatar

Aaron McIntyre px-amaac

View GitHub Profile
public class ActivityB extends BaseActivity {
private static final String TAG = ActivityB.class.getSimpleName();
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActionBar actionBar = getSupportActionBar();
if(actionBar != null) {
actionBar.setTitle(TAG);
}
@px-amaac
px-amaac / LoginController.java
Created February 4, 2016 01:55
LoginTesting
public void login(View viewUsername, View viewPassword) {
if (!makingLogin) {
if (adapter.checkAllFields((EditText) viewUsername,
(EditText) viewPassword)) {
makingLogin = true;
username = ((EditText) viewUsername).getText().toString()
.trim();
password = ((EditText) viewPassword).getText().toString()
.trim();
@px-amaac
px-amaac / Failed test output
Created February 2, 2016 00:03
Output from failed instrumentation test.
+---------->RelativeLayout{id=2131624061, res-name=mainLayout, visibility=VISIBLE, width=1080, height=1401, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+------>RelativeLayout{id=2131624116, res-name=main_menu_fragmentAnimate, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+------->ScrollView{id=-1, visibility=VISIBLE, width=675, height=1536, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, root-is-
@px-amaac
px-amaac / MyActivity.java
Created January 21, 2016 21:21
How to test this.
public class MyActivity extends AppCompatActivity {
private MyController controller;
private Button continueButton
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
controller = new MyController();
continueButton = (Button) findViewById(R.id.continueButton);
@px-amaac
px-amaac / gist:60efd1dba923796d33bb
Last active January 22, 2017 23:43
proguard-rules.txt
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in D:\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
@px-amaac
px-amaac / services.json
Created January 13, 2016 18:55
google-analytics-config
{
"project_info": {
"project_id": "default-demo-app-6893",
"project_number": "434685081804",
"name": "Default Demo App"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:434685081804:android:73a4fb8297b2cd4f",
@px-amaac
px-amaac / build.gradle
Last active January 12, 2016 01:16
gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
applicationId "com.pxamaac.android"
minSdkVersion 12
@px-amaac
px-amaac / something.java
Created January 11, 2016 22:22
resource private
(int) baseActivityImplActivity
.getResources()
.getDimension(
R.dimen.abc_action_bar_default_height_material);
@Override
protected void onHandleIntent(Intent intent) {
sendImageUploadingIntent();
mTimesetPhoto = intent.getParcelableExtra(TIMESET_PHOTO);
if (mTimesetPhoto.getAddress() == null || mTimesetPhoto.getAddress() == "") {
sendImageFailedUploadingIntent();
} else {
try {
selectedCategoryItems = intent.getParcelableArrayListExtra(SELECTED_CATEGORIES);
uploadImage(mTimesetPhoto, selectedCategoryItems);
@px-amaac
px-amaac / debug
Created October 5, 2015 22:00
flow and debug statements.
App starts.
fragmentTransaction.add(R.id.main_content_frame, CameraFragment.newInstance(null));
fragmentTransaction.add(R.id.main_content_frame, MapFragment.newInstance(null));
D/MapFragment﹕ onViewCreated
D/CameraFragment﹕ onStart
D/MapFragment﹕ onStart
D/CameraFragment﹕ onResume
D/MapFragment﹕ onResume
show/hide map and camerafragments.