Skip to content

Instantly share code, notes, and snippets.

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

Corey Scott corsc

🏠
Working from home
View GitHub Profile
@corsc
corsc / activity_main.xml
Last active December 11, 2015 08:59
Sage42.org Blog Entry - Example V1
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<TextView
android:id="@+id/title_v1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@corsc
corsc / activity_main.xml
Created January 20, 2013 09:07
Sage42.org Blog Entry - Example V2
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<TextView
android:id="@+id/title_v2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@corsc
corsc / activity_main.xml
Created January 20, 2013 09:44
Sage42.org Blog Entry - Example V3
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<TextView
android:id="@+id/title_v3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@corsc
corsc / so_answer
Created July 13, 2013 03:04
A Stackoverflow answer
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONArray;
@corsc
corsc / std_strings.xml
Created August 12, 2013 02:59
Example for a blog entry
<resources>
<string name="name">Name</string>
<string name="password">Password</string>
<string name="phone">Phone</string>
<string name="mobile_phone">Mobile</string>
<string name="email">Email</string>
</resources>
@corsc
corsc / multiple files
Last active December 20, 2015 22:49
Example for blog entry
strings_user.xml
<resources>
<string name="user_name">Name</string>
<string name="user_password">Password</string>
<string name="user_phone">Phone</string>
</resources>
strings_registration.xml
@corsc
corsc / standard_structure
Created August 12, 2013 03:08
Example for blog post
values/
strings.xml
styles.xml
@corsc
corsc / revised_structure
Created August 12, 2013 03:09
Example for blog entry
values/
strings.xml (standard strings used all over the place like "OK" or "YES"
strings_user.xml (strings for the user module)
strings_registration.xml (strings for the registration module)
styles.xml (standard styles used everywhere, e.g. base styles, templates or menu/tab styles)
styles_user.xml (styles only used in the user module)
styles_registration.xml (styles only used in the registration module)
@corsc
corsc / old_package_structure
Created August 21, 2013 01:25
Previous Package Structure
someapp/
activities/
dao/
model/
views/
utils/
@corsc
corsc / new_package_structure
Last active December 21, 2015 10:08
Newer (experimental) file structure
someapp/
common/
module1/
submodule1/
submodule2/
module2/
utils/
Comments: