forked from commonsguy/cw-omnibus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sample app demonstrating uses of GridLayout
- Loading branch information
1 parent
19aae85
commit e7b3302
Showing
27 changed files
with
752 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="src" path="gen"/> | ||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> | ||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> | ||
<classpathentry kind="output" path="bin/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>GridLayoutSampler</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>com.android.ide.eclipse.adt.ApkBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.commonsware.android.gridlayout" | ||
android:versionCode="1" | ||
android:versionName="1.0"> | ||
|
||
<uses-sdk | ||
android:minSdkVersion="7" | ||
android:targetSdkVersion="11"/> | ||
|
||
<supports-screens | ||
android:largeScreens="true" | ||
android:normalScreens="true" | ||
android:smallScreens="false" | ||
android:xlargeScreens="true"/> | ||
|
||
<application | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/Theme.Sherlock"> | ||
<activity | ||
android:name=".MainActivity" | ||
android:label="@string/app_name"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN"/> | ||
|
||
<category android:name="android.intent.category.LAUNCHER"/> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# To enable ProGuard in your project, edit project.properties | ||
# to define the proguard.config property as described in that file. | ||
# | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in ${sdk.dir}/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the ProGuard | ||
# include property in project.properties. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
android.library.reference.1=../../external/ActionBarSherlock | ||
target=android-15 | ||
android.library.reference.2=../../../../../../../workspace/gridlayout |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:columnCount="1"> | ||
|
||
<Button | ||
android:layout_column="0" | ||
android:layout_row="0" | ||
android:text="@string/button"/> | ||
|
||
<Button | ||
android:layout_column="0" | ||
android:layout_row="1" | ||
android:text="@string/button"/> | ||
|
||
</GridLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:orientation="horizontal" | ||
android:columnCount="2"> | ||
|
||
<TextView | ||
android:text="@string/name" | ||
android:textAppearance="?android:attr/textAppearanceLarge"/> | ||
|
||
<EditText | ||
android:layout_gravity="fill_horizontal" | ||
android:inputType="textPersonName"> | ||
|
||
<requestFocus/> | ||
</EditText> | ||
|
||
<TextView | ||
android:text="@string/address" | ||
android:textAppearance="?android:attr/textAppearanceLarge"/> | ||
|
||
<EditText | ||
android:layout_gravity="fill_horizontal" | ||
android:inputType="textPostalAddress"/> | ||
|
||
</GridLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:columnCount="2"> | ||
|
||
<Button | ||
android:layout_column="0" | ||
android:layout_row="0" | ||
android:text="@string/button"/> | ||
|
||
<Button | ||
android:layout_column="1" | ||
android:layout_row="0" | ||
android:text="@string/button"/> | ||
|
||
</GridLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:columnCount="9" | ||
android:orientation="horizontal" | ||
android:rowCount="5"> | ||
|
||
<Button | ||
android:layout_columnSpan="2" | ||
android:layout_gravity="fill" | ||
android:layout_rowSpan="2" | ||
android:text="@string/string_1"/> | ||
|
||
<Button | ||
android:layout_columnSpan="2" | ||
android:layout_gravity="fill_horizontal" | ||
android:text="@string/string_2"/> | ||
|
||
<Button | ||
android:layout_gravity="fill_vertical" | ||
android:layout_rowSpan="4" | ||
android:text="@string/string_3"/> | ||
|
||
<Button | ||
android:layout_columnSpan="3" | ||
android:layout_gravity="fill" | ||
android:layout_rowSpan="2" | ||
android:text="@string/string_4"/> | ||
|
||
<Button | ||
android:layout_columnSpan="3" | ||
android:layout_gravity="fill_horizontal" | ||
android:text="@string/string_5"/> | ||
|
||
<Button | ||
android:layout_columnSpan="2" | ||
android:layout_gravity="fill_horizontal" | ||
android:text="@string/string_6"/> | ||
|
||
<Space | ||
android:layout_width="36dp" | ||
android:layout_column="0" | ||
android:layout_row="4"/> | ||
|
||
<Space | ||
android:layout_width="36dp" | ||
android:layout_column="1" | ||
android:layout_row="4"/> | ||
|
||
<Space | ||
android:layout_width="36dp" | ||
android:layout_column="2" | ||
android:layout_row="4"/> | ||
|
||
<Space | ||
android:layout_width="36dp" | ||
android:layout_column="3" | ||
android:layout_row="4"/> | ||
|
||
<Space | ||
android:layout_width="36dp" | ||
android:layout_column="4" | ||
android:layout_row="4"/> | ||
|
||
<Space | ||
android:layout_width="36dp" | ||
android:layout_column="5" | ||
android:layout_row="4"/> | ||
|
||
<Space | ||
android:layout_width="36dp" | ||
android:layout_column="6" | ||
android:layout_row="4"/> | ||
|
||
<Space | ||
android:layout_width="36dp" | ||
android:layout_column="7" | ||
android:layout_row="4"/> | ||
|
||
<Space | ||
android:layout_height="36dp" | ||
android:layout_column="8" | ||
android:layout_row="0"/> | ||
|
||
<Space | ||
android:layout_height="36dp" | ||
android:layout_column="8" | ||
android:layout_row="1"/> | ||
|
||
<Space | ||
android:layout_height="36dp" | ||
android:layout_column="8" | ||
android:layout_row="2"/> | ||
|
||
<Space | ||
android:layout_height="36dp" | ||
android:layout_column="8" | ||
android:layout_row="3"/> | ||
|
||
<Space | ||
android:layout_height="36dp" | ||
android:layout_column="8" | ||
android:layout_row="4"/> | ||
|
||
</GridLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:columnCount="2"> | ||
|
||
<TextView | ||
android:layout_column="0" | ||
android:layout_row="0" | ||
android:text="@string/name" | ||
android:textAppearance="?android:attr/textAppearanceLarge"/> | ||
|
||
<EditText | ||
android:layout_column="1" | ||
android:layout_row="0" | ||
android:inputType="textPersonName"> | ||
|
||
<requestFocus/> | ||
</EditText> | ||
|
||
<TextView | ||
android:layout_column="0" | ||
android:layout_row="1" | ||
android:text="@string/address" | ||
android:textAppearance="?android:attr/textAppearanceLarge"/> | ||
|
||
<EditText | ||
android:layout_column="1" | ||
android:layout_row="1" | ||
android:inputType="textPostalAddress"/> | ||
|
||
</GridLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
android:columnCount="2"> | ||
|
||
<TextView | ||
android:layout_column="0" | ||
android:layout_row="0" | ||
android:text="@string/name" | ||
android:textAppearance="?android:attr/textAppearanceLarge"/> | ||
|
||
<EditText | ||
android:layout_column="1" | ||
android:layout_row="0" | ||
android:layout_gravity="fill_horizontal" | ||
android:inputType="textPersonName"> | ||
|
||
<requestFocus/> | ||
</EditText> | ||
|
||
<TextView | ||
android:layout_column="0" | ||
android:layout_row="1" | ||
android:text="@string/address" | ||
android:textAppearance="?android:attr/textAppearanceLarge"/> | ||
|
||
<EditText | ||
android:layout_column="1" | ||
android:layout_row="1" | ||
android:layout_gravity="fill_horizontal" | ||
android:inputType="textPostalAddress"/> | ||
|
||
</GridLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<android.support.v7.widget.GridLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res/com.commonsware.android.gridlayout" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
app:columnCount="1"> | ||
|
||
<Button | ||
app:layout_column="0" | ||
app:layout_row="0" | ||
android:text="@string/button"/> | ||
|
||
<Button | ||
app:layout_column="0" | ||
app:layout_row="1" | ||
android:text="@string/button"/> | ||
|
||
</android.support.v7.widget.GridLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<android.support.v7.widget.GridLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res/com.commonsware.android.gridlayout" | ||
android:layout_width="fill_parent" | ||
android:layout_height="fill_parent" | ||
app:columnCount="2" | ||
app:orientation="horizontal"> | ||
|
||
<TextView | ||
android:text="@string/name" | ||
android:textAppearance="?android:attr/textAppearanceLarge"/> | ||
|
||
<EditText | ||
app:layout_gravity="fill_horizontal" | ||
android:inputType="textPersonName"> | ||
|
||
<requestFocus/> | ||
</EditText> | ||
|
||
<TextView | ||
android:text="@string/address" | ||
android:textAppearance="?android:attr/textAppearanceLarge"/> | ||
|
||
<EditText | ||
app:layout_gravity="fill_horizontal" | ||
android:inputType="textPostalAddress"/> | ||
|
||
</android.support.v7.widget.GridLayout> |
Oops, something went wrong.