Permalink
Browse files

Code for Google I/O 2010 Zippy Android apps talk.

  • Loading branch information...
bradfitz committed May 20, 2010
0 parents commit c8bb0f86ef292569662523d7b2f2e21ec0cbcc9a
@@ -0,0 +1,5 @@
+bin
+gen
+.svn
+*~
+local.properties
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.google.io2010.zippy"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <application android:label="@string/app_name">
+
+ <activity android:name="ZippyAndroidDemoActivity"
+ android:label="@string/app_name">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+
+ <activity android:name=".JankyListViewActivity"></activity>
+
+ </application>
+</manifest>
@@ -0,0 +1,12 @@
+#NOTE:
+# If your SDK is in a non-standard place, be sure to put a file in
+# this directory called local.properties, with contents like below:
+
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+# This file must *NOT* be checked in Version Control Systems,
+# as it contains information specific to your local configuration.
+# location of the SDK. This is only used by Ant
+# For customization when using a Version Control System, please read the
+# header note.
+sdk.dir=/home/bradfitz/sdk/android
@@ -0,0 +1,17 @@
+# This file is used to override default values used by the Ant build system.
+#
+# This file must be checked in Version Control Systems, as it is
+# integral to the build system of your project.
+
+# This file is only used by the Ant script.
+
+# You can use this to override default values such as
+# 'source.dir' for the location of your java source folder and
+# 'out.dir' for the location of your output folder.
+
+# You can also use it define how the release builds are signed by declaring
+# the following properties:
+# 'key.store' for the location of your keystore and
+# 'key.alias' for the name of the key to use.
+# The password will be asked during the build when you use the 'release' target.
+
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="zippyandroid" default="help">
+
+ <!-- The local.properties file is created and updated by the 'android' tool.
+ It contains the path to the SDK. It should *NOT* be checked in in Version
+ Control Systems. -->
+ <property file="local.properties" />
+
+ <!-- The build.properties file can be created by you and is never touched
+ by the 'android' tool. This is the place to change some of the default property values
+ used by the Ant rules.
+ Here are some properties you may want to change/update:
+
+ application.package
+ the name of your application package as defined in the manifest. Used by the
+ 'uninstall' rule.
+ source.dir
+ the name of the source directory. Default is 'src'.
+ out.dir
+ the name of the output directory. Default is 'bin'.
+
+ Properties related to the SDK location or the project target should be updated
+ using the 'android' tool with the 'update' action.
+
+ This file is an integral part of the build system for your application and
+ should be checked in in Version Control Systems.
+
+ -->
+ <property file="build.properties" />
+
+ <!-- The default.properties file is created and updated by the 'android' tool, as well
+ as ADT.
+ This file is an integral part of the build system for your application and
+ should be checked in in Version Control Systems. -->
+ <property file="default.properties" />
+
+ <!-- Custom Android task to deal with the project target, and import the proper rules.
+ This requires ant 1.6.0 or above. -->
+ <path id="android.antlibs">
+ <pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
+ <pathelement path="${sdk.dir}/tools/lib/sdklib.jar" />
+ <pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" />
+ <pathelement path="${sdk.dir}/tools/lib/apkbuilder.jar" />
+ <pathelement path="${sdk.dir}/tools/lib/jarutils.jar" />
+ </path>
+
+ <taskdef name="setup"
+ classname="com.android.ant.SetupTask"
+ classpathref="android.antlibs" />
+
+ <!-- Execute the Android Setup task that will setup some properties specific to the target,
+ and import the build rules files.
+
+ The rules file is imported from
+ <SDK>/platforms/<target_platform>/templates/android_rules.xml
+
+ To customize some build steps for your project:
+ - copy the content of the main node <project> from android_rules.xml
+ - paste it in this build.xml below the <setup /> task.
+ - disable the import by changing the setup task below to <setup import="false" />
+
+ This will ensure that the properties are setup correctly but that your customized
+ build steps are used.
+ -->
+ <setup />
+
+</project>
@@ -0,0 +1,11 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "build.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-4
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ListView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:id="@+id/jankylistview">
+</ListView>
+
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="50px"
+ android:orientation="horizontal"
+>
+
+<ImageView
+ android:maxHeight="50sp"
+ android:maxWidth="50sp"
+ android:padding="10dip"
+ android:src="@android:drawable/star_big_on"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+
+ android:layout_marginTop="2dip"
+ android:layout_marginRight="2dip"
+ android:layout_marginBottom="2dip"
+ android:id="@+id/star_in_list_item"
+ />
+<TextView
+ android:id="@+id/textview_in_list_item"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:padding="4px"
+ android:textSize="20sp"
+ />
+
+</LinearLayout>
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ >
+ <LinearLayout android:layout_height="fill_parent"
+ android:layout_width="fill_parent"
+ android:orientation="vertical"
+ android:padding="4px"
+ android:id="@+id/view_root"
+ >
+
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Fast button..."
+ />
+<Button
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Do-nothing button"
+ />
+
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="600 ms ..."
+ />
+<Button
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Janky Button"
+ android:id="@+id/janky_button"
+ />
+
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Do a 6 sec op on the main thread..."
+ />
+<Button
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="ANR button 1"
+ android:id="@+id/anr1"
+ />
+
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="AsyncTask + animation..."
+ />
+<Button
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Slow op w/ AsyncTask"
+ android:id="@+id/asynctask"
+ />
+
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Smooth vs. janky ListViews..."
+ />
+<LinearLayout android:layout_height="wrap_content"
+ android:layout_width="fill_parent"
+ android:orientation="horizontal"
+ android:padding="2px">
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Smooth ListView"
+ android:id="@+id/start_smoothlistview_button"
+ />
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Janky (60ms)"
+ android:id="@+id/start_jankylistview_button"
+ />
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="async"
+ android:id="@+id/start_asynclistview_button"
+ />
+</LinearLayout>
+
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Showing mutex contention logging..."
+ />
+<Button
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Lock Fight!"
+ android:id="@+id/start_lock_fight_button"
+ />
+
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="Database ops on main thread..."
+ />
+<LinearLayout android:layout_height="wrap_content"
+ android:layout_width="fill_parent"
+ android:orientation="horizontal"
+ android:padding="2px">
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="Init DB"
+ android:id="@+id/init_db_button"
+ />
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="update*"
+ android:id="@+id/slow_update_button"
+ />
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="select"
+ android:id="@+id/start_slow_db_button"
+ />
+ <Button
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="+index"
+ android:id="@+id/start_fast_db_button"
+ />
+</LinearLayout> <!-- db button row -->
+
+</LinearLayout>
+</ScrollView>
+
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">Zippy Android Google I/O</string>
+
+ <!-- Dummy Resource to get a unique resource ID for View.setTag() -->
+ <string name="tag_async_list_pos" />
+</resources>
Oops, something went wrong.

0 comments on commit c8bb0f8

Please sign in to comment.