Skip to content

Instantly share code, notes, and snippets.

View thiagoolsilva's full-sized avatar
🏠
Working from home

thiago lopes silva thiagoolsilva

🏠
Working from home
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="id_message_request">57806d2e1000003c1f62fd31</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="id_message_request">57806d521000002b1f62fd33</string>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="id_message_request">57806d2e1000003c1f62fd31</string>
</resources>
/**
* Get message from web server
*
* @return The message received
*/
@WorkerThread
public String GetMessageFromWebServer(@NonNull Context context) {
...
try {
/**
* The constant BUILD_NAME.
*/
public static final String BUILD_NAME = "production";
/**
* The constant BUILD_NAME.
*/
public static final String BUILD_NAME = "development";
final String javaSetFlavourMessage = Constants.BUILD_NAME;
<ProgressBar
android:id="@+id/progress_bar"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"/>
@thiagoolsilva
thiagoolsilva / dummy_custom_button
Last active August 16, 2017 02:18
It create a dummy custom button only for be used on an example of my blog
/*
* Copyright (C) 2017 Thiago lopes da Silva
*
* 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
@thiagoolsilva
thiagoolsilva / custom_boundedmatcher
Created August 16, 2017 02:34
Creating a custom matcher to be used on espresso
public static Matcher<View> withDummyStatus(final LoginButton.DummyStatus expectedStatus) {
return new BoundedMatcher<View, LoginButton>(LoginButton.class) {
@Override
public void describeTo(Description description) {
description.appendText("Checking the matcher on received view: ");
description.appendText("with expectedStatus=" + expectedStatus.toString());
}
@Override