diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ea3dfb --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SwitchCompatLibrary/SwitchCompatLibrary.iml +SwitchCompatLibrary/build \ No newline at end of file diff --git a/SwitchCompatLibrary/SwitchCompatLibrary.iml b/SwitchCompatLibrary/SwitchCompatLibrary.iml new file mode 100644 index 0000000..95b876d --- /dev/null +++ b/SwitchCompatLibrary/SwitchCompatLibrary.iml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SwitchCompatLibrary/build.gradle b/SwitchCompatLibrary/build.gradle new file mode 100644 index 0000000..1e5a6fc --- /dev/null +++ b/SwitchCompatLibrary/build.gradle @@ -0,0 +1,37 @@ +buildscript { + repositories { + mavenCentral() + } +} +apply plugin: 'android-library' + +dependencies { + +} + +android { + compileSdkVersion project.hasProperty("android_build_compileSdkVersion")?Integer.parseInt(project.android_build_compileSdkVersion):19 + buildToolsVersion project.hasProperty("android_build_buildToolsVersion")?project.android_build_buildToolsVersion:'19.0.1' + + defaultConfig { + minSdkVersion project.hasProperty("android_build_minSdkVersion")?Integer.parseInt(project.android_build_minSdkVersion):8 + targetSdkVersion project.hasProperty("android_build_targetSdkVersion")?Integer.parseInt(project.android_build_targetSdkVersion):19 + } + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['src'] + resources.srcDirs = ['src'] + aidl.srcDirs = ['src'] + renderscript.srcDirs = ['src'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + } + + instrumentTest.setRoot('tests') + } + + lintOptions { + abortOnError false + } +} diff --git a/SwitchCompatLibrary/build/tmp/packageReleaseJar/MANIFEST.MF b/SwitchCompatLibrary/build/tmp/packageReleaseJar/MANIFEST.MF new file mode 100644 index 0000000..58630c0 --- /dev/null +++ b/SwitchCompatLibrary/build/tmp/packageReleaseJar/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/SwitchCompatLibrary/res/values/attrs.xml b/SwitchCompatLibrary/res/values/attrs.xml index 737f964..3bd51a1 100644 --- a/SwitchCompatLibrary/res/values/attrs.xml +++ b/SwitchCompatLibrary/res/values/attrs.xml @@ -17,7 +17,7 @@ - + diff --git a/SwitchCompatLibrary/src/de/ankri/views/Switch.java b/SwitchCompatLibrary/src/de/ankri/views/Switch.java index 9e1e6a1..d377c1e 100644 --- a/SwitchCompatLibrary/src/de/ankri/views/Switch.java +++ b/SwitchCompatLibrary/src/de/ankri/views/Switch.java @@ -209,7 +209,7 @@ public void setSwitchTextAppearance(Context context, int resid) int typefaceIndex, styleIndex; - typefaceIndex = appearance.getInt(R.styleable.TextAppearanceSwitch_typeface, -1); + typefaceIndex = appearance.getInt(R.styleable.TextAppearanceSwitch_switchTypeface, -1); styleIndex = appearance.getInt(R.styleable.TextAppearanceSwitch_textStyle, -1); setSwitchTypefaceByIndex(typefaceIndex, styleIndex);