Skip to content

Instantly share code, notes, and snippets.

Aaron McIntyre px-amaac

Block or report user

Report or block px-amaac

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ActivityB.java
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);
}
View LoginController.java
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 Feb 2, 2016
Output from failed instrumentation test.
View Failed test output
+---------->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-
View MyActivity.java
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);
View gist:60efd1dba923796d33bb
# 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 Jan 13, 2016
google-analytics-config
View services.json
{
"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",
View build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
applicationId "com.pxamaac.android"
minSdkVersion 12
View something.java
(int) baseActivityImplActivity
.getResources()
.getDimension(
R.dimen.abc_action_bar_default_height_material);
View UploadPhotoIntentService.java
@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 Oct 5, 2015
flow and debug statements.
View debug
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.
You can’t perform that action at this time.