From f8edcecc4ae9b585398e8b78aae202ba8ba6d515 Mon Sep 17 00:00:00 2001 From: Mark Murphy Date: Wed, 3 Sep 2014 09:02:53 -0400 Subject: [PATCH] new demo of Switch widget --- Basic/Switch/.classpath | 9 ++ Basic/Switch/.project | 33 +++++++ Basic/Switch/AndroidManifest.xml | 31 +++++++ Basic/Switch/build.gradle | 41 +++++++++ Basic/Switch/build.xml | 85 ++++++++++++++++++ Basic/Switch/proguard.cfg | 40 +++++++++ Basic/Switch/project.properties | 1 + .../Switch/res/drawable-hdpi/ic_launcher.png | Bin 0 -> 5154 bytes .../Switch/res/drawable-ldpi/ic_launcher.png | Bin 0 -> 1994 bytes .../Switch/res/drawable-mdpi/ic_launcher.png | Bin 0 -> 2800 bytes .../Switch/res/drawable-xhdpi/ic_launcher.png | Bin 0 -> 7812 bytes Basic/Switch/res/layout/main.xml | 5 ++ Basic/Switch/res/values/strings.xml | 4 + .../android/swytch/SwitchDemo.java | 26 ++++++ 14 files changed, 275 insertions(+) create mode 100644 Basic/Switch/.classpath create mode 100644 Basic/Switch/.project create mode 100644 Basic/Switch/AndroidManifest.xml create mode 100644 Basic/Switch/build.gradle create mode 100644 Basic/Switch/build.xml create mode 100644 Basic/Switch/proguard.cfg create mode 100644 Basic/Switch/project.properties create mode 100644 Basic/Switch/res/drawable-hdpi/ic_launcher.png create mode 100644 Basic/Switch/res/drawable-ldpi/ic_launcher.png create mode 100644 Basic/Switch/res/drawable-mdpi/ic_launcher.png create mode 100644 Basic/Switch/res/drawable-xhdpi/ic_launcher.png create mode 100644 Basic/Switch/res/layout/main.xml create mode 100644 Basic/Switch/res/values/strings.xml create mode 100644 Basic/Switch/src/com/commonsware/android/swytch/SwitchDemo.java diff --git a/Basic/Switch/.classpath b/Basic/Switch/.classpath new file mode 100644 index 000000000..7bc01d9a9 --- /dev/null +++ b/Basic/Switch/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Basic/Switch/.project b/Basic/Switch/.project new file mode 100644 index 000000000..bd10a15de --- /dev/null +++ b/Basic/Switch/.project @@ -0,0 +1,33 @@ + + + SwitchDemo + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/Basic/Switch/AndroidManifest.xml b/Basic/Switch/AndroidManifest.xml new file mode 100644 index 000000000..8f8cfdf16 --- /dev/null +++ b/Basic/Switch/AndroidManifest.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Basic/Switch/build.gradle b/Basic/Switch/build.gradle new file mode 100644 index 000000000..ff39d1e45 --- /dev/null +++ b/Basic/Switch/build.gradle @@ -0,0 +1,41 @@ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:0.12.2' + } +} +apply plugin: 'com.android.application' + +dependencies { +} + +android { + compileSdkVersion 19 + buildToolsVersion "19.1.0" + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + resources.srcDirs = ['src'] + aidl.srcDirs = ['src'] + renderscript.srcDirs = ['src'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + } + + // Move the tests to tests/java, tests/res, etc... + instrumentTest.setRoot('tests') + + // Move the build types to build-types/ + // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... + // This moves them out of them default location under src//... which would + // conflict with src/ being used by the main source set. + // Adding new build types or product flavors should be accompanied + // by a similar customization. + debug.setRoot('build-types/debug') + release.setRoot('build-types/release') + } +} diff --git a/Basic/Switch/build.xml b/Basic/Switch/build.xml new file mode 100644 index 000000000..9d5903bf8 --- /dev/null +++ b/Basic/Switch/build.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Basic/Switch/proguard.cfg b/Basic/Switch/proguard.cfg new file mode 100644 index 000000000..b1cdf17b5 --- /dev/null +++ b/Basic/Switch/proguard.cfg @@ -0,0 +1,40 @@ +-optimizationpasses 5 +-dontusemixedcaseclassnames +-dontskipnonpubliclibraryclasses +-dontpreverify +-verbose +-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* + +-keep public class * extends android.app.Activity +-keep public class * extends android.app.Application +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider +-keep public class * extends android.app.backup.BackupAgentHelper +-keep public class * extends android.preference.Preference +-keep public class com.android.vending.licensing.ILicensingService + +-keepclasseswithmembernames class * { + native ; +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet); +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet, int); +} + +-keepclassmembers class * extends android.app.Activity { + public void *(android.view.View); +} + +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} diff --git a/Basic/Switch/project.properties b/Basic/Switch/project.properties new file mode 100644 index 000000000..4e1cb586b --- /dev/null +++ b/Basic/Switch/project.properties @@ -0,0 +1 @@ +target=android-19 \ No newline at end of file diff --git a/Basic/Switch/res/drawable-hdpi/ic_launcher.png b/Basic/Switch/res/drawable-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..25850f894889a2b15408c46640fca2a0973e66e8 GIT binary patch literal 5154 zcmV+-6y58IP)o&JXe$MUDuU%{ z)ru`(MR)}(KG|duL4xer$z)$<-{*aQH@S2O0TQ7Po}GKo|J<3m`{#at>m7mO(^&}! zaXx1!5C?P)g~S2H0iB-{i7P0sptyq0k3d{O=f^MZgW?K`E9m?P#1(XY{QjMM5Z|jj zVyQ*(MINWo{I>u!bt;L^PV0X|MwambgH1DBr4y4QifAMh2-Q0rf$f!L&c!2cIs6sq zggX=Zp#u^Y%}Fp#x~lhcX(_@zT3uZNXZ8Vk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XrQ?o zs>xY%d{xQ175wsmqgRj04EafR7v_cD?xc$Pj=p7~Eu-&E=3adiD&$4yc0_)mHwxV)q9AV;A?KrN7km1kS})kbHjb6qv0!g9jw$^q*(6 zrHnErWr$i!5;{*hs0r`D&XGt)5$40_y!c&hl5*gf?cUagx#eH2=NE+Rn7Jj>?a&?z z@nS1ThQwhXe+aOptu&k^+xaee+aCXc?{wK)=`?u|-q@d0Z zjzO`ac(5av;qW!f-Aox$>>sUq9I4J`f0rtt&amW`uWX935Mo=u-`m%mX~+K$fG+q= z_vCPx#07*qoM6N<$g4ny=ng9R* literal 0 HcmV?d00001 diff --git a/Basic/Switch/res/drawable-ldpi/ic_launcher.png b/Basic/Switch/res/drawable-ldpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..c984844c940237171947ef8351edf1f790d06149 GIT binary patch literal 1994 zcmV;*2Q~PKP)osN672ulWvu_~l0R|W*mGbQ1~A)@zz9+xF@E7o_O-%QU+$j)B!ML37xVL!qLSeZ z+-0VXN!(55d+q&DZ^H8eEHoK9z+!`8WdY2lThm^eR} zaz+4*as)yIAr78_^r&T7(3}ElfCibP)bUq?&#-|T;XudffcXY?DFLJ*350~u+SJih z`4YSoxf4`vZLL8rmlsB((Lx-vK$4{VSS*(3^ZCq?NCaduSxmtQQq5Z5!qWUcMwK=M zVfACU#d%;ON%*7Qn#V zJM1&%4)N!?C0lHr9ZeuhdZbYw^c*`4&pUhJD+1CsbIsT7f?Z<wJT_v@ei_)JIN3l`~b zr^mz4fB17a!u#Md_62BHZa=$!q*yFg8^H($tQ=N_UI9#$fmkF4L989J4*%P-x0juY zopMbmKq^e#7+(CXb%6e=H5(rwD)=L3xWwv&%m)7SK5W#4%UfFa7tQA(2PYc18Ahd`rJ=+r7mg0E- zgbFDIsXV!3zqN2d-fvKVYCa*U+)6F@Ra%hLD$vOpurY~{dVKuQiI$c(-v3@jeO+DM z^3KlAr#v3dAWn}?Q8twrwbhF1cS_l|~ebm%s2 z+}Lk2nf}n--TnKTni>J;vah_?c+fKr&j-e1DFEJL2Tz6#!e$FRVo*USDZ!vO1V-Ks zbNxJUy(fFxf46%brh{uZpJMQqlKSjPC3I8%a#;Q*1I&{e(3tRwksA~6dZHcL-<8|s ztFp7RUtYa>wY{pU>I&wV1I_;$>g6T>HJOc4nJ1`atJY!V=kKf*>?g*s2hrz;+ zfOXUj>3-L~#yvmXhHKJCF+-ur27*)2#^lBcSPD2Yl2(SMK{FwgL#x&9D0t$za>blt z_2dF^MH-BntuTh>Gnyc&!N5jZWiSAyQ69_)WAKiFD(F6WbnmN=<2*_qcLbW+L5fkC z{syU-LrX`qe(U>n9~pAK=9ru);kgvj>cDR>K|rU6s8R(C0;wZm;QU@N_{KmP8Hd>D z)$=X&ub1IG`qb|UX!^M6&jhSr_TrnL>*kgePwf<0HWl1qwHD%ObQq#Su?T2`K~P5N zD3ri^$=P-0(B2As2+bA{t)uz+`pu2DMQheF2r<1RWpW@mDzan}SdsE5N}f!>NM}oP zSM$MVXHy|sTea}<4X<$pOX~Dl`7?=bqcO#kZ|Fk8cd6^u-nPa+;t-0@S#cRHB3G#l zb8?nGaV&e$Du;?Q-_6Z1?)Sh@*FT*XTN^5IFpqXawkhR)eqmGj%kC&!smsiN-(FN^ z)|xZ%e{1HFk|aW4#0A$cI7h?0>xFAyb^POY?jo-H0ZN4jn$ccd{2;jxjOBi(0OagO(P>dXcZtwFiVsMcBM+aD|c5oY$4 z$#^tV6cY-TmB-k$wEsXd(K>XlZC^Ydro)tA?)aa6zY0xypZ;?w(;LzBXp}%nJ=&OZ z4P|=zC#U-vaWh*nbZa!;a6f^OVgy6abf^%(&0^Lo@ c2Tq~?0{y@Ib`j-r=Kufz07*qoM6N<$g6V(J!2kdN literal 0 HcmV?d00001 diff --git a/Basic/Switch/res/drawable-mdpi/ic_launcher.png b/Basic/Switch/res/drawable-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..2bb6cb5d3cbc0fa500ede26f873cb6fbbf5b0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_B=vZ{kU)nr)&ucAqzF_ML+N)(rLax)a^$uN(NF(hL@t(DC?Yj@YbyerL+30 zl=eZe1A>E8LQ-|FifWl{nw64}%2EIjCByESy=RK($=aA>ds;oIrt11CJ9+k0RciZm zqE$v;G1vFEzcV*o)x>UTUN + \ No newline at end of file diff --git a/Basic/Switch/res/values/strings.xml b/Basic/Switch/res/values/strings.xml new file mode 100644 index 000000000..b4e859daa --- /dev/null +++ b/Basic/Switch/res/values/strings.xml @@ -0,0 +1,4 @@ + + + Switch Demo + \ No newline at end of file diff --git a/Basic/Switch/src/com/commonsware/android/swytch/SwitchDemo.java b/Basic/Switch/src/com/commonsware/android/swytch/SwitchDemo.java new file mode 100644 index 000000000..b29868905 --- /dev/null +++ b/Basic/Switch/src/com/commonsware/android/swytch/SwitchDemo.java @@ -0,0 +1,26 @@ +/*** + Copyright (c) 2008-2014 CommonsWare, LLC + 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 distributed under the + License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS + OF ANY KIND, either express or implied. See the License for the specific + language governing permissions and limitations under the License. + + From _The Busy Coder's Guide to Android Development_ + http://commonsware.com/Android +*/ + +package com.commonsware.android.swytch; + +import android.app.Activity; +import android.os.Bundle; + +public class SwitchDemo extends Activity { + @Override + public void onCreate(Bundle icicle) { + super.onCreate(icicle); + setContentView(R.layout.main); + } +}