diff --git a/OsmAnd/build.gradle b/OsmAnd/build.gradle index 89803badfc..95764a31f2 100644 --- a/OsmAnd/build.gradle +++ b/OsmAnd/build.gradle @@ -296,6 +296,7 @@ repositories { artifact "ivy/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" } } + // mavenCentral() } dependencies { @@ -309,6 +310,7 @@ dependencies { "android-support*.jar", "OsmAndCore_android.jar", "OsmAndCore_wrapper.jar"]) + compile "com.github.ksoichiro:android-observablescrollview:1.5.0" compile "com.android.support:appcompat-v7:21.0.3" compile "com.github.shell-software:fab:1.0.5" legacyCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@jar" diff --git a/OsmAnd/build.gradle~ b/OsmAnd/build.gradle~ deleted file mode 100644 index 7175168a22..0000000000 --- a/OsmAnd/build.gradle~ +++ /dev/null @@ -1,318 +0,0 @@ -apply plugin: 'com.android.application' - -// Global Paramers accepted -// APK_NUMBER_VERSION - version number of apk -// APK_VERSION - build number like #9999Z, for dev builds appended to app_version like 2.0.0 in no_translate.xml) -// flavor Z : M=-master, D=-design, B=-Blackberry, MD=-main-default, MQA=-main-qt-arm, MQDA=-main-qt-default-arm, S=-sherpafy -// TARGET_APP_NAME - app name -// APP_EDITION - date stamp of builds -// APP_FEATURES - features +play_market +gps_status -parking_plugin -blackberry -free_version -amazon - -// TODO -// 1. Filter fonts -// -// -// -// -// -// -// Less important -// 2. fix_apostrophe_issues (replace match="[^=]([^\\])'" replace="\1\\\\'") res/**/strings.xml -// 3. sherpafy/free/paid -// 4. Release signature -// 5. TARGET_APP_NAME, APP_EDITION uses flavor - -android { - compileSdkVersion 21 - buildToolsVersion "21.1.2" - - signingConfigs { - development { - storeFile file("../keystores/debug.keystore") - storePassword "android" - keyAlias "androiddebugkey" - keyPassword "android" - } - - publishing { - storeFile file("osmand_key") - storePassword System.getenv("OSMAND_APK_PASSWORD") - keyAlias "androiddebugkey" - keyPassword System.getenv("OSMAND_APK_PASSWORD") - } - } - - defaultConfig { - minSdkVersion 9 - targetSdkVersion 21 - - versionCode System.getenv("APK_NUMBER_VERSION") ? System.getenv("APK_NUMBER_VERSION").toInteger() : versionCode - //versionName already assigned in code - //versionName System.getenv("APK_VERSION")? System.getenv("APK_VERSION").toString(): versionName - } - - lintOptions { - lintConfig file("lint.xml") - abortOnError false - warningsAsErrors false - } - - // This is from OsmAndCore_android.aar - for some reason it's not inherited - aaptOptions { - // Don't compress any embedded resources - noCompress "qz" - } - - dexOptions { - jumboMode = true - } - - sourceSets { - main { - manifest.srcFile "AndroidManifest.xml" - jni.srcDirs = [] - jniLibs.srcDirs = ["libs"] - aidl.srcDirs = ["src"] - java.srcDirs = ["src"] - resources.srcDirs = ["src"] - renderscript.srcDirs = ["src"] - res.srcDirs = ["res"] - assets.srcDirs = ["assets"] - } - free { - manifest.srcFile "AndroidManifest-free.xml" - } - - legacy { - jniLibs.srcDirs = ["libgnustl"] - } - } - - flavorDimensions "version", "coreversion", "abi" - productFlavors { - // ABI - armv7 { - flavorDimension "abi" - ndk { - abiFilter "armeabi-v7a" - } - } - armv5 { - flavorDimension "abi" - ndk { - abiFilter "armeabi" - } - } - x86 { - flavorDimension "abi" - ndk { - abiFilter "x86" - } - } - mips { - flavorDimension "abi" - ndk { - abiFilter "mips" - } - } - fat { - flavorDimension "abi" - } - - // Version - free { - flavorDimension "version" - applicationId "net.osmand" - } - full { - flavorDimension "version" - applicationId "net.osmand.plus" - } - - // CoreVersion - legacy { - flavorDimension "coreversion" - } - - qtcore { - flavorDimension "coreversion" - } - - qtcoredebug { - flavorDimension "coreversion" - } - } - - buildTypes { - debug { - signingConfig signingConfigs.development - } - release { - signingConfig signingConfigs.publishing - } - } -} - -def replaceNoTranslate(line) { - if (line.contains("\"app_name\"") && System.getenv("TARGET_APP_NAME")) { - return line.replaceAll(">[^<]*<", ">" + System.getenv("TARGET_APP_NAME") + "<") - } - if (line.contains("\"app_edition\"") && System.getenv("APP_EDITION")) { - return line.replaceAll(">[^<]*<", ">" + System.getenv("APP_EDITION") + "<") - } - if (line.contains("\"app_version\"") && System.getenv("APK_VERSION")) { - // appends build number to version number for dev builds - return line.replaceAll("[^<]*<", ">" + System.getenv("APP_FEATURES") + "<") - } - return line; -} - -task updateNoTranslate(type: Copy) { - inputs.property 'appName', System.getenv().get("APP_NAME") - inputs.property 'appEdition', System.getenv().get("APP_EDITION") - inputs.property 'appFeatures', System.getenv().get("APP_FEATURES") - inputs.property 'apkVersion', System.getenv().get("APK_VERSION") - from('.') { - include 'no_translate.xml' - filter { - line -> replaceNoTranslate(line); - } - } - into 'res/values/' -} - -task collectVoiceAssets(type: Sync) { - from "../../resources/voice" - into "assets/voice" - include "**/*.p" -} - -task collectSpecialPhrasesAssets(type: Sync) { - from "../../resources/specialphrases" - into "assets/specialphrases" - include "*.txt" -} - -task collectHelpContentsAssets(type: Sync) { - from "../../help" - into "assets/help" - include "*.html" - include "images/**/*.png" - - from "assets/" - into "assets/help" - include "style.css" -} - -task collectRoutingResources(type: Sync) { - from "../../resources/routing" - into "src/net/osmand/router" - include "*.xml" -} - -task collectMiscResources(type: Copy) { - into "src/net/osmand/osm" - from("../../resources/obf_creation") { - include "rendering_types.xml" - } - from("../../resources/poi") { - include "poi_types.xml" - } -} - -task collectRenderingStylesResources(type: Sync) { - from "../../resources/rendering_styles" - into "src/net/osmand/render" - include "*.xml" -} - -task collectRegionsInfoResources(type: Copy) { - from "../../resources/countries-info" - into "src/net/osmand/map" - include "regions.ocbf" -} - -task copyStyleIcons(type: Copy) { - from "../../resources/rendering_styles/style-icons/" - into "res/" - include "**/*.png" -} - -task collectExternalResources << {} -collectExternalResources.dependsOn collectVoiceAssets, - collectSpecialPhrasesAssets, - collectHelpContentsAssets, - collectRoutingResources, - collectRenderingStylesResources, - collectRegionsInfoResources, - collectMiscResources, - copyStyleIcons, - updateNoTranslate -tasks.whenTaskAdded { task -> - if (task.name.startsWith("generate") && task.name.endsWith("Resources")) { - task.dependsOn collectExternalResources - } -} - -// Legacy core build -import org.apache.tools.ant.taskdefs.condition.Os - -task buildOsmAndCore(type: Exec) { - description "Build Legacy OsmAndCore" - - if (!Os.isFamily(Os.FAMILY_WINDOWS)) { - commandLine "bash", file("./old-ndk-build.sh").getAbsolutePath() - } else { - commandLine "cmd", "/c", "echo", "Not supported" - } -} - -task cleanupDuplicatesInCore() { - dependsOn buildOsmAndCore - // doesn't work for legacy debug builds - doLast { - file("libgnustl/armeabi").mkdirs() - println file("libs/armeabi/libgnustl_shared.so").renameTo(file("libgnustl/armeabi/libgnustl_shared.so")) - file("libgnustl/armeabi-v7a").mkdirs() - println file("libs/armeabi-v7a/libgnustl_shared.so").renameTo(file("libgnustl/armeabi-v7a/libgnustl_shared.so")) - file("libgnustl/mips").mkdirs() - println file("libs/mips/libgnustl_shared.so").renameTo(file("libgnustl/mips/libgnustl_shared.so")) - file("libgnustl/x86").mkdirs() - println file("libs/x86/libgnustl_shared.so").renameTo(file("libgnustl/x86/libgnustl_shared.so")) - } -} -tasks.withType(JavaCompile) { - compileTask -> compileTask.dependsOn << [buildOsmAndCore, cleanupDuplicatesInCore] -} - -repositories { - ivy { - name = "OsmAndBinariesIvy" - url = "http://builder.osmand.net" - layout "pattern", { - artifact "ivy/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" - } - } -} - -dependencies { - compile project(path: ":OsmAnd-java", configuration: "android") - compile fileTree( - dir: "libs", - include: ["*.jar"], - exclude: [ - "QtAndroid-bundled.jar", - "QtAndroidAccessibility-bundled.jar", - "android-support*.jar", - "OsmAndCore_android.jar", - "OsmAndCore_wrapper.jar"]) - compile "com.android.support:appcompat-v7:21.0.3" - legacyCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@jar" - qtcoredebugCompile "net.osmand:OsmAndCore_androidNativeDebug:0.1-SNAPSHOT@aar" - qtcoredebugCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar" - qtcoreCompile "net.osmand:OsmAndCore_androidNativeRelease:0.1-SNAPSHOT@aar" - qtcoreCompile "net.osmand:OsmAndCore_android:0.1-SNAPSHOT@aar" -} diff --git a/OsmAnd/project.properties b/OsmAnd/project.properties index a19f136385..74d1d1c29b 100644 --- a/OsmAnd/project.properties +++ b/OsmAnd/project.properties @@ -12,5 +12,7 @@ split.density=false # Project target. target=android-21 dex.force.jumbo=true -android.library.reference.1=../appcompat -android.library.reference.2=../eclipse-compile/fab +android.library.reference.1=../eclipse-compile/appcompat +android.library.reference.2=../eclipse-compile/observable +android.library.reference.2=../eclipse-compile/observable +android.library.reference.3=../eclipse-compile/fab diff --git a/OsmAnd/res/layout-land/dashboard_over_map.xml b/OsmAnd/res/layout-land/dashboard_over_map.xml index 3d1f617375..c124e40d86 100644 --- a/OsmAnd/res/layout-land/dashboard_over_map.xml +++ b/OsmAnd/res/layout-land/dashboard_over_map.xml @@ -35,7 +35,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" /> - @@ -46,13 +45,13 @@ android:layout_gravity="start" android:visibility="gone" > - - + - + android:layout_height="match_parent" > - + + - + + + - + \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index b7e6a23c4a..c4cf84a0fd 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -814,7 +814,7 @@ public class MapActivityActions implements DialogProvider { //////////// Others OsmandPlugin.registerOptionsMenu(mapActivity, optionsMenuHelper); - optionsMenuHelper.item(R.string.shared_string_exit).icon(R.drawable.ic_action_quit_dark ) + optionsMenuHelper.item(R.string.shared_string_exit).iconColor(R.drawable.ic_action_quit_dark ) .listen(new OnContextMenuClick() { @Override public boolean onContextMenuClick(ArrayAdapter adapter, int itemId, int pos, boolean isChecked) { diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index 3b2c15c7f4..101118633a 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -1,7 +1,5 @@ package net.osmand.plus.dashboard; -import gnu.trove.map.hash.TIntObjectHashMap; - import java.lang.ref.WeakReference; import java.util.Iterator; import java.util.LinkedList; @@ -20,16 +18,18 @@ import net.osmand.plus.download.DownloadActivity; import net.osmand.plus.helpers.ScreenOrientationHelper; import net.osmand.plus.monitoring.DashTrackFragment; import net.osmand.plus.osmedit.DashOsmEditsFragment; -import net.osmand.plus.osmo.DashOsmoFragment; import net.osmand.plus.parkingpoint.DashParkingFragment; import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.views.DownloadedRegionsLayer; import net.osmand.plus.views.OsmandMapTileView; +import android.annotation.SuppressLint; import android.content.Context; import android.content.Intent; +import android.os.Build; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; +import android.support.v7.widget.Toolbar; import android.util.DisplayMetrics; import android.view.Gravity; import android.view.View; @@ -38,7 +38,7 @@ import android.view.animation.Animation; import android.view.animation.Animation.AnimationListener; import android.view.animation.TranslateAnimation; import android.widget.AbsListView; -import android.widget.AbsListView.OnScrollListener; +import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.Button; @@ -47,13 +47,16 @@ import android.widget.ImageView; import android.widget.ListView; import android.widget.ScrollView; +import com.github.ksoichiro.android.observablescrollview.ObservableListView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollState; import com.software.shell.fab.ActionButton; /** * Created by Denis * on 03.03.15. */ -public class DashboardOnMap { +public class DashboardOnMap implements ObservableScrollViewCallbacks { public static boolean staticVisible = false; private MapActivity mapActivity; @@ -77,6 +80,8 @@ public class DashboardOnMap { private NotifyingScrollView scrollView; private View listViewLayout; private ListView listView; + private View listBackgroundView; + private int mFlexibleSpaceImageHeight; public DashboardOnMap(MapActivity ma) { @@ -100,7 +105,34 @@ public class DashboardOnMap { scrollView = ((NotifyingScrollView) dashboardView.findViewById(R.id.main_scroll)); listViewLayout = dashboardView.findViewById(R.id.dash_list_view_layout); listView = (ListView) dashboardView.findViewById(R.id.dash_list_view); -// dashboardView.setOnClickListener(listener); + if (listView instanceof ObservableListView) { + ((ObservableListView) listView).setScrollViewCallbacks(this); + mFlexibleSpaceImageHeight = mapActivity.getResources().getDimensionPixelSize( + R.dimen.dashboard_map_top_padding); + // Set padding view for ListView. This is the flexible space. + View paddingView = new View(mapActivity); + AbsListView.LayoutParams lp = new AbsListView.LayoutParams(AbsListView.LayoutParams.MATCH_PARENT, + mFlexibleSpaceImageHeight); + paddingView.setLayoutParams(lp); + // This is required to disable header's list selector effect + paddingView.setClickable(true); + paddingView.setOnClickListener(listener); + listView.addHeaderView(paddingView); + + Toolbar tb = (Toolbar) mapActivity.findViewById(R.id.dash_toolbar); + tb.setLogo(R.drawable.icon); + listBackgroundView = mapActivity.findViewById(R.id.dash_list_background); + final View contentView = mapActivity.getWindow().getDecorView().findViewById(android.R.id.content); + contentView.post(new Runnable() { + @Override + public void run() { + // mListBackgroundView's should fill its parent vertically + // but the height of the content view is 0 on 'onCreate'. + // So we should get it with post(). + listBackgroundView.getLayoutParams().height = contentView.getHeight(); + } + }); + } dashboardView.findViewById(R.id.animateContent).setOnClickListener(listener); dashboardView.findViewById(R.id.map_part_dashboard).setOnClickListener(listener); @@ -127,42 +159,6 @@ public class DashboardOnMap { } }); dashboardView.addView(actionButton); - - - if (ScreenOrientationHelper.isOrientationPortrait(mapActivity)) { - scrollView.setOnScrollChangedListener(onScrollChangedListener); - listView.setOnScrollListener(new OnScrollListener() { - - private TIntObjectHashMap listViewItemHeights = new TIntObjectHashMap(); - - @Override - public void onScrollStateChanged(AbsListView view, int scrollState) { - } - - @Override - public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { -// if(listView.getChildCount() == 0) { -// return; -// } -// View c = listView.getChildAt(0); -// int sy = -c.getTop(); -// listViewItemHeights.put(listView.getFirstVisiblePosition(), c.getHeight()); -// for (int i = 0; i < listView.getFirstVisiblePosition(); ++i) { -// if (listViewItemHeights.get(i) != null) // (this is a sanity check) -// sy += listViewItemHeights.get(i); //add all heights of the views that are gone -// } -// double scale = view.getContext().getResources().getDisplayMetrics().density; -// MarginLayoutParams lp = (MarginLayoutParams) actionButton.getLayoutParams(); -// lp.topMargin = (int) Math.max(30 * scale, 160 * scale - sy); -// ((FrameLayout) actionButton.getParent()).updateViewLayout(actionButton, lp); -// MarginLayoutParams llp = (MarginLayoutParams) listView.getLayoutParams(); -// llp.topMargin = (int) Math.max(5 * scale, 160 * scale - sy); -// listView.setLayoutParams(llp); -// listView.getParent().requestLayout(); - } - }); - } - } private void switchBtnAction() { @@ -210,7 +206,7 @@ public class DashboardOnMap { return listAdapterOnClickListener; } - public void setListAdapter(ArrayAdapter listAdapter, OnItemClickListener optionsMenuOnClickListener) { + public void setListAdapter(ArrayAdapter listAdapter, final OnItemClickListener optionsMenuOnClickListener) { if(!isVisible()) { mapActivity.getMyApplication().getSettings().USE_DASHBOARD_INSTEAD_OF_DRAWER.set(false); } @@ -218,7 +214,19 @@ public class DashboardOnMap { this.listAdapterOnClickListener = optionsMenuOnClickListener; if(this.listView != null) { listView.setAdapter(listAdapter); - listView.setOnItemClickListener(optionsMenuOnClickListener); + if(listBackgroundView == null) { + listView.setOnItemClickListener(optionsMenuOnClickListener); + } else if (optionsMenuOnClickListener != null) { + listView.setOnItemClickListener(new OnItemClickListener() { + + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) { + optionsMenuOnClickListener.onItemClick(parent, view, position - 1, id); + } + }); + } else { + listView.setOnItemClickListener(null); + } } setDashboardVisibility(true); } @@ -533,5 +541,45 @@ public class DashboardOnMap { } + @Override + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { + // Translate list background + setTranslationY(listBackgroundView, Math.max(0, -scrollY + mFlexibleSpaceImageHeight)); + } + + + @SuppressLint("NewApi") + private void setTranslationY(View v, int y) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { + v.setTranslationY(y); + } else { + TranslateAnimation anim = new TranslateAnimation(0, 0, y, y); + anim.setFillAfter(true); + anim.setDuration(0); + v.startAnimation(anim); + } + } + + + @Override + public void onDownMotionEvent() { + } + + + @Override + public void onUpOrCancelMotionEvent(ScrollState scrollState) { +// ActionBar ab = getSupportActionBar(); +// if (scrollState == ScrollState.UP) { +// if (ab.isShowing()) { +// ab.hide(); +// } +// } else if (scrollState == ScrollState.DOWN) { +// if (!ab.isShowing()) { +// ab.show(); +// } +// } + } + + } diff --git a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java index bfaf38867e..cc43d4e1d0 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java @@ -995,12 +995,8 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { final OsmEditingPlugin osmEditingPlugin = OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class); if (osmEditingPlugin != null && osmEditingPlugin.isActive()) { - Drawable exportIcon = getResources().getDrawable(R.drawable.ic_action_export); - if (light) { - exportIcon = exportIcon.mutate(); - exportIcon.setColorFilter(getResources().getColor(R.color.icon_color_light), PorterDuff.Mode.MULTIPLY); - } - item = optionsMenu.getMenu().add(R.string.shared_string_export).setIcon(exportIcon); + item = optionsMenu.getMenu().add(R.string.shared_string_export).setIcon(getMyApplication().getIconsCache().getActionBarIcon( + R.drawable.ic_action_export, light)); item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { @Override public boolean onMenuItemClick(MenuItem item) { diff --git a/appcompat/.classpath b/eclipse-compile/appcompat/.classpath similarity index 100% rename from appcompat/.classpath rename to eclipse-compile/appcompat/.classpath diff --git a/appcompat/.gitignore b/eclipse-compile/appcompat/.gitignore similarity index 100% rename from appcompat/.gitignore rename to eclipse-compile/appcompat/.gitignore diff --git a/appcompat/.project b/eclipse-compile/appcompat/.project similarity index 100% rename from appcompat/.project rename to eclipse-compile/appcompat/.project diff --git a/appcompat/AndroidManifest.xml b/eclipse-compile/appcompat/AndroidManifest.xml similarity index 100% rename from appcompat/AndroidManifest.xml rename to eclipse-compile/appcompat/AndroidManifest.xml diff --git a/appcompat/README.txt b/eclipse-compile/appcompat/README.txt similarity index 100% rename from appcompat/README.txt rename to eclipse-compile/appcompat/README.txt diff --git a/appcompat/build.xml b/eclipse-compile/appcompat/build.xml similarity index 100% rename from appcompat/build.xml rename to eclipse-compile/appcompat/build.xml diff --git a/appcompat/libs/android-support-v4.jar b/eclipse-compile/appcompat/libs/android-support-v4.jar similarity index 100% rename from appcompat/libs/android-support-v4.jar rename to eclipse-compile/appcompat/libs/android-support-v4.jar diff --git a/appcompat/libs/android-support-v7-appcompat.jar b/eclipse-compile/appcompat/libs/android-support-v7-appcompat.jar similarity index 100% rename from appcompat/libs/android-support-v7-appcompat.jar rename to eclipse-compile/appcompat/libs/android-support-v7-appcompat.jar diff --git a/appcompat/local.properties b/eclipse-compile/appcompat/local.properties similarity index 100% rename from appcompat/local.properties rename to eclipse-compile/appcompat/local.properties diff --git a/appcompat/proguard-project.txt b/eclipse-compile/appcompat/proguard-project.txt similarity index 100% rename from appcompat/proguard-project.txt rename to eclipse-compile/appcompat/proguard-project.txt diff --git a/appcompat/project.properties b/eclipse-compile/appcompat/project.properties similarity index 100% rename from appcompat/project.properties rename to eclipse-compile/appcompat/project.properties diff --git a/appcompat/res/anim/abc_fade_in.xml b/eclipse-compile/appcompat/res/anim/abc_fade_in.xml similarity index 100% rename from appcompat/res/anim/abc_fade_in.xml rename to eclipse-compile/appcompat/res/anim/abc_fade_in.xml diff --git a/appcompat/res/anim/abc_fade_out.xml b/eclipse-compile/appcompat/res/anim/abc_fade_out.xml similarity index 100% rename from appcompat/res/anim/abc_fade_out.xml rename to eclipse-compile/appcompat/res/anim/abc_fade_out.xml diff --git a/appcompat/res/anim/abc_slide_in_bottom.xml b/eclipse-compile/appcompat/res/anim/abc_slide_in_bottom.xml similarity index 100% rename from appcompat/res/anim/abc_slide_in_bottom.xml rename to eclipse-compile/appcompat/res/anim/abc_slide_in_bottom.xml diff --git a/appcompat/res/anim/abc_slide_in_top.xml b/eclipse-compile/appcompat/res/anim/abc_slide_in_top.xml similarity index 100% rename from appcompat/res/anim/abc_slide_in_top.xml rename to eclipse-compile/appcompat/res/anim/abc_slide_in_top.xml diff --git a/appcompat/res/anim/abc_slide_out_bottom.xml b/eclipse-compile/appcompat/res/anim/abc_slide_out_bottom.xml similarity index 100% rename from appcompat/res/anim/abc_slide_out_bottom.xml rename to eclipse-compile/appcompat/res/anim/abc_slide_out_bottom.xml diff --git a/appcompat/res/anim/abc_slide_out_top.xml b/eclipse-compile/appcompat/res/anim/abc_slide_out_top.xml similarity index 100% rename from appcompat/res/anim/abc_slide_out_top.xml rename to eclipse-compile/appcompat/res/anim/abc_slide_out_top.xml diff --git a/appcompat/res/color/abc_background_cache_hint_selector_material_dark.xml b/eclipse-compile/appcompat/res/color/abc_background_cache_hint_selector_material_dark.xml similarity index 100% rename from appcompat/res/color/abc_background_cache_hint_selector_material_dark.xml rename to eclipse-compile/appcompat/res/color/abc_background_cache_hint_selector_material_dark.xml diff --git a/appcompat/res/color/abc_background_cache_hint_selector_material_light.xml b/eclipse-compile/appcompat/res/color/abc_background_cache_hint_selector_material_light.xml similarity index 100% rename from appcompat/res/color/abc_background_cache_hint_selector_material_light.xml rename to eclipse-compile/appcompat/res/color/abc_background_cache_hint_selector_material_light.xml diff --git a/appcompat/res/color/abc_primary_text_disable_only_material_dark.xml b/eclipse-compile/appcompat/res/color/abc_primary_text_disable_only_material_dark.xml similarity index 100% rename from appcompat/res/color/abc_primary_text_disable_only_material_dark.xml rename to eclipse-compile/appcompat/res/color/abc_primary_text_disable_only_material_dark.xml diff --git a/appcompat/res/color/abc_primary_text_disable_only_material_light.xml b/eclipse-compile/appcompat/res/color/abc_primary_text_disable_only_material_light.xml similarity index 100% rename from appcompat/res/color/abc_primary_text_disable_only_material_light.xml rename to eclipse-compile/appcompat/res/color/abc_primary_text_disable_only_material_light.xml diff --git a/appcompat/res/color/abc_primary_text_material_dark.xml b/eclipse-compile/appcompat/res/color/abc_primary_text_material_dark.xml similarity index 100% rename from appcompat/res/color/abc_primary_text_material_dark.xml rename to eclipse-compile/appcompat/res/color/abc_primary_text_material_dark.xml diff --git a/appcompat/res/color/abc_primary_text_material_light.xml b/eclipse-compile/appcompat/res/color/abc_primary_text_material_light.xml similarity index 100% rename from appcompat/res/color/abc_primary_text_material_light.xml rename to eclipse-compile/appcompat/res/color/abc_primary_text_material_light.xml diff --git a/appcompat/res/color/abc_search_url_text.xml b/eclipse-compile/appcompat/res/color/abc_search_url_text.xml similarity index 100% rename from appcompat/res/color/abc_search_url_text.xml rename to eclipse-compile/appcompat/res/color/abc_search_url_text.xml diff --git a/appcompat/res/color/abc_secondary_text_material_dark.xml b/eclipse-compile/appcompat/res/color/abc_secondary_text_material_dark.xml similarity index 100% rename from appcompat/res/color/abc_secondary_text_material_dark.xml rename to eclipse-compile/appcompat/res/color/abc_secondary_text_material_dark.xml diff --git a/appcompat/res/color/abc_secondary_text_material_light.xml b/eclipse-compile/appcompat/res/color/abc_secondary_text_material_light.xml similarity index 100% rename from appcompat/res/color/abc_secondary_text_material_light.xml rename to eclipse-compile/appcompat/res/color/abc_secondary_text_material_light.xml diff --git a/appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_dark.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_dark.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_dark.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_dark.9.png diff --git a/appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_light.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_light.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_light.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ab_share_pack_holo_light.9.png diff --git a/appcompat/res/drawable-hdpi/abc_btn_check_to_on_mtrl_000.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_btn_check_to_on_mtrl_000.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_btn_check_to_on_mtrl_000.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_btn_check_to_on_mtrl_000.png diff --git a/appcompat/res/drawable-hdpi/abc_btn_check_to_on_mtrl_015.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_btn_check_to_on_mtrl_015.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_btn_check_to_on_mtrl_015.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_btn_check_to_on_mtrl_015.png diff --git a/appcompat/res/drawable-hdpi/abc_btn_radio_to_on_mtrl_000.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_btn_radio_to_on_mtrl_000.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_btn_radio_to_on_mtrl_000.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_btn_radio_to_on_mtrl_000.png diff --git a/appcompat/res/drawable-hdpi/abc_btn_radio_to_on_mtrl_015.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_btn_radio_to_on_mtrl_015.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_btn_radio_to_on_mtrl_015.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_btn_radio_to_on_mtrl_015.png diff --git a/appcompat/res/drawable-hdpi/abc_btn_switch_to_on_mtrl_00001.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_btn_switch_to_on_mtrl_00001.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_btn_switch_to_on_mtrl_00001.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_btn_switch_to_on_mtrl_00001.9.png diff --git a/appcompat/res/drawable-hdpi/abc_btn_switch_to_on_mtrl_00012.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_btn_switch_to_on_mtrl_00012.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_btn_switch_to_on_mtrl_00012.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_btn_switch_to_on_mtrl_00012.9.png diff --git a/appcompat/res/drawable-hdpi/abc_cab_background_top_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_cab_background_top_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_cab_background_top_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_cab_background_top_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-hdpi/abc_ic_ab_back_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_ab_back_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ic_ab_back_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_ab_back_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-hdpi/abc_ic_clear_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_clear_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ic_clear_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_clear_mtrl_alpha.png diff --git a/appcompat/res/drawable-hdpi/abc_ic_commit_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_commit_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ic_commit_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_commit_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-hdpi/abc_ic_go_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_go_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ic_go_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_go_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-hdpi/abc_ic_menu_copy_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_menu_copy_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ic_menu_copy_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_menu_copy_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-hdpi/abc_ic_menu_cut_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_menu_cut_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ic_menu_cut_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_menu_cut_mtrl_alpha.png diff --git a/appcompat/res/drawable-hdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png diff --git a/appcompat/res/drawable-hdpi/abc_ic_menu_paste_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_menu_paste_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ic_menu_paste_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_menu_paste_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-hdpi/abc_ic_menu_selectall_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_menu_selectall_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ic_menu_selectall_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_menu_selectall_mtrl_alpha.png diff --git a/appcompat/res/drawable-hdpi/abc_ic_menu_share_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_menu_share_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ic_menu_share_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_menu_share_mtrl_alpha.png diff --git a/appcompat/res/drawable-hdpi/abc_ic_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ic_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-hdpi/abc_ic_voice_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_voice_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_ic_voice_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_ic_voice_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-hdpi/abc_list_divider_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_list_divider_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_list_divider_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_list_divider_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-hdpi/abc_list_focused_holo.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_list_focused_holo.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_list_focused_holo.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_list_focused_holo.9.png diff --git a/appcompat/res/drawable-hdpi/abc_list_longpressed_holo.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_list_longpressed_holo.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_list_longpressed_holo.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_list_longpressed_holo.9.png diff --git a/appcompat/res/drawable-hdpi/abc_list_pressed_holo_dark.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_list_pressed_holo_dark.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_list_pressed_holo_dark.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_list_pressed_holo_dark.9.png diff --git a/appcompat/res/drawable-hdpi/abc_list_pressed_holo_light.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_list_pressed_holo_light.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_list_pressed_holo_light.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_list_pressed_holo_light.9.png diff --git a/appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_dark.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_dark.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_dark.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_dark.9.png diff --git a/appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_light.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_light.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_light.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_list_selector_disabled_holo_light.9.png diff --git a/appcompat/res/drawable-hdpi/abc_menu_hardkey_panel_mtrl_mult.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_menu_hardkey_panel_mtrl_mult.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_menu_hardkey_panel_mtrl_mult.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_menu_hardkey_panel_mtrl_mult.9.png diff --git a/appcompat/res/drawable-hdpi/abc_popup_background_mtrl_mult.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_popup_background_mtrl_mult.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_popup_background_mtrl_mult.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_popup_background_mtrl_mult.9.png diff --git a/appcompat/res/drawable-hdpi/abc_spinner_mtrl_am_alpha.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_spinner_mtrl_am_alpha.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_spinner_mtrl_am_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_spinner_mtrl_am_alpha.9.png diff --git a/appcompat/res/drawable-hdpi/abc_switch_track_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_switch_track_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_switch_track_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_switch_track_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-hdpi/abc_tab_indicator_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_tab_indicator_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_tab_indicator_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_tab_indicator_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-hdpi/abc_textfield_activated_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_textfield_activated_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_textfield_activated_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_textfield_activated_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-hdpi/abc_textfield_default_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_textfield_default_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_textfield_default_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_textfield_default_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-hdpi/abc_textfield_search_activated_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_textfield_search_activated_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_textfield_search_activated_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_textfield_search_activated_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-hdpi/abc_textfield_search_default_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-hdpi/abc_textfield_search_default_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-hdpi/abc_textfield_search_default_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-hdpi/abc_textfield_search_default_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-ldrtl-hdpi/abc_ic_ab_back_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-hdpi/abc_ic_ab_back_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-hdpi/abc_ic_ab_back_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-hdpi/abc_ic_ab_back_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-ldrtl-hdpi/abc_ic_menu_copy_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-hdpi/abc_ic_menu_copy_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-hdpi/abc_ic_menu_copy_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-hdpi/abc_ic_menu_copy_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-ldrtl-hdpi/abc_ic_menu_cut_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-hdpi/abc_ic_menu_cut_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-hdpi/abc_ic_menu_cut_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-hdpi/abc_ic_menu_cut_mtrl_alpha.png diff --git a/appcompat/res/drawable-ldrtl-hdpi/abc_spinner_mtrl_am_alpha.9.png b/eclipse-compile/appcompat/res/drawable-ldrtl-hdpi/abc_spinner_mtrl_am_alpha.9.png similarity index 100% rename from appcompat/res/drawable-ldrtl-hdpi/abc_spinner_mtrl_am_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-hdpi/abc_spinner_mtrl_am_alpha.9.png diff --git a/appcompat/res/drawable-ldrtl-mdpi/abc_ic_ab_back_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-mdpi/abc_ic_ab_back_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-mdpi/abc_ic_ab_back_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-mdpi/abc_ic_ab_back_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-ldrtl-mdpi/abc_ic_menu_copy_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-mdpi/abc_ic_menu_copy_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-mdpi/abc_ic_menu_copy_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-mdpi/abc_ic_menu_copy_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-ldrtl-mdpi/abc_ic_menu_cut_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-mdpi/abc_ic_menu_cut_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-mdpi/abc_ic_menu_cut_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-mdpi/abc_ic_menu_cut_mtrl_alpha.png diff --git a/appcompat/res/drawable-ldrtl-mdpi/abc_spinner_mtrl_am_alpha.9.png b/eclipse-compile/appcompat/res/drawable-ldrtl-mdpi/abc_spinner_mtrl_am_alpha.9.png similarity index 100% rename from appcompat/res/drawable-ldrtl-mdpi/abc_spinner_mtrl_am_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-mdpi/abc_spinner_mtrl_am_alpha.9.png diff --git a/appcompat/res/drawable-ldrtl-xhdpi/abc_ic_ab_back_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-xhdpi/abc_ic_ab_back_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-xhdpi/abc_ic_ab_back_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-xhdpi/abc_ic_ab_back_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-ldrtl-xhdpi/abc_ic_menu_copy_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-xhdpi/abc_ic_menu_copy_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-xhdpi/abc_ic_menu_copy_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-xhdpi/abc_ic_menu_copy_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-ldrtl-xhdpi/abc_ic_menu_cut_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-xhdpi/abc_ic_menu_cut_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-xhdpi/abc_ic_menu_cut_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-xhdpi/abc_ic_menu_cut_mtrl_alpha.png diff --git a/appcompat/res/drawable-ldrtl-xhdpi/abc_spinner_mtrl_am_alpha.9.png b/eclipse-compile/appcompat/res/drawable-ldrtl-xhdpi/abc_spinner_mtrl_am_alpha.9.png similarity index 100% rename from appcompat/res/drawable-ldrtl-xhdpi/abc_spinner_mtrl_am_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-xhdpi/abc_spinner_mtrl_am_alpha.9.png diff --git a/appcompat/res/drawable-ldrtl-xxhdpi/abc_ic_ab_back_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-xxhdpi/abc_ic_ab_back_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-xxhdpi/abc_ic_ab_back_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-xxhdpi/abc_ic_ab_back_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-ldrtl-xxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-xxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-xxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-xxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-ldrtl-xxhdpi/abc_ic_menu_cut_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-xxhdpi/abc_ic_menu_cut_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-xxhdpi/abc_ic_menu_cut_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-xxhdpi/abc_ic_menu_cut_mtrl_alpha.png diff --git a/appcompat/res/drawable-ldrtl-xxhdpi/abc_spinner_mtrl_am_alpha.9.png b/eclipse-compile/appcompat/res/drawable-ldrtl-xxhdpi/abc_spinner_mtrl_am_alpha.9.png similarity index 100% rename from appcompat/res/drawable-ldrtl-xxhdpi/abc_spinner_mtrl_am_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-xxhdpi/abc_spinner_mtrl_am_alpha.9.png diff --git a/appcompat/res/drawable-ldrtl-xxxhdpi/abc_ic_ab_back_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-xxxhdpi/abc_ic_ab_back_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-xxxhdpi/abc_ic_ab_back_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-xxxhdpi/abc_ic_ab_back_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-ldrtl-xxxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-xxxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-xxxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-xxxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-ldrtl-xxxhdpi/abc_ic_menu_cut_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-ldrtl-xxxhdpi/abc_ic_menu_cut_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-ldrtl-xxxhdpi/abc_ic_menu_cut_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-xxxhdpi/abc_ic_menu_cut_mtrl_alpha.png diff --git a/appcompat/res/drawable-ldrtl-xxxhdpi/abc_spinner_mtrl_am_alpha.9.png b/eclipse-compile/appcompat/res/drawable-ldrtl-xxxhdpi/abc_spinner_mtrl_am_alpha.9.png similarity index 100% rename from appcompat/res/drawable-ldrtl-xxxhdpi/abc_spinner_mtrl_am_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-ldrtl-xxxhdpi/abc_spinner_mtrl_am_alpha.9.png diff --git a/appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_dark.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_dark.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_dark.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_dark.9.png diff --git a/appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_light.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_light.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_light.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ab_share_pack_holo_light.9.png diff --git a/appcompat/res/drawable-mdpi/abc_btn_check_to_on_mtrl_000.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_btn_check_to_on_mtrl_000.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_btn_check_to_on_mtrl_000.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_btn_check_to_on_mtrl_000.png diff --git a/appcompat/res/drawable-mdpi/abc_btn_check_to_on_mtrl_015.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_btn_check_to_on_mtrl_015.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_btn_check_to_on_mtrl_015.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_btn_check_to_on_mtrl_015.png diff --git a/appcompat/res/drawable-mdpi/abc_btn_radio_to_on_mtrl_000.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_btn_radio_to_on_mtrl_000.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_btn_radio_to_on_mtrl_000.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_btn_radio_to_on_mtrl_000.png diff --git a/appcompat/res/drawable-mdpi/abc_btn_radio_to_on_mtrl_015.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_btn_radio_to_on_mtrl_015.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_btn_radio_to_on_mtrl_015.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_btn_radio_to_on_mtrl_015.png diff --git a/appcompat/res/drawable-mdpi/abc_btn_switch_to_on_mtrl_00001.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_btn_switch_to_on_mtrl_00001.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_btn_switch_to_on_mtrl_00001.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_btn_switch_to_on_mtrl_00001.9.png diff --git a/appcompat/res/drawable-mdpi/abc_btn_switch_to_on_mtrl_00012.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_btn_switch_to_on_mtrl_00012.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_btn_switch_to_on_mtrl_00012.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_btn_switch_to_on_mtrl_00012.9.png diff --git a/appcompat/res/drawable-mdpi/abc_cab_background_top_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_cab_background_top_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_cab_background_top_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_cab_background_top_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-mdpi/abc_ic_ab_back_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_ab_back_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ic_ab_back_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_ab_back_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-mdpi/abc_ic_clear_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_clear_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ic_clear_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_clear_mtrl_alpha.png diff --git a/appcompat/res/drawable-mdpi/abc_ic_commit_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_commit_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ic_commit_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_commit_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-mdpi/abc_ic_go_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_go_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ic_go_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_go_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-mdpi/abc_ic_menu_copy_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_menu_copy_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ic_menu_copy_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_menu_copy_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-mdpi/abc_ic_menu_cut_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_menu_cut_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ic_menu_cut_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_menu_cut_mtrl_alpha.png diff --git a/appcompat/res/drawable-mdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png diff --git a/appcompat/res/drawable-mdpi/abc_ic_menu_paste_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_menu_paste_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ic_menu_paste_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_menu_paste_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-mdpi/abc_ic_menu_selectall_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_menu_selectall_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ic_menu_selectall_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_menu_selectall_mtrl_alpha.png diff --git a/appcompat/res/drawable-mdpi/abc_ic_menu_share_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_menu_share_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ic_menu_share_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_menu_share_mtrl_alpha.png diff --git a/appcompat/res/drawable-mdpi/abc_ic_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ic_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-mdpi/abc_ic_voice_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_voice_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_ic_voice_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_ic_voice_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-mdpi/abc_list_divider_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_list_divider_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_list_divider_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_list_divider_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-mdpi/abc_list_focused_holo.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_list_focused_holo.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_list_focused_holo.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_list_focused_holo.9.png diff --git a/appcompat/res/drawable-mdpi/abc_list_longpressed_holo.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_list_longpressed_holo.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_list_longpressed_holo.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_list_longpressed_holo.9.png diff --git a/appcompat/res/drawable-mdpi/abc_list_pressed_holo_dark.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_list_pressed_holo_dark.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_list_pressed_holo_dark.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_list_pressed_holo_dark.9.png diff --git a/appcompat/res/drawable-mdpi/abc_list_pressed_holo_light.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_list_pressed_holo_light.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_list_pressed_holo_light.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_list_pressed_holo_light.9.png diff --git a/appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_dark.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_dark.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_dark.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_dark.9.png diff --git a/appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_light.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_light.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_light.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_list_selector_disabled_holo_light.9.png diff --git a/appcompat/res/drawable-mdpi/abc_menu_hardkey_panel_mtrl_mult.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_menu_hardkey_panel_mtrl_mult.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_menu_hardkey_panel_mtrl_mult.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_menu_hardkey_panel_mtrl_mult.9.png diff --git a/appcompat/res/drawable-mdpi/abc_popup_background_mtrl_mult.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_popup_background_mtrl_mult.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_popup_background_mtrl_mult.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_popup_background_mtrl_mult.9.png diff --git a/appcompat/res/drawable-mdpi/abc_spinner_mtrl_am_alpha.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_spinner_mtrl_am_alpha.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_spinner_mtrl_am_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_spinner_mtrl_am_alpha.9.png diff --git a/appcompat/res/drawable-mdpi/abc_switch_track_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_switch_track_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_switch_track_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_switch_track_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-mdpi/abc_tab_indicator_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_tab_indicator_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_tab_indicator_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_tab_indicator_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-mdpi/abc_textfield_activated_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_textfield_activated_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_textfield_activated_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_textfield_activated_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-mdpi/abc_textfield_default_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_textfield_default_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_textfield_default_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_textfield_default_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-mdpi/abc_textfield_search_activated_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_textfield_search_activated_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_textfield_search_activated_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_textfield_search_activated_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-mdpi/abc_textfield_search_default_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-mdpi/abc_textfield_search_default_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-mdpi/abc_textfield_search_default_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-mdpi/abc_textfield_search_default_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_dark.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_dark.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_dark.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_dark.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_light.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_light.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_light.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ab_share_pack_holo_light.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_btn_check_to_on_mtrl_000.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_btn_check_to_on_mtrl_000.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_btn_check_to_on_mtrl_000.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_btn_check_to_on_mtrl_000.png diff --git a/appcompat/res/drawable-xhdpi/abc_btn_check_to_on_mtrl_015.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_btn_check_to_on_mtrl_015.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_btn_check_to_on_mtrl_015.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_btn_check_to_on_mtrl_015.png diff --git a/appcompat/res/drawable-xhdpi/abc_btn_radio_to_on_mtrl_000.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_btn_radio_to_on_mtrl_000.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_btn_radio_to_on_mtrl_000.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_btn_radio_to_on_mtrl_000.png diff --git a/appcompat/res/drawable-xhdpi/abc_btn_radio_to_on_mtrl_015.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_btn_radio_to_on_mtrl_015.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_btn_radio_to_on_mtrl_015.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_btn_radio_to_on_mtrl_015.png diff --git a/appcompat/res/drawable-xhdpi/abc_btn_switch_to_on_mtrl_00001.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_btn_switch_to_on_mtrl_00001.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_btn_switch_to_on_mtrl_00001.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_btn_switch_to_on_mtrl_00001.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_btn_switch_to_on_mtrl_00012.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_btn_switch_to_on_mtrl_00012.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_btn_switch_to_on_mtrl_00012.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_btn_switch_to_on_mtrl_00012.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_cab_background_top_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_cab_background_top_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_cab_background_top_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_cab_background_top_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_ic_ab_back_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_ab_back_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ic_ab_back_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_ab_back_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-xhdpi/abc_ic_clear_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_clear_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ic_clear_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_clear_mtrl_alpha.png diff --git a/appcompat/res/drawable-xhdpi/abc_ic_commit_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_commit_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ic_commit_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_commit_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-xhdpi/abc_ic_go_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_go_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ic_go_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_go_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-xhdpi/abc_ic_menu_copy_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_menu_copy_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ic_menu_copy_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_menu_copy_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-xhdpi/abc_ic_menu_cut_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_menu_cut_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ic_menu_cut_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_menu_cut_mtrl_alpha.png diff --git a/appcompat/res/drawable-xhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png diff --git a/appcompat/res/drawable-xhdpi/abc_ic_menu_paste_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_menu_paste_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ic_menu_paste_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_menu_paste_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-xhdpi/abc_ic_menu_selectall_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_menu_selectall_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ic_menu_selectall_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_menu_selectall_mtrl_alpha.png diff --git a/appcompat/res/drawable-xhdpi/abc_ic_menu_share_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_menu_share_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ic_menu_share_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_menu_share_mtrl_alpha.png diff --git a/appcompat/res/drawable-xhdpi/abc_ic_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ic_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-xhdpi/abc_ic_voice_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_voice_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_ic_voice_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_ic_voice_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-xhdpi/abc_list_divider_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_divider_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_list_divider_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_divider_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_list_focused_holo.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_focused_holo.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_list_focused_holo.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_focused_holo.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_list_longpressed_holo.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_longpressed_holo.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_list_longpressed_holo.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_longpressed_holo.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_list_pressed_holo_dark.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_pressed_holo_dark.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_list_pressed_holo_dark.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_pressed_holo_dark.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_list_pressed_holo_light.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_pressed_holo_light.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_list_pressed_holo_light.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_pressed_holo_light.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_dark.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_dark.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_dark.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_dark.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_light.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_light.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_light.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_list_selector_disabled_holo_light.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_menu_hardkey_panel_mtrl_mult.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_menu_hardkey_panel_mtrl_mult.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_menu_hardkey_panel_mtrl_mult.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_menu_hardkey_panel_mtrl_mult.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_popup_background_mtrl_mult.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_popup_background_mtrl_mult.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_popup_background_mtrl_mult.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_popup_background_mtrl_mult.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_spinner_mtrl_am_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_spinner_mtrl_am_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_spinner_mtrl_am_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_spinner_mtrl_am_alpha.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_switch_track_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_switch_track_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_switch_track_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_switch_track_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_tab_indicator_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_tab_indicator_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_tab_indicator_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_tab_indicator_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_textfield_activated_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_textfield_activated_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_textfield_activated_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_textfield_activated_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_textfield_default_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_textfield_default_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_textfield_default_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_textfield_default_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_textfield_search_activated_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_textfield_search_activated_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_textfield_search_activated_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_textfield_search_activated_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xhdpi/abc_textfield_search_default_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xhdpi/abc_textfield_search_default_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xhdpi/abc_textfield_search_default_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xhdpi/abc_textfield_search_default_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_dark.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_dark.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_dark.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_dark.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_light.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_light.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_light.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ab_share_pack_holo_light.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_btn_check_to_on_mtrl_000.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_btn_check_to_on_mtrl_000.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_btn_check_to_on_mtrl_000.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_btn_check_to_on_mtrl_000.png diff --git a/appcompat/res/drawable-xxhdpi/abc_btn_check_to_on_mtrl_015.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_btn_check_to_on_mtrl_015.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_btn_check_to_on_mtrl_015.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_btn_check_to_on_mtrl_015.png diff --git a/appcompat/res/drawable-xxhdpi/abc_btn_radio_to_on_mtrl_000.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_btn_radio_to_on_mtrl_000.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_btn_radio_to_on_mtrl_000.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_btn_radio_to_on_mtrl_000.png diff --git a/appcompat/res/drawable-xxhdpi/abc_btn_radio_to_on_mtrl_015.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_btn_radio_to_on_mtrl_015.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_btn_radio_to_on_mtrl_015.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_btn_radio_to_on_mtrl_015.png diff --git a/appcompat/res/drawable-xxhdpi/abc_btn_switch_to_on_mtrl_00001.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_btn_switch_to_on_mtrl_00001.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_btn_switch_to_on_mtrl_00001.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_btn_switch_to_on_mtrl_00001.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_btn_switch_to_on_mtrl_00012.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_btn_switch_to_on_mtrl_00012.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_btn_switch_to_on_mtrl_00012.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_btn_switch_to_on_mtrl_00012.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_cab_background_top_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_cab_background_top_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_cab_background_top_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_cab_background_top_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ic_ab_back_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_ab_back_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ic_ab_back_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_ab_back_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ic_clear_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_clear_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ic_clear_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_clear_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ic_commit_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_commit_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ic_commit_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_commit_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ic_go_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_go_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ic_go_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_go_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ic_menu_cut_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_menu_cut_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ic_menu_cut_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_menu_cut_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ic_menu_paste_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_menu_paste_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ic_menu_paste_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_menu_paste_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ic_menu_selectall_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_menu_selectall_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ic_menu_selectall_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_menu_selectall_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ic_menu_share_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_menu_share_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ic_menu_share_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_menu_share_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ic_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ic_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxhdpi/abc_ic_voice_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_voice_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_ic_voice_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_ic_voice_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxhdpi/abc_list_divider_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_divider_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_list_divider_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_divider_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_list_focused_holo.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_focused_holo.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_list_focused_holo.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_focused_holo.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_list_longpressed_holo.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_longpressed_holo.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_list_longpressed_holo.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_longpressed_holo.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_dark.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_dark.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_dark.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_dark.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_light.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_light.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_light.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_pressed_holo_light.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_dark.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_dark.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_dark.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_dark.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_light.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_light.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_light.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_list_selector_disabled_holo_light.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_menu_hardkey_panel_mtrl_mult.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_menu_hardkey_panel_mtrl_mult.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_menu_hardkey_panel_mtrl_mult.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_menu_hardkey_panel_mtrl_mult.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_popup_background_mtrl_mult.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_popup_background_mtrl_mult.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_popup_background_mtrl_mult.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_popup_background_mtrl_mult.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_spinner_mtrl_am_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_spinner_mtrl_am_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_spinner_mtrl_am_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_spinner_mtrl_am_alpha.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_switch_track_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_switch_track_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_switch_track_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_switch_track_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_tab_indicator_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_tab_indicator_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_tab_indicator_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_tab_indicator_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_textfield_activated_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_textfield_activated_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_textfield_activated_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_textfield_activated_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_textfield_default_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_textfield_default_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_textfield_default_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_textfield_default_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_textfield_search_activated_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_textfield_search_activated_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_textfield_search_activated_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_textfield_search_activated_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xxhdpi/abc_textfield_search_default_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xxhdpi/abc_textfield_search_default_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xxhdpi/abc_textfield_search_default_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xxhdpi/abc_textfield_search_default_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_btn_check_to_on_mtrl_000.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_btn_check_to_on_mtrl_000.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_btn_check_to_on_mtrl_000.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_btn_check_to_on_mtrl_000.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_btn_check_to_on_mtrl_015.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_btn_check_to_on_mtrl_015.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_btn_check_to_on_mtrl_015.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_btn_check_to_on_mtrl_015.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_btn_radio_to_on_mtrl_000.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_btn_radio_to_on_mtrl_000.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_btn_radio_to_on_mtrl_000.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_btn_radio_to_on_mtrl_000.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_btn_radio_to_on_mtrl_015.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_btn_radio_to_on_mtrl_015.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_btn_radio_to_on_mtrl_015.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_btn_radio_to_on_mtrl_015.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_btn_switch_to_on_mtrl_00001.9.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_btn_switch_to_on_mtrl_00001.9.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_btn_switch_to_on_mtrl_00001.9.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_btn_switch_to_on_mtrl_00001.9.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_btn_switch_to_on_mtrl_00012.9.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_btn_switch_to_on_mtrl_00012.9.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_btn_switch_to_on_mtrl_00012.9.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_btn_switch_to_on_mtrl_00012.9.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_ic_ab_back_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_ab_back_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_ic_ab_back_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_ab_back_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_ic_clear_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_clear_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_ic_clear_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_clear_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_menu_copy_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_ic_menu_cut_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_menu_cut_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_ic_menu_cut_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_menu_cut_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_menu_moreoverflow_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_ic_menu_paste_mtrl_am_alpha.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_menu_paste_mtrl_am_alpha.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_ic_menu_paste_mtrl_am_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_menu_paste_mtrl_am_alpha.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_ic_menu_selectall_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_menu_selectall_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_ic_menu_selectall_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_menu_selectall_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_ic_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_ic_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_ic_voice_search_api_mtrl_alpha.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_voice_search_api_mtrl_alpha.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_ic_voice_search_api_mtrl_alpha.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_ic_voice_search_api_mtrl_alpha.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_spinner_mtrl_am_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_spinner_mtrl_am_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_spinner_mtrl_am_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_spinner_mtrl_am_alpha.9.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_switch_track_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_switch_track_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_switch_track_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_switch_track_mtrl_alpha.9.png diff --git a/appcompat/res/drawable-xxxhdpi/abc_tab_indicator_mtrl_alpha.9.png b/eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_tab_indicator_mtrl_alpha.9.png similarity index 100% rename from appcompat/res/drawable-xxxhdpi/abc_tab_indicator_mtrl_alpha.9.png rename to eclipse-compile/appcompat/res/drawable-xxxhdpi/abc_tab_indicator_mtrl_alpha.9.png diff --git a/appcompat/res/drawable/abc_btn_check_material.xml b/eclipse-compile/appcompat/res/drawable/abc_btn_check_material.xml similarity index 100% rename from appcompat/res/drawable/abc_btn_check_material.xml rename to eclipse-compile/appcompat/res/drawable/abc_btn_check_material.xml diff --git a/appcompat/res/drawable/abc_btn_radio_material.xml b/eclipse-compile/appcompat/res/drawable/abc_btn_radio_material.xml similarity index 100% rename from appcompat/res/drawable/abc_btn_radio_material.xml rename to eclipse-compile/appcompat/res/drawable/abc_btn_radio_material.xml diff --git a/appcompat/res/drawable/abc_cab_background_internal_bg.xml b/eclipse-compile/appcompat/res/drawable/abc_cab_background_internal_bg.xml similarity index 100% rename from appcompat/res/drawable/abc_cab_background_internal_bg.xml rename to eclipse-compile/appcompat/res/drawable/abc_cab_background_internal_bg.xml diff --git a/appcompat/res/drawable/abc_cab_background_top_material.xml b/eclipse-compile/appcompat/res/drawable/abc_cab_background_top_material.xml similarity index 100% rename from appcompat/res/drawable/abc_cab_background_top_material.xml rename to eclipse-compile/appcompat/res/drawable/abc_cab_background_top_material.xml diff --git a/appcompat/res/drawable/abc_edit_text_material.xml b/eclipse-compile/appcompat/res/drawable/abc_edit_text_material.xml similarity index 100% rename from appcompat/res/drawable/abc_edit_text_material.xml rename to eclipse-compile/appcompat/res/drawable/abc_edit_text_material.xml diff --git a/appcompat/res/drawable/abc_item_background_holo_dark.xml b/eclipse-compile/appcompat/res/drawable/abc_item_background_holo_dark.xml similarity index 100% rename from appcompat/res/drawable/abc_item_background_holo_dark.xml rename to eclipse-compile/appcompat/res/drawable/abc_item_background_holo_dark.xml diff --git a/appcompat/res/drawable/abc_item_background_holo_light.xml b/eclipse-compile/appcompat/res/drawable/abc_item_background_holo_light.xml similarity index 100% rename from appcompat/res/drawable/abc_item_background_holo_light.xml rename to eclipse-compile/appcompat/res/drawable/abc_item_background_holo_light.xml diff --git a/appcompat/res/drawable/abc_list_selector_background_transition_holo_dark.xml b/eclipse-compile/appcompat/res/drawable/abc_list_selector_background_transition_holo_dark.xml similarity index 100% rename from appcompat/res/drawable/abc_list_selector_background_transition_holo_dark.xml rename to eclipse-compile/appcompat/res/drawable/abc_list_selector_background_transition_holo_dark.xml diff --git a/appcompat/res/drawable/abc_list_selector_background_transition_holo_light.xml b/eclipse-compile/appcompat/res/drawable/abc_list_selector_background_transition_holo_light.xml similarity index 100% rename from appcompat/res/drawable/abc_list_selector_background_transition_holo_light.xml rename to eclipse-compile/appcompat/res/drawable/abc_list_selector_background_transition_holo_light.xml diff --git a/appcompat/res/drawable/abc_list_selector_holo_dark.xml b/eclipse-compile/appcompat/res/drawable/abc_list_selector_holo_dark.xml similarity index 100% rename from appcompat/res/drawable/abc_list_selector_holo_dark.xml rename to eclipse-compile/appcompat/res/drawable/abc_list_selector_holo_dark.xml diff --git a/appcompat/res/drawable/abc_list_selector_holo_light.xml b/eclipse-compile/appcompat/res/drawable/abc_list_selector_holo_light.xml similarity index 100% rename from appcompat/res/drawable/abc_list_selector_holo_light.xml rename to eclipse-compile/appcompat/res/drawable/abc_list_selector_holo_light.xml diff --git a/appcompat/res/drawable/abc_switch_thumb_material.xml b/eclipse-compile/appcompat/res/drawable/abc_switch_thumb_material.xml similarity index 100% rename from appcompat/res/drawable/abc_switch_thumb_material.xml rename to eclipse-compile/appcompat/res/drawable/abc_switch_thumb_material.xml diff --git a/appcompat/res/drawable/abc_tab_indicator_material.xml b/eclipse-compile/appcompat/res/drawable/abc_tab_indicator_material.xml similarity index 100% rename from appcompat/res/drawable/abc_tab_indicator_material.xml rename to eclipse-compile/appcompat/res/drawable/abc_tab_indicator_material.xml diff --git a/appcompat/res/drawable/abc_textfield_search_material.xml b/eclipse-compile/appcompat/res/drawable/abc_textfield_search_material.xml similarity index 100% rename from appcompat/res/drawable/abc_textfield_search_material.xml rename to eclipse-compile/appcompat/res/drawable/abc_textfield_search_material.xml diff --git a/appcompat/res/layout-v11/abc_screen_content_include.xml b/eclipse-compile/appcompat/res/layout-v11/abc_screen_content_include.xml similarity index 100% rename from appcompat/res/layout-v11/abc_screen_content_include.xml rename to eclipse-compile/appcompat/res/layout-v11/abc_screen_content_include.xml diff --git a/appcompat/res/layout/abc_action_bar_title_item.xml b/eclipse-compile/appcompat/res/layout/abc_action_bar_title_item.xml similarity index 100% rename from appcompat/res/layout/abc_action_bar_title_item.xml rename to eclipse-compile/appcompat/res/layout/abc_action_bar_title_item.xml diff --git a/appcompat/res/layout/abc_action_bar_up_container.xml b/eclipse-compile/appcompat/res/layout/abc_action_bar_up_container.xml similarity index 100% rename from appcompat/res/layout/abc_action_bar_up_container.xml rename to eclipse-compile/appcompat/res/layout/abc_action_bar_up_container.xml diff --git a/appcompat/res/layout/abc_action_bar_view_list_nav_layout.xml b/eclipse-compile/appcompat/res/layout/abc_action_bar_view_list_nav_layout.xml similarity index 100% rename from appcompat/res/layout/abc_action_bar_view_list_nav_layout.xml rename to eclipse-compile/appcompat/res/layout/abc_action_bar_view_list_nav_layout.xml diff --git a/appcompat/res/layout/abc_action_menu_item_layout.xml b/eclipse-compile/appcompat/res/layout/abc_action_menu_item_layout.xml similarity index 100% rename from appcompat/res/layout/abc_action_menu_item_layout.xml rename to eclipse-compile/appcompat/res/layout/abc_action_menu_item_layout.xml diff --git a/appcompat/res/layout/abc_action_menu_layout.xml b/eclipse-compile/appcompat/res/layout/abc_action_menu_layout.xml similarity index 100% rename from appcompat/res/layout/abc_action_menu_layout.xml rename to eclipse-compile/appcompat/res/layout/abc_action_menu_layout.xml diff --git a/appcompat/res/layout/abc_action_mode_bar.xml b/eclipse-compile/appcompat/res/layout/abc_action_mode_bar.xml similarity index 100% rename from appcompat/res/layout/abc_action_mode_bar.xml rename to eclipse-compile/appcompat/res/layout/abc_action_mode_bar.xml diff --git a/appcompat/res/layout/abc_action_mode_close_item_material.xml b/eclipse-compile/appcompat/res/layout/abc_action_mode_close_item_material.xml similarity index 100% rename from appcompat/res/layout/abc_action_mode_close_item_material.xml rename to eclipse-compile/appcompat/res/layout/abc_action_mode_close_item_material.xml diff --git a/appcompat/res/layout/abc_activity_chooser_view.xml b/eclipse-compile/appcompat/res/layout/abc_activity_chooser_view.xml similarity index 100% rename from appcompat/res/layout/abc_activity_chooser_view.xml rename to eclipse-compile/appcompat/res/layout/abc_activity_chooser_view.xml diff --git a/appcompat/res/layout/abc_activity_chooser_view_include.xml b/eclipse-compile/appcompat/res/layout/abc_activity_chooser_view_include.xml similarity index 100% rename from appcompat/res/layout/abc_activity_chooser_view_include.xml rename to eclipse-compile/appcompat/res/layout/abc_activity_chooser_view_include.xml diff --git a/appcompat/res/layout/abc_activity_chooser_view_list_item.xml b/eclipse-compile/appcompat/res/layout/abc_activity_chooser_view_list_item.xml similarity index 100% rename from appcompat/res/layout/abc_activity_chooser_view_list_item.xml rename to eclipse-compile/appcompat/res/layout/abc_activity_chooser_view_list_item.xml diff --git a/appcompat/res/layout/abc_expanded_menu_layout.xml b/eclipse-compile/appcompat/res/layout/abc_expanded_menu_layout.xml similarity index 100% rename from appcompat/res/layout/abc_expanded_menu_layout.xml rename to eclipse-compile/appcompat/res/layout/abc_expanded_menu_layout.xml diff --git a/appcompat/res/layout/abc_list_menu_item_checkbox.xml b/eclipse-compile/appcompat/res/layout/abc_list_menu_item_checkbox.xml similarity index 100% rename from appcompat/res/layout/abc_list_menu_item_checkbox.xml rename to eclipse-compile/appcompat/res/layout/abc_list_menu_item_checkbox.xml diff --git a/appcompat/res/layout/abc_list_menu_item_icon.xml b/eclipse-compile/appcompat/res/layout/abc_list_menu_item_icon.xml similarity index 100% rename from appcompat/res/layout/abc_list_menu_item_icon.xml rename to eclipse-compile/appcompat/res/layout/abc_list_menu_item_icon.xml diff --git a/appcompat/res/layout/abc_list_menu_item_layout.xml b/eclipse-compile/appcompat/res/layout/abc_list_menu_item_layout.xml similarity index 100% rename from appcompat/res/layout/abc_list_menu_item_layout.xml rename to eclipse-compile/appcompat/res/layout/abc_list_menu_item_layout.xml diff --git a/appcompat/res/layout/abc_list_menu_item_radio.xml b/eclipse-compile/appcompat/res/layout/abc_list_menu_item_radio.xml similarity index 100% rename from appcompat/res/layout/abc_list_menu_item_radio.xml rename to eclipse-compile/appcompat/res/layout/abc_list_menu_item_radio.xml diff --git a/appcompat/res/layout/abc_popup_menu_item_layout.xml b/eclipse-compile/appcompat/res/layout/abc_popup_menu_item_layout.xml similarity index 100% rename from appcompat/res/layout/abc_popup_menu_item_layout.xml rename to eclipse-compile/appcompat/res/layout/abc_popup_menu_item_layout.xml diff --git a/appcompat/res/layout/abc_screen_content_include.xml b/eclipse-compile/appcompat/res/layout/abc_screen_content_include.xml similarity index 100% rename from appcompat/res/layout/abc_screen_content_include.xml rename to eclipse-compile/appcompat/res/layout/abc_screen_content_include.xml diff --git a/appcompat/res/layout/abc_screen_simple.xml b/eclipse-compile/appcompat/res/layout/abc_screen_simple.xml similarity index 100% rename from appcompat/res/layout/abc_screen_simple.xml rename to eclipse-compile/appcompat/res/layout/abc_screen_simple.xml diff --git a/appcompat/res/layout/abc_screen_simple_overlay_action_mode.xml b/eclipse-compile/appcompat/res/layout/abc_screen_simple_overlay_action_mode.xml similarity index 100% rename from appcompat/res/layout/abc_screen_simple_overlay_action_mode.xml rename to eclipse-compile/appcompat/res/layout/abc_screen_simple_overlay_action_mode.xml diff --git a/appcompat/res/layout/abc_screen_toolbar.xml b/eclipse-compile/appcompat/res/layout/abc_screen_toolbar.xml similarity index 100% rename from appcompat/res/layout/abc_screen_toolbar.xml rename to eclipse-compile/appcompat/res/layout/abc_screen_toolbar.xml diff --git a/appcompat/res/layout/abc_search_dropdown_item_icons_2line.xml b/eclipse-compile/appcompat/res/layout/abc_search_dropdown_item_icons_2line.xml similarity index 100% rename from appcompat/res/layout/abc_search_dropdown_item_icons_2line.xml rename to eclipse-compile/appcompat/res/layout/abc_search_dropdown_item_icons_2line.xml diff --git a/appcompat/res/layout/abc_search_view.xml b/eclipse-compile/appcompat/res/layout/abc_search_view.xml similarity index 100% rename from appcompat/res/layout/abc_search_view.xml rename to eclipse-compile/appcompat/res/layout/abc_search_view.xml diff --git a/appcompat/res/layout/abc_simple_dropdown_hint.xml b/eclipse-compile/appcompat/res/layout/abc_simple_dropdown_hint.xml similarity index 100% rename from appcompat/res/layout/abc_simple_dropdown_hint.xml rename to eclipse-compile/appcompat/res/layout/abc_simple_dropdown_hint.xml diff --git a/appcompat/res/layout/support_simple_spinner_dropdown_item.xml b/eclipse-compile/appcompat/res/layout/support_simple_spinner_dropdown_item.xml similarity index 100% rename from appcompat/res/layout/support_simple_spinner_dropdown_item.xml rename to eclipse-compile/appcompat/res/layout/support_simple_spinner_dropdown_item.xml diff --git a/appcompat/res/values-af/strings.xml b/eclipse-compile/appcompat/res/values-af/strings.xml similarity index 100% rename from appcompat/res/values-af/strings.xml rename to eclipse-compile/appcompat/res/values-af/strings.xml diff --git a/appcompat/res/values-am/strings.xml b/eclipse-compile/appcompat/res/values-am/strings.xml similarity index 100% rename from appcompat/res/values-am/strings.xml rename to eclipse-compile/appcompat/res/values-am/strings.xml diff --git a/appcompat/res/values-ar/strings.xml b/eclipse-compile/appcompat/res/values-ar/strings.xml similarity index 100% rename from appcompat/res/values-ar/strings.xml rename to eclipse-compile/appcompat/res/values-ar/strings.xml diff --git a/appcompat/res/values-bg/strings.xml b/eclipse-compile/appcompat/res/values-bg/strings.xml similarity index 100% rename from appcompat/res/values-bg/strings.xml rename to eclipse-compile/appcompat/res/values-bg/strings.xml diff --git a/appcompat/res/values-bn-rBD/strings.xml b/eclipse-compile/appcompat/res/values-bn-rBD/strings.xml similarity index 100% rename from appcompat/res/values-bn-rBD/strings.xml rename to eclipse-compile/appcompat/res/values-bn-rBD/strings.xml diff --git a/appcompat/res/values-ca/strings.xml b/eclipse-compile/appcompat/res/values-ca/strings.xml similarity index 100% rename from appcompat/res/values-ca/strings.xml rename to eclipse-compile/appcompat/res/values-ca/strings.xml diff --git a/appcompat/res/values-cs/strings.xml b/eclipse-compile/appcompat/res/values-cs/strings.xml similarity index 100% rename from appcompat/res/values-cs/strings.xml rename to eclipse-compile/appcompat/res/values-cs/strings.xml diff --git a/appcompat/res/values-da/strings.xml b/eclipse-compile/appcompat/res/values-da/strings.xml similarity index 100% rename from appcompat/res/values-da/strings.xml rename to eclipse-compile/appcompat/res/values-da/strings.xml diff --git a/appcompat/res/values-de/strings.xml b/eclipse-compile/appcompat/res/values-de/strings.xml similarity index 100% rename from appcompat/res/values-de/strings.xml rename to eclipse-compile/appcompat/res/values-de/strings.xml diff --git a/appcompat/res/values-el/strings.xml b/eclipse-compile/appcompat/res/values-el/strings.xml similarity index 100% rename from appcompat/res/values-el/strings.xml rename to eclipse-compile/appcompat/res/values-el/strings.xml diff --git a/appcompat/res/values-en-rGB/strings.xml b/eclipse-compile/appcompat/res/values-en-rGB/strings.xml similarity index 100% rename from appcompat/res/values-en-rGB/strings.xml rename to eclipse-compile/appcompat/res/values-en-rGB/strings.xml diff --git a/appcompat/res/values-en-rIN/strings.xml b/eclipse-compile/appcompat/res/values-en-rIN/strings.xml similarity index 100% rename from appcompat/res/values-en-rIN/strings.xml rename to eclipse-compile/appcompat/res/values-en-rIN/strings.xml diff --git a/appcompat/res/values-es-rUS/strings.xml b/eclipse-compile/appcompat/res/values-es-rUS/strings.xml similarity index 100% rename from appcompat/res/values-es-rUS/strings.xml rename to eclipse-compile/appcompat/res/values-es-rUS/strings.xml diff --git a/appcompat/res/values-es/strings.xml b/eclipse-compile/appcompat/res/values-es/strings.xml similarity index 100% rename from appcompat/res/values-es/strings.xml rename to eclipse-compile/appcompat/res/values-es/strings.xml diff --git a/appcompat/res/values-et-rEE/strings.xml b/eclipse-compile/appcompat/res/values-et-rEE/strings.xml similarity index 100% rename from appcompat/res/values-et-rEE/strings.xml rename to eclipse-compile/appcompat/res/values-et-rEE/strings.xml diff --git a/appcompat/res/values-eu-rES/strings.xml b/eclipse-compile/appcompat/res/values-eu-rES/strings.xml similarity index 100% rename from appcompat/res/values-eu-rES/strings.xml rename to eclipse-compile/appcompat/res/values-eu-rES/strings.xml diff --git a/appcompat/res/values-fa/strings.xml b/eclipse-compile/appcompat/res/values-fa/strings.xml similarity index 100% rename from appcompat/res/values-fa/strings.xml rename to eclipse-compile/appcompat/res/values-fa/strings.xml diff --git a/appcompat/res/values-fi/strings.xml b/eclipse-compile/appcompat/res/values-fi/strings.xml similarity index 100% rename from appcompat/res/values-fi/strings.xml rename to eclipse-compile/appcompat/res/values-fi/strings.xml diff --git a/appcompat/res/values-fr-rCA/strings.xml b/eclipse-compile/appcompat/res/values-fr-rCA/strings.xml similarity index 100% rename from appcompat/res/values-fr-rCA/strings.xml rename to eclipse-compile/appcompat/res/values-fr-rCA/strings.xml diff --git a/appcompat/res/values-fr/strings.xml b/eclipse-compile/appcompat/res/values-fr/strings.xml similarity index 100% rename from appcompat/res/values-fr/strings.xml rename to eclipse-compile/appcompat/res/values-fr/strings.xml diff --git a/appcompat/res/values-gl-rES/strings.xml b/eclipse-compile/appcompat/res/values-gl-rES/strings.xml similarity index 100% rename from appcompat/res/values-gl-rES/strings.xml rename to eclipse-compile/appcompat/res/values-gl-rES/strings.xml diff --git a/appcompat/res/values-hi/strings.xml b/eclipse-compile/appcompat/res/values-hi/strings.xml similarity index 100% rename from appcompat/res/values-hi/strings.xml rename to eclipse-compile/appcompat/res/values-hi/strings.xml diff --git a/appcompat/res/values-hr/strings.xml b/eclipse-compile/appcompat/res/values-hr/strings.xml similarity index 100% rename from appcompat/res/values-hr/strings.xml rename to eclipse-compile/appcompat/res/values-hr/strings.xml diff --git a/appcompat/res/values-hu/strings.xml b/eclipse-compile/appcompat/res/values-hu/strings.xml similarity index 100% rename from appcompat/res/values-hu/strings.xml rename to eclipse-compile/appcompat/res/values-hu/strings.xml diff --git a/appcompat/res/values-hy-rAM/strings.xml b/eclipse-compile/appcompat/res/values-hy-rAM/strings.xml similarity index 100% rename from appcompat/res/values-hy-rAM/strings.xml rename to eclipse-compile/appcompat/res/values-hy-rAM/strings.xml diff --git a/appcompat/res/values-in/strings.xml b/eclipse-compile/appcompat/res/values-in/strings.xml similarity index 100% rename from appcompat/res/values-in/strings.xml rename to eclipse-compile/appcompat/res/values-in/strings.xml diff --git a/appcompat/res/values-is-rIS/strings.xml b/eclipse-compile/appcompat/res/values-is-rIS/strings.xml similarity index 100% rename from appcompat/res/values-is-rIS/strings.xml rename to eclipse-compile/appcompat/res/values-is-rIS/strings.xml diff --git a/appcompat/res/values-it/strings.xml b/eclipse-compile/appcompat/res/values-it/strings.xml similarity index 100% rename from appcompat/res/values-it/strings.xml rename to eclipse-compile/appcompat/res/values-it/strings.xml diff --git a/appcompat/res/values-iw/strings.xml b/eclipse-compile/appcompat/res/values-iw/strings.xml similarity index 100% rename from appcompat/res/values-iw/strings.xml rename to eclipse-compile/appcompat/res/values-iw/strings.xml diff --git a/appcompat/res/values-ja/strings.xml b/eclipse-compile/appcompat/res/values-ja/strings.xml similarity index 100% rename from appcompat/res/values-ja/strings.xml rename to eclipse-compile/appcompat/res/values-ja/strings.xml diff --git a/appcompat/res/values-ka-rGE/strings.xml b/eclipse-compile/appcompat/res/values-ka-rGE/strings.xml similarity index 100% rename from appcompat/res/values-ka-rGE/strings.xml rename to eclipse-compile/appcompat/res/values-ka-rGE/strings.xml diff --git a/appcompat/res/values-kk-rKZ/strings.xml b/eclipse-compile/appcompat/res/values-kk-rKZ/strings.xml similarity index 100% rename from appcompat/res/values-kk-rKZ/strings.xml rename to eclipse-compile/appcompat/res/values-kk-rKZ/strings.xml diff --git a/appcompat/res/values-km-rKH/strings.xml b/eclipse-compile/appcompat/res/values-km-rKH/strings.xml similarity index 100% rename from appcompat/res/values-km-rKH/strings.xml rename to eclipse-compile/appcompat/res/values-km-rKH/strings.xml diff --git a/appcompat/res/values-kn-rIN/strings.xml b/eclipse-compile/appcompat/res/values-kn-rIN/strings.xml similarity index 100% rename from appcompat/res/values-kn-rIN/strings.xml rename to eclipse-compile/appcompat/res/values-kn-rIN/strings.xml diff --git a/appcompat/res/values-ko/strings.xml b/eclipse-compile/appcompat/res/values-ko/strings.xml similarity index 100% rename from appcompat/res/values-ko/strings.xml rename to eclipse-compile/appcompat/res/values-ko/strings.xml diff --git a/appcompat/res/values-ky-rKG/strings.xml b/eclipse-compile/appcompat/res/values-ky-rKG/strings.xml similarity index 100% rename from appcompat/res/values-ky-rKG/strings.xml rename to eclipse-compile/appcompat/res/values-ky-rKG/strings.xml diff --git a/appcompat/res/values-land/bools.xml b/eclipse-compile/appcompat/res/values-land/bools.xml similarity index 100% rename from appcompat/res/values-land/bools.xml rename to eclipse-compile/appcompat/res/values-land/bools.xml diff --git a/appcompat/res/values-land/config.xml b/eclipse-compile/appcompat/res/values-land/config.xml similarity index 100% rename from appcompat/res/values-land/config.xml rename to eclipse-compile/appcompat/res/values-land/config.xml diff --git a/appcompat/res/values-land/dimens.xml b/eclipse-compile/appcompat/res/values-land/dimens.xml similarity index 100% rename from appcompat/res/values-land/dimens.xml rename to eclipse-compile/appcompat/res/values-land/dimens.xml diff --git a/appcompat/res/values-land/dimens_material.xml b/eclipse-compile/appcompat/res/values-land/dimens_material.xml similarity index 100% rename from appcompat/res/values-land/dimens_material.xml rename to eclipse-compile/appcompat/res/values-land/dimens_material.xml diff --git a/appcompat/res/values-large/bools.xml b/eclipse-compile/appcompat/res/values-large/bools.xml similarity index 100% rename from appcompat/res/values-large/bools.xml rename to eclipse-compile/appcompat/res/values-large/bools.xml diff --git a/appcompat/res/values-large/config.xml b/eclipse-compile/appcompat/res/values-large/config.xml similarity index 100% rename from appcompat/res/values-large/config.xml rename to eclipse-compile/appcompat/res/values-large/config.xml diff --git a/appcompat/res/values-large/dimens.xml b/eclipse-compile/appcompat/res/values-large/dimens.xml similarity index 100% rename from appcompat/res/values-large/dimens.xml rename to eclipse-compile/appcompat/res/values-large/dimens.xml diff --git a/appcompat/res/values-large/themes_base.xml b/eclipse-compile/appcompat/res/values-large/themes_base.xml similarity index 100% rename from appcompat/res/values-large/themes_base.xml rename to eclipse-compile/appcompat/res/values-large/themes_base.xml diff --git a/appcompat/res/values-lo-rLA/strings.xml b/eclipse-compile/appcompat/res/values-lo-rLA/strings.xml similarity index 100% rename from appcompat/res/values-lo-rLA/strings.xml rename to eclipse-compile/appcompat/res/values-lo-rLA/strings.xml diff --git a/appcompat/res/values-lt/strings.xml b/eclipse-compile/appcompat/res/values-lt/strings.xml similarity index 100% rename from appcompat/res/values-lt/strings.xml rename to eclipse-compile/appcompat/res/values-lt/strings.xml diff --git a/appcompat/res/values-lv/strings.xml b/eclipse-compile/appcompat/res/values-lv/strings.xml similarity index 100% rename from appcompat/res/values-lv/strings.xml rename to eclipse-compile/appcompat/res/values-lv/strings.xml diff --git a/appcompat/res/values-mk-rMK/strings.xml b/eclipse-compile/appcompat/res/values-mk-rMK/strings.xml similarity index 100% rename from appcompat/res/values-mk-rMK/strings.xml rename to eclipse-compile/appcompat/res/values-mk-rMK/strings.xml diff --git a/appcompat/res/values-ml-rIN/strings.xml b/eclipse-compile/appcompat/res/values-ml-rIN/strings.xml similarity index 100% rename from appcompat/res/values-ml-rIN/strings.xml rename to eclipse-compile/appcompat/res/values-ml-rIN/strings.xml diff --git a/appcompat/res/values-mn-rMN/strings.xml b/eclipse-compile/appcompat/res/values-mn-rMN/strings.xml similarity index 100% rename from appcompat/res/values-mn-rMN/strings.xml rename to eclipse-compile/appcompat/res/values-mn-rMN/strings.xml diff --git a/appcompat/res/values-mr-rIN/strings.xml b/eclipse-compile/appcompat/res/values-mr-rIN/strings.xml similarity index 100% rename from appcompat/res/values-mr-rIN/strings.xml rename to eclipse-compile/appcompat/res/values-mr-rIN/strings.xml diff --git a/appcompat/res/values-ms-rMY/strings.xml b/eclipse-compile/appcompat/res/values-ms-rMY/strings.xml similarity index 100% rename from appcompat/res/values-ms-rMY/strings.xml rename to eclipse-compile/appcompat/res/values-ms-rMY/strings.xml diff --git a/appcompat/res/values-my-rMM/strings.xml b/eclipse-compile/appcompat/res/values-my-rMM/strings.xml similarity index 100% rename from appcompat/res/values-my-rMM/strings.xml rename to eclipse-compile/appcompat/res/values-my-rMM/strings.xml diff --git a/appcompat/res/values-nb/strings.xml b/eclipse-compile/appcompat/res/values-nb/strings.xml similarity index 100% rename from appcompat/res/values-nb/strings.xml rename to eclipse-compile/appcompat/res/values-nb/strings.xml diff --git a/appcompat/res/values-ne-rNP/strings.xml b/eclipse-compile/appcompat/res/values-ne-rNP/strings.xml similarity index 100% rename from appcompat/res/values-ne-rNP/strings.xml rename to eclipse-compile/appcompat/res/values-ne-rNP/strings.xml diff --git a/appcompat/res/values-nl/strings.xml b/eclipse-compile/appcompat/res/values-nl/strings.xml similarity index 100% rename from appcompat/res/values-nl/strings.xml rename to eclipse-compile/appcompat/res/values-nl/strings.xml diff --git a/appcompat/res/values-pl/strings.xml b/eclipse-compile/appcompat/res/values-pl/strings.xml similarity index 100% rename from appcompat/res/values-pl/strings.xml rename to eclipse-compile/appcompat/res/values-pl/strings.xml diff --git a/appcompat/res/values-port/bools.xml b/eclipse-compile/appcompat/res/values-port/bools.xml similarity index 100% rename from appcompat/res/values-port/bools.xml rename to eclipse-compile/appcompat/res/values-port/bools.xml diff --git a/appcompat/res/values-pt-rPT/strings.xml b/eclipse-compile/appcompat/res/values-pt-rPT/strings.xml similarity index 100% rename from appcompat/res/values-pt-rPT/strings.xml rename to eclipse-compile/appcompat/res/values-pt-rPT/strings.xml diff --git a/appcompat/res/values-pt/strings.xml b/eclipse-compile/appcompat/res/values-pt/strings.xml similarity index 100% rename from appcompat/res/values-pt/strings.xml rename to eclipse-compile/appcompat/res/values-pt/strings.xml diff --git a/appcompat/res/values-ro/strings.xml b/eclipse-compile/appcompat/res/values-ro/strings.xml similarity index 100% rename from appcompat/res/values-ro/strings.xml rename to eclipse-compile/appcompat/res/values-ro/strings.xml diff --git a/appcompat/res/values-ru/strings.xml b/eclipse-compile/appcompat/res/values-ru/strings.xml similarity index 100% rename from appcompat/res/values-ru/strings.xml rename to eclipse-compile/appcompat/res/values-ru/strings.xml diff --git a/appcompat/res/values-si-rLK/strings.xml b/eclipse-compile/appcompat/res/values-si-rLK/strings.xml similarity index 100% rename from appcompat/res/values-si-rLK/strings.xml rename to eclipse-compile/appcompat/res/values-si-rLK/strings.xml diff --git a/appcompat/res/values-sk/strings.xml b/eclipse-compile/appcompat/res/values-sk/strings.xml similarity index 100% rename from appcompat/res/values-sk/strings.xml rename to eclipse-compile/appcompat/res/values-sk/strings.xml diff --git a/appcompat/res/values-sl/strings.xml b/eclipse-compile/appcompat/res/values-sl/strings.xml similarity index 100% rename from appcompat/res/values-sl/strings.xml rename to eclipse-compile/appcompat/res/values-sl/strings.xml diff --git a/appcompat/res/values-sr/strings.xml b/eclipse-compile/appcompat/res/values-sr/strings.xml similarity index 100% rename from appcompat/res/values-sr/strings.xml rename to eclipse-compile/appcompat/res/values-sr/strings.xml diff --git a/appcompat/res/values-sv/strings.xml b/eclipse-compile/appcompat/res/values-sv/strings.xml similarity index 100% rename from appcompat/res/values-sv/strings.xml rename to eclipse-compile/appcompat/res/values-sv/strings.xml diff --git a/appcompat/res/values-sw/strings.xml b/eclipse-compile/appcompat/res/values-sw/strings.xml similarity index 100% rename from appcompat/res/values-sw/strings.xml rename to eclipse-compile/appcompat/res/values-sw/strings.xml diff --git a/appcompat/res/values-sw600dp/config.xml b/eclipse-compile/appcompat/res/values-sw600dp/config.xml similarity index 100% rename from appcompat/res/values-sw600dp/config.xml rename to eclipse-compile/appcompat/res/values-sw600dp/config.xml diff --git a/appcompat/res/values-sw600dp/dimens.xml b/eclipse-compile/appcompat/res/values-sw600dp/dimens.xml similarity index 100% rename from appcompat/res/values-sw600dp/dimens.xml rename to eclipse-compile/appcompat/res/values-sw600dp/dimens.xml diff --git a/appcompat/res/values-ta-rIN/strings.xml b/eclipse-compile/appcompat/res/values-ta-rIN/strings.xml similarity index 100% rename from appcompat/res/values-ta-rIN/strings.xml rename to eclipse-compile/appcompat/res/values-ta-rIN/strings.xml diff --git a/appcompat/res/values-te-rIN/strings.xml b/eclipse-compile/appcompat/res/values-te-rIN/strings.xml similarity index 100% rename from appcompat/res/values-te-rIN/strings.xml rename to eclipse-compile/appcompat/res/values-te-rIN/strings.xml diff --git a/appcompat/res/values-th/strings.xml b/eclipse-compile/appcompat/res/values-th/strings.xml similarity index 100% rename from appcompat/res/values-th/strings.xml rename to eclipse-compile/appcompat/res/values-th/strings.xml diff --git a/appcompat/res/values-tl/strings.xml b/eclipse-compile/appcompat/res/values-tl/strings.xml similarity index 100% rename from appcompat/res/values-tl/strings.xml rename to eclipse-compile/appcompat/res/values-tl/strings.xml diff --git a/appcompat/res/values-tr/strings.xml b/eclipse-compile/appcompat/res/values-tr/strings.xml similarity index 100% rename from appcompat/res/values-tr/strings.xml rename to eclipse-compile/appcompat/res/values-tr/strings.xml diff --git a/appcompat/res/values-uk/strings.xml b/eclipse-compile/appcompat/res/values-uk/strings.xml similarity index 100% rename from appcompat/res/values-uk/strings.xml rename to eclipse-compile/appcompat/res/values-uk/strings.xml diff --git a/appcompat/res/values-ur-rPK/strings.xml b/eclipse-compile/appcompat/res/values-ur-rPK/strings.xml similarity index 100% rename from appcompat/res/values-ur-rPK/strings.xml rename to eclipse-compile/appcompat/res/values-ur-rPK/strings.xml diff --git a/appcompat/res/values-uz-rUZ/strings.xml b/eclipse-compile/appcompat/res/values-uz-rUZ/strings.xml similarity index 100% rename from appcompat/res/values-uz-rUZ/strings.xml rename to eclipse-compile/appcompat/res/values-uz-rUZ/strings.xml diff --git a/appcompat/res/values-v11/styles_base.xml b/eclipse-compile/appcompat/res/values-v11/styles_base.xml similarity index 100% rename from appcompat/res/values-v11/styles_base.xml rename to eclipse-compile/appcompat/res/values-v11/styles_base.xml diff --git a/appcompat/res/values-v11/styles_base_text.xml b/eclipse-compile/appcompat/res/values-v11/styles_base_text.xml similarity index 100% rename from appcompat/res/values-v11/styles_base_text.xml rename to eclipse-compile/appcompat/res/values-v11/styles_base_text.xml diff --git a/appcompat/res/values-v11/themes_base.xml b/eclipse-compile/appcompat/res/values-v11/themes_base.xml similarity index 100% rename from appcompat/res/values-v11/themes_base.xml rename to eclipse-compile/appcompat/res/values-v11/themes_base.xml diff --git a/appcompat/res/values-v14/themes_base.xml b/eclipse-compile/appcompat/res/values-v14/themes_base.xml similarity index 100% rename from appcompat/res/values-v14/themes_base.xml rename to eclipse-compile/appcompat/res/values-v14/themes_base.xml diff --git a/appcompat/res/values-v17/styles_rtl.xml b/eclipse-compile/appcompat/res/values-v17/styles_rtl.xml similarity index 100% rename from appcompat/res/values-v17/styles_rtl.xml rename to eclipse-compile/appcompat/res/values-v17/styles_rtl.xml diff --git a/appcompat/res/values-v21/styles_base.xml b/eclipse-compile/appcompat/res/values-v21/styles_base.xml similarity index 100% rename from appcompat/res/values-v21/styles_base.xml rename to eclipse-compile/appcompat/res/values-v21/styles_base.xml diff --git a/appcompat/res/values-v21/styles_base_text.xml b/eclipse-compile/appcompat/res/values-v21/styles_base_text.xml similarity index 100% rename from appcompat/res/values-v21/styles_base_text.xml rename to eclipse-compile/appcompat/res/values-v21/styles_base_text.xml diff --git a/appcompat/res/values-v21/themes_base.xml b/eclipse-compile/appcompat/res/values-v21/themes_base.xml similarity index 100% rename from appcompat/res/values-v21/themes_base.xml rename to eclipse-compile/appcompat/res/values-v21/themes_base.xml diff --git a/appcompat/res/values-vi/strings.xml b/eclipse-compile/appcompat/res/values-vi/strings.xml similarity index 100% rename from appcompat/res/values-vi/strings.xml rename to eclipse-compile/appcompat/res/values-vi/strings.xml diff --git a/appcompat/res/values-w360dp/dimens.xml b/eclipse-compile/appcompat/res/values-w360dp/dimens.xml similarity index 100% rename from appcompat/res/values-w360dp/dimens.xml rename to eclipse-compile/appcompat/res/values-w360dp/dimens.xml diff --git a/appcompat/res/values-w480dp/bools.xml b/eclipse-compile/appcompat/res/values-w480dp/bools.xml similarity index 100% rename from appcompat/res/values-w480dp/bools.xml rename to eclipse-compile/appcompat/res/values-w480dp/bools.xml diff --git a/appcompat/res/values-w480dp/config.xml b/eclipse-compile/appcompat/res/values-w480dp/config.xml similarity index 100% rename from appcompat/res/values-w480dp/config.xml rename to eclipse-compile/appcompat/res/values-w480dp/config.xml diff --git a/appcompat/res/values-w500dp/dimens.xml b/eclipse-compile/appcompat/res/values-w500dp/dimens.xml similarity index 100% rename from appcompat/res/values-w500dp/dimens.xml rename to eclipse-compile/appcompat/res/values-w500dp/dimens.xml diff --git a/appcompat/res/values-w600dp/dimens.xml b/eclipse-compile/appcompat/res/values-w600dp/dimens.xml similarity index 100% rename from appcompat/res/values-w600dp/dimens.xml rename to eclipse-compile/appcompat/res/values-w600dp/dimens.xml diff --git a/appcompat/res/values-w720dp/bools.xml b/eclipse-compile/appcompat/res/values-w720dp/bools.xml similarity index 100% rename from appcompat/res/values-w720dp/bools.xml rename to eclipse-compile/appcompat/res/values-w720dp/bools.xml diff --git a/appcompat/res/values-xlarge-land/dimens.xml b/eclipse-compile/appcompat/res/values-xlarge-land/dimens.xml similarity index 100% rename from appcompat/res/values-xlarge-land/dimens.xml rename to eclipse-compile/appcompat/res/values-xlarge-land/dimens.xml diff --git a/appcompat/res/values-xlarge/bools.xml b/eclipse-compile/appcompat/res/values-xlarge/bools.xml similarity index 100% rename from appcompat/res/values-xlarge/bools.xml rename to eclipse-compile/appcompat/res/values-xlarge/bools.xml diff --git a/appcompat/res/values-xlarge/dimens.xml b/eclipse-compile/appcompat/res/values-xlarge/dimens.xml similarity index 100% rename from appcompat/res/values-xlarge/dimens.xml rename to eclipse-compile/appcompat/res/values-xlarge/dimens.xml diff --git a/appcompat/res/values-zh-rCN/strings.xml b/eclipse-compile/appcompat/res/values-zh-rCN/strings.xml similarity index 100% rename from appcompat/res/values-zh-rCN/strings.xml rename to eclipse-compile/appcompat/res/values-zh-rCN/strings.xml diff --git a/appcompat/res/values-zh-rHK/strings.xml b/eclipse-compile/appcompat/res/values-zh-rHK/strings.xml similarity index 100% rename from appcompat/res/values-zh-rHK/strings.xml rename to eclipse-compile/appcompat/res/values-zh-rHK/strings.xml diff --git a/appcompat/res/values-zh-rTW/strings.xml b/eclipse-compile/appcompat/res/values-zh-rTW/strings.xml similarity index 100% rename from appcompat/res/values-zh-rTW/strings.xml rename to eclipse-compile/appcompat/res/values-zh-rTW/strings.xml diff --git a/appcompat/res/values-zu/strings.xml b/eclipse-compile/appcompat/res/values-zu/strings.xml similarity index 100% rename from appcompat/res/values-zu/strings.xml rename to eclipse-compile/appcompat/res/values-zu/strings.xml diff --git a/appcompat/res/values/attrs.xml b/eclipse-compile/appcompat/res/values/attrs.xml similarity index 100% rename from appcompat/res/values/attrs.xml rename to eclipse-compile/appcompat/res/values/attrs.xml diff --git a/appcompat/res/values/bools.xml b/eclipse-compile/appcompat/res/values/bools.xml similarity index 100% rename from appcompat/res/values/bools.xml rename to eclipse-compile/appcompat/res/values/bools.xml diff --git a/appcompat/res/values/colors.xml b/eclipse-compile/appcompat/res/values/colors.xml similarity index 100% rename from appcompat/res/values/colors.xml rename to eclipse-compile/appcompat/res/values/colors.xml diff --git a/appcompat/res/values/colors_material.xml b/eclipse-compile/appcompat/res/values/colors_material.xml similarity index 100% rename from appcompat/res/values/colors_material.xml rename to eclipse-compile/appcompat/res/values/colors_material.xml diff --git a/appcompat/res/values/config.xml b/eclipse-compile/appcompat/res/values/config.xml similarity index 100% rename from appcompat/res/values/config.xml rename to eclipse-compile/appcompat/res/values/config.xml diff --git a/appcompat/res/values/dimens.xml b/eclipse-compile/appcompat/res/values/dimens.xml similarity index 100% rename from appcompat/res/values/dimens.xml rename to eclipse-compile/appcompat/res/values/dimens.xml diff --git a/appcompat/res/values/dimens_material.xml b/eclipse-compile/appcompat/res/values/dimens_material.xml similarity index 100% rename from appcompat/res/values/dimens_material.xml rename to eclipse-compile/appcompat/res/values/dimens_material.xml diff --git a/appcompat/res/values/ids.xml b/eclipse-compile/appcompat/res/values/ids.xml similarity index 100% rename from appcompat/res/values/ids.xml rename to eclipse-compile/appcompat/res/values/ids.xml diff --git a/appcompat/res/values/strings.xml b/eclipse-compile/appcompat/res/values/strings.xml similarity index 100% rename from appcompat/res/values/strings.xml rename to eclipse-compile/appcompat/res/values/strings.xml diff --git a/appcompat/res/values/styles.xml b/eclipse-compile/appcompat/res/values/styles.xml similarity index 100% rename from appcompat/res/values/styles.xml rename to eclipse-compile/appcompat/res/values/styles.xml diff --git a/appcompat/res/values/styles_base.xml b/eclipse-compile/appcompat/res/values/styles_base.xml similarity index 100% rename from appcompat/res/values/styles_base.xml rename to eclipse-compile/appcompat/res/values/styles_base.xml diff --git a/appcompat/res/values/styles_base_text.xml b/eclipse-compile/appcompat/res/values/styles_base_text.xml similarity index 100% rename from appcompat/res/values/styles_base_text.xml rename to eclipse-compile/appcompat/res/values/styles_base_text.xml diff --git a/appcompat/res/values/styles_rtl.xml b/eclipse-compile/appcompat/res/values/styles_rtl.xml similarity index 100% rename from appcompat/res/values/styles_rtl.xml rename to eclipse-compile/appcompat/res/values/styles_rtl.xml diff --git a/appcompat/res/values/themes.xml b/eclipse-compile/appcompat/res/values/themes.xml similarity index 100% rename from appcompat/res/values/themes.xml rename to eclipse-compile/appcompat/res/values/themes.xml diff --git a/appcompat/res/values/themes_base.xml b/eclipse-compile/appcompat/res/values/themes_base.xml similarity index 100% rename from appcompat/res/values/themes_base.xml rename to eclipse-compile/appcompat/res/values/themes_base.xml diff --git a/appcompat/src/.readme b/eclipse-compile/appcompat/src/.readme similarity index 100% rename from appcompat/src/.readme rename to eclipse-compile/appcompat/src/.readme diff --git a/plugins/OsmAnd-AddressPlugin/.classpath b/eclipse-compile/observable/.classpath similarity index 91% rename from plugins/OsmAnd-AddressPlugin/.classpath rename to eclipse-compile/observable/.classpath index 7bc01d9a9c..c6e9dc9f1d 100644 --- a/plugins/OsmAnd-AddressPlugin/.classpath +++ b/eclipse-compile/observable/.classpath @@ -1,9 +1,9 @@ - - + + diff --git a/eclipse-compile/observable/.gitignore b/eclipse-compile/observable/.gitignore new file mode 100755 index 0000000000..796b96d1c4 --- /dev/null +++ b/eclipse-compile/observable/.gitignore @@ -0,0 +1 @@ +/build diff --git a/plugins/OsmAnd-AddressPlugin/.project b/eclipse-compile/observable/.project similarity index 78% rename from plugins/OsmAnd-AddressPlugin/.project rename to eclipse-compile/observable/.project index e8967665b4..8258814f66 100644 --- a/plugins/OsmAnd-AddressPlugin/.project +++ b/eclipse-compile/observable/.project @@ -1,6 +1,6 @@ - OsmAnd-AddressPlugin + ListObservable @@ -25,9 +25,15 @@ + + org.eclipse.xtext.ui.shared.xtextBuilder + + + com.android.ide.eclipse.adt.AndroidNature org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature diff --git a/eclipse-compile/observable/AndroidManifest.xml b/eclipse-compile/observable/AndroidManifest.xml new file mode 100755 index 0000000000..2dc5b76674 --- /dev/null +++ b/eclipse-compile/observable/AndroidManifest.xml @@ -0,0 +1,17 @@ + + + diff --git a/eclipse-compile/observable/bin/AndroidManifest.xml b/eclipse-compile/observable/bin/AndroidManifest.xml new file mode 100644 index 0000000000..2dc5b76674 --- /dev/null +++ b/eclipse-compile/observable/bin/AndroidManifest.xml @@ -0,0 +1,17 @@ + + + diff --git a/eclipse-compile/observable/bin/R.txt b/eclipse-compile/observable/bin/R.txt new file mode 100644 index 0000000000..73f66eea75 --- /dev/null +++ b/eclipse-compile/observable/bin/R.txt @@ -0,0 +1,937 @@ +int anim abc_fade_in 0x7f040000 +int anim abc_fade_out 0x7f040001 +int anim abc_slide_in_bottom 0x7f040002 +int anim abc_slide_in_top 0x7f040003 +int anim abc_slide_out_bottom 0x7f040004 +int anim abc_slide_out_top 0x7f040005 +int attr actionBarDivider 0x7f010015 +int attr actionBarItemBackground 0x7f010016 +int attr actionBarPopupTheme 0x7f01000f +int attr actionBarSize 0x7f010014 +int attr actionBarSplitStyle 0x7f010011 +int attr actionBarStyle 0x7f010010 +int attr actionBarTabBarStyle 0x7f01000b +int attr actionBarTabStyle 0x7f01000a +int attr actionBarTabTextStyle 0x7f01000c +int attr actionBarTheme 0x7f010012 +int attr actionBarWidgetTheme 0x7f010013 +int attr actionButtonStyle 0x7f01002d +int attr actionDropDownStyle 0x7f010028 +int attr actionLayout 0x7f010072 +int attr actionMenuTextAppearance 0x7f010017 +int attr actionMenuTextColor 0x7f010018 +int attr actionModeBackground 0x7f01001b +int attr actionModeCloseButtonStyle 0x7f01001a +int attr actionModeCloseDrawable 0x7f01001d +int attr actionModeCopyDrawable 0x7f01001f +int attr actionModeCutDrawable 0x7f01001e +int attr actionModeFindDrawable 0x7f010023 +int attr actionModePasteDrawable 0x7f010020 +int attr actionModePopupWindowStyle 0x7f010025 +int attr actionModeSelectAllDrawable 0x7f010021 +int attr actionModeShareDrawable 0x7f010022 +int attr actionModeSplitBackground 0x7f01001c +int attr actionModeStyle 0x7f010019 +int attr actionModeWebSearchDrawable 0x7f010024 +int attr actionOverflowButtonStyle 0x7f01000d +int attr actionOverflowMenuStyle 0x7f01000e +int attr actionProviderClass 0x7f010074 +int attr actionViewClass 0x7f010073 +int attr activityChooserViewStyle 0x7f010034 +int attr background 0x7f01005d +int attr backgroundSplit 0x7f01005f +int attr backgroundStacked 0x7f01005e +int attr barSize 0x7f01009f +int attr buttonBarButtonStyle 0x7f01002f +int attr buttonBarStyle 0x7f01002e +int attr closeIcon 0x7f01007c +int attr closeItemLayout 0x7f01006d +int attr collapseContentDescription 0x7f010094 +int attr collapseIcon 0x7f010093 +int attr color 0x7f010099 +int attr colorAccent 0x7f01004f +int attr colorButtonNormal 0x7f010053 +int attr colorControlActivated 0x7f010051 +int attr colorControlHighlight 0x7f010052 +int attr colorControlNormal 0x7f010050 +int attr colorPrimary 0x7f01004d +int attr colorPrimaryDark 0x7f01004e +int attr colorSwitchThumbNormal 0x7f010054 +int attr commitIcon 0x7f010080 +int attr contentInsetEnd 0x7f010068 +int attr contentInsetLeft 0x7f010069 +int attr contentInsetRight 0x7f01006a +int attr contentInsetStart 0x7f010067 +int attr customNavigationLayout 0x7f010060 +int attr disableChildrenWhenDisabled 0x7f010078 +int attr displayOptions 0x7f010056 +int attr divider 0x7f01005c +int attr dividerHorizontal 0x7f010033 +int attr dividerPadding 0x7f010089 +int attr dividerVertical 0x7f010032 +int attr drawableSize 0x7f01009b +int attr drawerArrowStyle 0x7f0100a1 +int attr dropDownListViewStyle 0x7f010045 +int attr dropdownListPreferredItemHeight 0x7f010029 +int attr editTextBackground 0x7f01003a +int attr editTextColor 0x7f010039 +int attr elevation 0x7f01006b +int attr expandActivityOverflowButtonDrawable 0x7f010085 +int attr gapBetweenBars 0x7f01009c +int attr goIcon 0x7f01007d +int attr height 0x7f010001 +int attr hideOnContentScroll 0x7f010066 +int attr homeAsUpIndicator 0x7f01002c +int attr homeLayout 0x7f010061 +int attr icon 0x7f01005a +int attr iconifiedByDefault 0x7f01007a +int attr indeterminateProgressStyle 0x7f010063 +int attr initialActivityCount 0x7f010084 +int attr isLightTheme 0x7f010002 +int attr itemPadding 0x7f010065 +int attr layout 0x7f010079 +int attr listChoiceBackgroundIndicator 0x7f01004c +int attr listPopupWindowStyle 0x7f010046 +int attr listPreferredItemHeight 0x7f010040 +int attr listPreferredItemHeightLarge 0x7f010042 +int attr listPreferredItemHeightSmall 0x7f010041 +int attr listPreferredItemPaddingLeft 0x7f010043 +int attr listPreferredItemPaddingRight 0x7f010044 +int attr logo 0x7f01005b +int attr maxButtonHeight 0x7f010091 +int attr measureWithLargestChild 0x7f010087 +int attr middleBarArrowSize 0x7f01009e +int attr navigationContentDescription 0x7f010096 +int attr navigationIcon 0x7f010095 +int attr navigationMode 0x7f010055 +int attr overlapAnchor 0x7f010098 +int attr paddingEnd 0x7f01006f +int attr paddingStart 0x7f01006e +int attr panelBackground 0x7f010049 +int attr panelMenuListTheme 0x7f01004b +int attr panelMenuListWidth 0x7f01004a +int attr popupMenuStyle 0x7f010037 +int attr popupPromptView 0x7f010077 +int attr popupTheme 0x7f01006c +int attr popupWindowStyle 0x7f010038 +int attr preserveIconSpacing 0x7f010070 +int attr progressBarPadding 0x7f010064 +int attr progressBarStyle 0x7f010062 +int attr prompt 0x7f010075 +int attr queryBackground 0x7f010082 +int attr queryHint 0x7f01007b +int attr searchIcon 0x7f01007e +int attr searchViewStyle 0x7f01003f +int attr selectableItemBackground 0x7f010030 +int attr selectableItemBackgroundBorderless 0x7f010031 +int attr showAsAction 0x7f010071 +int attr showDividers 0x7f010088 +int attr showText 0x7f0100a8 +int attr spinBars 0x7f01009a +int attr spinnerDropDownItemStyle 0x7f01002b +int attr spinnerMode 0x7f010076 +int attr spinnerStyle 0x7f01002a +int attr splitTrack 0x7f0100a7 +int attr state_above_anchor 0x7f010097 +int attr submitBackground 0x7f010083 +int attr subtitle 0x7f010057 +int attr subtitleTextAppearance 0x7f01008b +int attr subtitleTextStyle 0x7f010059 +int attr suggestionRowLayout 0x7f010081 +int attr switchMinWidth 0x7f0100a5 +int attr switchPadding 0x7f0100a6 +int attr switchStyle 0x7f01003b +int attr switchTextAppearance 0x7f0100a4 +int attr textAllCaps 0x7f010086 +int attr textAppearanceLargePopupMenu 0x7f010026 +int attr textAppearanceListItem 0x7f010047 +int attr textAppearanceListItemSmall 0x7f010048 +int attr textAppearanceSearchResultSubtitle 0x7f01003d +int attr textAppearanceSearchResultTitle 0x7f01003c +int attr textAppearanceSmallPopupMenu 0x7f010027 +int attr textColorSearchUrl 0x7f01003e +int attr theme 0x7f010092 +int attr thickness 0x7f0100a0 +int attr thumbTextPadding 0x7f0100a3 +int attr title 0x7f010000 +int attr titleMarginBottom 0x7f010090 +int attr titleMarginEnd 0x7f01008e +int attr titleMarginStart 0x7f01008d +int attr titleMarginTop 0x7f01008f +int attr titleMargins 0x7f01008c +int attr titleTextAppearance 0x7f01008a +int attr titleTextStyle 0x7f010058 +int attr toolbarNavigationButtonStyle 0x7f010036 +int attr toolbarStyle 0x7f010035 +int attr topBottomBarArrowSize 0x7f01009d +int attr track 0x7f0100a2 +int attr voiceIcon 0x7f01007f +int attr windowActionBar 0x7f010003 +int attr windowActionBarOverlay 0x7f010004 +int attr windowActionModeOverlay 0x7f010005 +int attr windowFixedHeightMajor 0x7f010009 +int attr windowFixedHeightMinor 0x7f010007 +int attr windowFixedWidthMajor 0x7f010006 +int attr windowFixedWidthMinor 0x7f010008 +int bool abc_action_bar_embed_tabs 0x7f050000 +int bool abc_action_bar_embed_tabs_pre_jb 0x7f050001 +int bool abc_action_bar_expanded_action_views_exclusive 0x7f050002 +int bool abc_config_actionMenuItemAllCaps 0x7f050005 +int bool abc_config_allowActionMenuItemTextWithIcon 0x7f050004 +int bool abc_config_showMenuShortcutsWhenKeyboardPresent 0x7f050003 +int color abc_background_cache_hint_selector_material_dark 0x7f060031 +int color abc_background_cache_hint_selector_material_light 0x7f060032 +int color abc_input_method_navigation_guard 0x7f060003 +int color abc_primary_text_disable_only_material_dark 0x7f060033 +int color abc_primary_text_disable_only_material_light 0x7f060034 +int color abc_primary_text_material_dark 0x7f060035 +int color abc_primary_text_material_light 0x7f060036 +int color abc_search_url_text 0x7f060037 +int color abc_search_url_text_normal 0x7f060000 +int color abc_search_url_text_pressed 0x7f060002 +int color abc_search_url_text_selected 0x7f060001 +int color abc_secondary_text_material_dark 0x7f060038 +int color abc_secondary_text_material_light 0x7f060039 +int color accent_material_dark 0x7f06000f +int color accent_material_light 0x7f06000e +int color background_floating_material_dark 0x7f060006 +int color background_floating_material_light 0x7f060007 +int color background_material_dark 0x7f060004 +int color background_material_light 0x7f060005 +int color bright_foreground_disabled_material_dark 0x7f060016 +int color bright_foreground_disabled_material_light 0x7f060017 +int color bright_foreground_inverse_material_dark 0x7f060018 +int color bright_foreground_inverse_material_light 0x7f060019 +int color bright_foreground_material_dark 0x7f060014 +int color bright_foreground_material_light 0x7f060015 +int color button_material_dark 0x7f060010 +int color button_material_light 0x7f060011 +int color dim_foreground_disabled_material_dark 0x7f06001c +int color dim_foreground_disabled_material_light 0x7f06001d +int color dim_foreground_material_dark 0x7f06001a +int color dim_foreground_material_light 0x7f06001b +int color highlighted_text_material_dark 0x7f060020 +int color highlighted_text_material_light 0x7f060021 +int color hint_foreground_material_dark 0x7f06001e +int color hint_foreground_material_light 0x7f06001f +int color link_text_material_dark 0x7f060022 +int color link_text_material_light 0x7f060023 +int color material_blue_grey_800 0x7f06002e +int color material_blue_grey_900 0x7f06002f +int color material_blue_grey_950 0x7f060030 +int color material_deep_teal_200 0x7f06002c +int color material_deep_teal_500 0x7f06002d +int color primary_dark_material_dark 0x7f06000a +int color primary_dark_material_light 0x7f06000b +int color primary_material_dark 0x7f060008 +int color primary_material_light 0x7f060009 +int color primary_text_default_material_dark 0x7f060026 +int color primary_text_default_material_light 0x7f060024 +int color primary_text_disabled_material_dark 0x7f06002a +int color primary_text_disabled_material_light 0x7f060028 +int color ripple_material_dark 0x7f06000c +int color ripple_material_light 0x7f06000d +int color secondary_text_default_material_dark 0x7f060027 +int color secondary_text_default_material_light 0x7f060025 +int color secondary_text_disabled_material_dark 0x7f06002b +int color secondary_text_disabled_material_light 0x7f060029 +int color switch_thumb_normal_material_dark 0x7f060012 +int color switch_thumb_normal_material_light 0x7f060013 +int dimen abc_action_bar_default_height_material 0x7f070014 +int dimen abc_action_bar_default_padding_material 0x7f070015 +int dimen abc_action_bar_icon_vertical_padding_material 0x7f070016 +int dimen abc_action_bar_progress_bar_size 0x7f070005 +int dimen abc_action_bar_stacked_max_height 0x7f070004 +int dimen abc_action_bar_stacked_tab_max_width 0x7f070003 +int dimen abc_action_bar_subtitle_bottom_margin_material 0x7f070018 +int dimen abc_action_bar_subtitle_top_margin_material 0x7f070017 +int dimen abc_action_button_min_height_material 0x7f07001b +int dimen abc_action_button_min_width_material 0x7f07001a +int dimen abc_action_button_min_width_overflow_material 0x7f070019 +int dimen abc_config_prefDialogWidth 0x7f070002 +int dimen abc_control_inset_material 0x7f070010 +int dimen abc_control_padding_material 0x7f070011 +int dimen abc_dropdownitem_icon_width 0x7f07000b +int dimen abc_dropdownitem_text_padding_left 0x7f070009 +int dimen abc_dropdownitem_text_padding_right 0x7f07000a +int dimen abc_panel_menu_list_width 0x7f070006 +int dimen abc_search_view_preferred_width 0x7f070008 +int dimen abc_search_view_text_min_width 0x7f070007 +int dimen abc_text_size_body_1_material 0x7f070025 +int dimen abc_text_size_body_2_material 0x7f070024 +int dimen abc_text_size_button_material 0x7f070027 +int dimen abc_text_size_caption_material 0x7f070026 +int dimen abc_text_size_display_1_material 0x7f07001f +int dimen abc_text_size_display_2_material 0x7f07001e +int dimen abc_text_size_display_3_material 0x7f07001d +int dimen abc_text_size_display_4_material 0x7f07001c +int dimen abc_text_size_headline_material 0x7f070020 +int dimen abc_text_size_large_material 0x7f070028 +int dimen abc_text_size_medium_material 0x7f070029 +int dimen abc_text_size_menu_material 0x7f070023 +int dimen abc_text_size_small_material 0x7f07002a +int dimen abc_text_size_subhead_material 0x7f070022 +int dimen abc_text_size_subtitle_material_toolbar 0x7f070013 +int dimen abc_text_size_title_material 0x7f070021 +int dimen abc_text_size_title_material_toolbar 0x7f070012 +int dimen dialog_fixed_height_major 0x7f07000e +int dimen dialog_fixed_height_minor 0x7f07000f +int dimen dialog_fixed_width_major 0x7f07000c +int dimen dialog_fixed_width_minor 0x7f07000d +int dimen disabled_alpha_material_dark 0x7f070001 +int dimen disabled_alpha_material_light 0x7f070000 +int drawable abc_ab_share_pack_holo_dark 0x7f020000 +int drawable abc_ab_share_pack_holo_light 0x7f020001 +int drawable abc_btn_check_material 0x7f020002 +int drawable abc_btn_check_to_on_mtrl_000 0x7f020003 +int drawable abc_btn_check_to_on_mtrl_015 0x7f020004 +int drawable abc_btn_radio_material 0x7f020005 +int drawable abc_btn_radio_to_on_mtrl_000 0x7f020006 +int drawable abc_btn_radio_to_on_mtrl_015 0x7f020007 +int drawable abc_btn_switch_to_on_mtrl_00001 0x7f020008 +int drawable abc_btn_switch_to_on_mtrl_00012 0x7f020009 +int drawable abc_cab_background_internal_bg 0x7f02000a +int drawable abc_cab_background_top_material 0x7f02000b +int drawable abc_cab_background_top_mtrl_alpha 0x7f02000c +int drawable abc_edit_text_material 0x7f02000d +int drawable abc_ic_ab_back_mtrl_am_alpha 0x7f02000e +int drawable abc_ic_clear_mtrl_alpha 0x7f02000f +int drawable abc_ic_commit_search_api_mtrl_alpha 0x7f020010 +int drawable abc_ic_go_search_api_mtrl_alpha 0x7f020011 +int drawable abc_ic_menu_copy_mtrl_am_alpha 0x7f020012 +int drawable abc_ic_menu_cut_mtrl_alpha 0x7f020013 +int drawable abc_ic_menu_moreoverflow_mtrl_alpha 0x7f020014 +int drawable abc_ic_menu_paste_mtrl_am_alpha 0x7f020015 +int drawable abc_ic_menu_selectall_mtrl_alpha 0x7f020016 +int drawable abc_ic_menu_share_mtrl_alpha 0x7f020017 +int drawable abc_ic_search_api_mtrl_alpha 0x7f020018 +int drawable abc_ic_voice_search_api_mtrl_alpha 0x7f020019 +int drawable abc_item_background_holo_dark 0x7f02001a +int drawable abc_item_background_holo_light 0x7f02001b +int drawable abc_list_divider_mtrl_alpha 0x7f02001c +int drawable abc_list_focused_holo 0x7f02001d +int drawable abc_list_longpressed_holo 0x7f02001e +int drawable abc_list_pressed_holo_dark 0x7f02001f +int drawable abc_list_pressed_holo_light 0x7f020020 +int drawable abc_list_selector_background_transition_holo_dark 0x7f020021 +int drawable abc_list_selector_background_transition_holo_light 0x7f020022 +int drawable abc_list_selector_disabled_holo_dark 0x7f020023 +int drawable abc_list_selector_disabled_holo_light 0x7f020024 +int drawable abc_list_selector_holo_dark 0x7f020025 +int drawable abc_list_selector_holo_light 0x7f020026 +int drawable abc_menu_hardkey_panel_mtrl_mult 0x7f020027 +int drawable abc_popup_background_mtrl_mult 0x7f020028 +int drawable abc_spinner_mtrl_am_alpha 0x7f020029 +int drawable abc_switch_thumb_material 0x7f02002a +int drawable abc_switch_track_mtrl_alpha 0x7f02002b +int drawable abc_tab_indicator_material 0x7f02002c +int drawable abc_tab_indicator_mtrl_alpha 0x7f02002d +int drawable abc_textfield_activated_mtrl_alpha 0x7f02002e +int drawable abc_textfield_default_mtrl_alpha 0x7f02002f +int drawable abc_textfield_search_activated_mtrl_alpha 0x7f020030 +int drawable abc_textfield_search_default_mtrl_alpha 0x7f020031 +int drawable abc_textfield_search_material 0x7f020032 +int id action_bar 0x7f090031 +int id action_bar_activity_content 0x7f090003 +int id action_bar_container 0x7f090030 +int id action_bar_root 0x7f09002c +int id action_bar_spinner 0x7f090002 +int id action_bar_subtitle 0x7f09001f +int id action_bar_title 0x7f09001e +int id action_context_bar 0x7f090032 +int id action_menu_divider 0x7f090005 +int id action_menu_presenter 0x7f090006 +int id action_mode_bar 0x7f09002e +int id action_mode_bar_stub 0x7f09002d +int id action_mode_close_button 0x7f090020 +int id activity_chooser_view_content 0x7f090021 +int id always 0x7f090014 +int id beginning 0x7f09001b +int id checkbox 0x7f090029 +int id collapseActionView 0x7f090015 +int id decor_content_parent 0x7f09002f +int id default_activity_button 0x7f090024 +int id dialog 0x7f090019 +int id disableHome 0x7f09000d +int id dropdown 0x7f09001a +int id edit_query 0x7f090033 +int id end 0x7f09001c +int id expand_activities_button 0x7f090022 +int id expanded_menu 0x7f090028 +int id home 0x7f090000 +int id homeAsUp 0x7f09000e +int id icon 0x7f090026 +int id ifRoom 0x7f090016 +int id image 0x7f090023 +int id listMode 0x7f09000a +int id list_item 0x7f090025 +int id middle 0x7f09001d +int id never 0x7f090017 +int id none 0x7f09000f +int id normal 0x7f09000b +int id progress_circular 0x7f090007 +int id progress_horizontal 0x7f090008 +int id radio 0x7f09002b +int id search_badge 0x7f090035 +int id search_bar 0x7f090034 +int id search_button 0x7f090036 +int id search_close_btn 0x7f09003b +int id search_edit_frame 0x7f090037 +int id search_go_btn 0x7f09003d +int id search_mag_icon 0x7f090038 +int id search_plate 0x7f090039 +int id search_src_text 0x7f09003a +int id search_voice_btn 0x7f09003e +int id shortcut 0x7f09002a +int id showCustom 0x7f090010 +int id showHome 0x7f090011 +int id showTitle 0x7f090012 +int id split_action_bar 0x7f090004 +int id submit_area 0x7f09003c +int id tabMode 0x7f09000c +int id title 0x7f090027 +int id up 0x7f090001 +int id useLogo 0x7f090013 +int id withText 0x7f090018 +int id wrap_content 0x7f090009 +int integer abc_max_action_buttons 0x7f080000 +int layout abc_action_bar_title_item 0x7f030000 +int layout abc_action_bar_up_container 0x7f030001 +int layout abc_action_bar_view_list_nav_layout 0x7f030002 +int layout abc_action_menu_item_layout 0x7f030003 +int layout abc_action_menu_layout 0x7f030004 +int layout abc_action_mode_bar 0x7f030005 +int layout abc_action_mode_close_item_material 0x7f030006 +int layout abc_activity_chooser_view 0x7f030007 +int layout abc_activity_chooser_view_include 0x7f030008 +int layout abc_activity_chooser_view_list_item 0x7f030009 +int layout abc_expanded_menu_layout 0x7f03000a +int layout abc_list_menu_item_checkbox 0x7f03000b +int layout abc_list_menu_item_icon 0x7f03000c +int layout abc_list_menu_item_layout 0x7f03000d +int layout abc_list_menu_item_radio 0x7f03000e +int layout abc_popup_menu_item_layout 0x7f03000f +int layout abc_screen_content_include 0x7f030010 +int layout abc_screen_simple 0x7f030011 +int layout abc_screen_simple_overlay_action_mode 0x7f030012 +int layout abc_screen_toolbar 0x7f030013 +int layout abc_search_dropdown_item_icons_2line 0x7f030014 +int layout abc_search_view 0x7f030015 +int layout abc_simple_dropdown_hint 0x7f030016 +int layout support_simple_spinner_dropdown_item 0x7f030017 +int string abc_action_bar_home_description 0x7f0a0001 +int string abc_action_bar_home_description_format 0x7f0a0005 +int string abc_action_bar_home_subtitle_description_format 0x7f0a0006 +int string abc_action_bar_up_description 0x7f0a0002 +int string abc_action_menu_overflow_description 0x7f0a0003 +int string abc_action_mode_done 0x7f0a0000 +int string abc_activity_chooser_view_see_all 0x7f0a000d +int string abc_activitychooserview_choose_application 0x7f0a000c +int string abc_searchview_description_clear 0x7f0a0009 +int string abc_searchview_description_query 0x7f0a0008 +int string abc_searchview_description_search 0x7f0a0007 +int string abc_searchview_description_submit 0x7f0a000a +int string abc_searchview_description_voice 0x7f0a000b +int string abc_shareactionprovider_share_with 0x7f0a000f +int string abc_shareactionprovider_share_with_application 0x7f0a000e +int string abc_toolbar_collapse_description 0x7f0a0004 +int style Base_TextAppearance_AppCompat 0x7f0b0098 +int style Base_TextAppearance_AppCompat_Body1 0x7f0b00a3 +int style Base_TextAppearance_AppCompat_Body2 0x7f0b00a2 +int style Base_TextAppearance_AppCompat_Button 0x7f0b00a6 +int style Base_TextAppearance_AppCompat_Caption 0x7f0b00a4 +int style Base_TextAppearance_AppCompat_Display1 0x7f0b009c +int style Base_TextAppearance_AppCompat_Display2 0x7f0b009b +int style Base_TextAppearance_AppCompat_Display3 0x7f0b009a +int style Base_TextAppearance_AppCompat_Display4 0x7f0b0099 +int style Base_TextAppearance_AppCompat_Headline 0x7f0b009d +int style Base_TextAppearance_AppCompat_Inverse 0x7f0b00a7 +int style Base_TextAppearance_AppCompat_Large 0x7f0b00a8 +int style Base_TextAppearance_AppCompat_Large_Inverse 0x7f0b00a9 +int style Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Large 0x7f0b0085 +int style Base_TextAppearance_AppCompat_Light_Widget_PopupMenu_Small 0x7f0b0086 +int style Base_TextAppearance_AppCompat_Medium 0x7f0b00aa +int style Base_TextAppearance_AppCompat_Medium_Inverse 0x7f0b00ab +int style Base_TextAppearance_AppCompat_Menu 0x7f0b00a5 +int style Base_TextAppearance_AppCompat_SearchResult 0x7f0b0087 +int style Base_TextAppearance_AppCompat_SearchResult_Subtitle 0x7f0b0089 +int style Base_TextAppearance_AppCompat_SearchResult_Title 0x7f0b0088 +int style Base_TextAppearance_AppCompat_Small 0x7f0b00ac +int style Base_TextAppearance_AppCompat_Small_Inverse 0x7f0b00ad +int style Base_TextAppearance_AppCompat_Subhead 0x7f0b00a0 +int style Base_TextAppearance_AppCompat_Subhead_Inverse 0x7f0b00a1 +int style Base_TextAppearance_AppCompat_Title 0x7f0b009e +int style Base_TextAppearance_AppCompat_Title_Inverse 0x7f0b009f +int style Base_TextAppearance_AppCompat_Widget_ActionBar_Menu 0x7f0b0070 +int style Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle 0x7f0b0072 +int style Base_TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse 0x7f0b0074 +int style Base_TextAppearance_AppCompat_Widget_ActionBar_Title 0x7f0b0071 +int style Base_TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse 0x7f0b0073 +int style Base_TextAppearance_AppCompat_Widget_ActionMode_Subtitle 0x7f0b006f +int style Base_TextAppearance_AppCompat_Widget_ActionMode_Title 0x7f0b006e +int style Base_TextAppearance_AppCompat_Widget_DropDownItem 0x7f0b007b +int style Base_TextAppearance_AppCompat_Widget_PopupMenu_Large 0x7f0b0083 +int style Base_TextAppearance_AppCompat_Widget_PopupMenu_Small 0x7f0b0084 +int style Base_TextAppearance_AppCompat_Widget_Switch 0x7f0b0097 +int style Base_TextAppearance_Widget_AppCompat_ExpandedMenu_Item 0x7f0b007c +int style Base_TextAppearance_Widget_AppCompat_Toolbar_Subtitle 0x7f0b0092 +int style Base_TextAppearance_Widget_AppCompat_Toolbar_Title 0x7f0b0091 +int style Base_Theme_AppCompat 0x7f0b00cf +int style Base_Theme_AppCompat_CompactMenu 0x7f0b00d2 +int style Base_Theme_AppCompat_Dialog 0x7f0b00d4 +int style Base_Theme_AppCompat_Dialog_FixedSize 0x7f0b00d6 +int style Base_Theme_AppCompat_DialogWhenLarge 0x7f0b00d8 +int style Base_Theme_AppCompat_Light 0x7f0b00d0 +int style Base_Theme_AppCompat_Light_DarkActionBar 0x7f0b00d1 +int style Base_Theme_AppCompat_Light_Dialog 0x7f0b00d5 +int style Base_Theme_AppCompat_Light_Dialog_FixedSize 0x7f0b00d7 +int style Base_Theme_AppCompat_Light_DialogWhenLarge 0x7f0b00d9 +int style Base_ThemeOverlay_AppCompat 0x7f0b00da +int style Base_ThemeOverlay_AppCompat_ActionBar 0x7f0b00dd +int style Base_ThemeOverlay_AppCompat_Dark 0x7f0b00dc +int style Base_ThemeOverlay_AppCompat_Dark_ActionBar 0x7f0b00de +int style Base_ThemeOverlay_AppCompat_Light 0x7f0b00db +int style Base_V11_Theme_AppCompat 0x7f0b00df +int style Base_V11_Theme_AppCompat_Dialog 0x7f0b00e1 +int style Base_V11_Theme_AppCompat_Light 0x7f0b00e0 +int style Base_V11_Theme_AppCompat_Light_Dialog 0x7f0b00e2 +int style Base_V14_Theme_AppCompat 0x7f0b00e3 +int style Base_V14_Theme_AppCompat_Dialog 0x7f0b00e5 +int style Base_V14_Theme_AppCompat_Light 0x7f0b00e4 +int style Base_V14_Theme_AppCompat_Light_Dialog 0x7f0b00e6 +int style Base_V21_Theme_AppCompat 0x7f0b00e7 +int style Base_V21_Theme_AppCompat_Dialog 0x7f0b00e9 +int style Base_V21_Theme_AppCompat_Light 0x7f0b00e8 +int style Base_V21_Theme_AppCompat_Light_Dialog 0x7f0b00ea +int style Base_V7_Theme_AppCompat 0x7f0b00cd +int style Base_V7_Theme_AppCompat_Dialog 0x7f0b00d3 +int style Base_V7_Theme_AppCompat_Light 0x7f0b00ce +int style Base_Widget_AppCompat_ActionBar 0x7f0b005f +int style Base_Widget_AppCompat_ActionBar_Solid 0x7f0b0061 +int style Base_Widget_AppCompat_ActionBar_TabBar 0x7f0b0066 +int style Base_Widget_AppCompat_ActionBar_TabText 0x7f0b006a +int style Base_Widget_AppCompat_ActionBar_TabView 0x7f0b0068 +int style Base_Widget_AppCompat_ActionButton 0x7f0b0063 +int style Base_Widget_AppCompat_ActionButton_CloseMode 0x7f0b0064 +int style Base_Widget_AppCompat_ActionButton_Overflow 0x7f0b0065 +int style Base_Widget_AppCompat_ActionMode 0x7f0b006d +int style Base_Widget_AppCompat_ActivityChooserView 0x7f0b008c +int style Base_Widget_AppCompat_AutoCompleteTextView 0x7f0b008a +int style Base_Widget_AppCompat_CompoundButton_Switch 0x7f0b0096 +int style Base_Widget_AppCompat_DrawerArrowToggle 0x7f0b0095 +int style Base_Widget_AppCompat_DropDownItem_Spinner 0x7f0b0079 +int style Base_Widget_AppCompat_EditText 0x7f0b0094 +int style Base_Widget_AppCompat_Light_ActionBar 0x7f0b0060 +int style Base_Widget_AppCompat_Light_ActionBar_Solid 0x7f0b0062 +int style Base_Widget_AppCompat_Light_ActionBar_TabBar 0x7f0b0067 +int style Base_Widget_AppCompat_Light_ActionBar_TabText 0x7f0b006b +int style Base_Widget_AppCompat_Light_ActionBar_TabText_Inverse 0x7f0b006c +int style Base_Widget_AppCompat_Light_ActionBar_TabView 0x7f0b0069 +int style Base_Widget_AppCompat_Light_ActivityChooserView 0x7f0b008d +int style Base_Widget_AppCompat_Light_AutoCompleteTextView 0x7f0b008b +int style Base_Widget_AppCompat_Light_PopupMenu 0x7f0b0082 +int style Base_Widget_AppCompat_Light_PopupMenu_Overflow 0x7f0b0080 +int style Base_Widget_AppCompat_ListPopupWindow 0x7f0b007e +int style Base_Widget_AppCompat_ListView_DropDown 0x7f0b007a +int style Base_Widget_AppCompat_ListView_Menu 0x7f0b007d +int style Base_Widget_AppCompat_PopupMenu 0x7f0b0081 +int style Base_Widget_AppCompat_PopupMenu_Overflow 0x7f0b007f +int style Base_Widget_AppCompat_PopupWindow 0x7f0b008e +int style Base_Widget_AppCompat_ProgressBar 0x7f0b0076 +int style Base_Widget_AppCompat_ProgressBar_Horizontal 0x7f0b0075 +int style Base_Widget_AppCompat_SearchView 0x7f0b0093 +int style Base_Widget_AppCompat_Spinner 0x7f0b0077 +int style Base_Widget_AppCompat_Spinner_DropDown_ActionBar 0x7f0b0078 +int style Base_Widget_AppCompat_Toolbar 0x7f0b008f +int style Base_Widget_AppCompat_Toolbar_Button_Navigation 0x7f0b0090 +int style Platform_AppCompat 0x7f0b00c9 +int style Platform_AppCompat_Dialog 0x7f0b00cb +int style Platform_AppCompat_Light 0x7f0b00ca +int style Platform_AppCompat_Light_Dialog 0x7f0b00cc +int style RtlOverlay_Widget_AppCompat_ActionBar_TitleItem 0x7f0b00b4 +int style RtlOverlay_Widget_AppCompat_ActionButton_CloseMode 0x7f0b00b5 +int style RtlOverlay_Widget_AppCompat_ActionButton_Overflow 0x7f0b00b6 +int style RtlOverlay_Widget_AppCompat_PopupMenuItem 0x7f0b00b7 +int style RtlOverlay_Widget_AppCompat_PopupMenuItem_InternalGroup 0x7f0b00b8 +int style RtlOverlay_Widget_AppCompat_PopupMenuItem_Text 0x7f0b00b9 +int style RtlOverlay_Widget_AppCompat_Search_DropDown 0x7f0b00af +int style RtlOverlay_Widget_AppCompat_Search_DropDown_Icon1 0x7f0b00b1 +int style RtlOverlay_Widget_AppCompat_Search_DropDown_Icon2 0x7f0b00b2 +int style RtlOverlay_Widget_AppCompat_Search_DropDown_Query 0x7f0b00b0 +int style RtlOverlay_Widget_AppCompat_Search_DropDown_Text 0x7f0b00b3 +int style RtlOverlay_Widget_AppCompat_SearchView_MagIcon 0x7f0b00ae +int style TextAppearance_AppCompat 0x7f0b0038 +int style TextAppearance_AppCompat_Body1 0x7f0b0043 +int style TextAppearance_AppCompat_Body2 0x7f0b0042 +int style TextAppearance_AppCompat_Button 0x7f0b004d +int style TextAppearance_AppCompat_Caption 0x7f0b0044 +int style TextAppearance_AppCompat_Display1 0x7f0b003c +int style TextAppearance_AppCompat_Display2 0x7f0b003b +int style TextAppearance_AppCompat_Display3 0x7f0b003a +int style TextAppearance_AppCompat_Display4 0x7f0b0039 +int style TextAppearance_AppCompat_Headline 0x7f0b003d +int style TextAppearance_AppCompat_Inverse 0x7f0b0046 +int style TextAppearance_AppCompat_Large 0x7f0b0047 +int style TextAppearance_AppCompat_Large_Inverse 0x7f0b0048 +int style TextAppearance_AppCompat_Light_SearchResult_Subtitle 0x7f0b0053 +int style TextAppearance_AppCompat_Light_SearchResult_Title 0x7f0b0052 +int style TextAppearance_AppCompat_Light_Widget_PopupMenu_Large 0x7f0b0029 +int style TextAppearance_AppCompat_Light_Widget_PopupMenu_Small 0x7f0b002a +int style TextAppearance_AppCompat_Medium 0x7f0b0049 +int style TextAppearance_AppCompat_Medium_Inverse 0x7f0b004a +int style TextAppearance_AppCompat_Menu 0x7f0b0045 +int style TextAppearance_AppCompat_SearchResult_Subtitle 0x7f0b002c +int style TextAppearance_AppCompat_SearchResult_Title 0x7f0b002b +int style TextAppearance_AppCompat_Small 0x7f0b004b +int style TextAppearance_AppCompat_Small_Inverse 0x7f0b004c +int style TextAppearance_AppCompat_Subhead 0x7f0b0040 +int style TextAppearance_AppCompat_Subhead_Inverse 0x7f0b0041 +int style TextAppearance_AppCompat_Title 0x7f0b003e +int style TextAppearance_AppCompat_Title_Inverse 0x7f0b003f +int style TextAppearance_AppCompat_Widget_ActionBar_Menu 0x7f0b0015 +int style TextAppearance_AppCompat_Widget_ActionBar_Subtitle 0x7f0b0005 +int style TextAppearance_AppCompat_Widget_ActionBar_Subtitle_Inverse 0x7f0b0007 +int style TextAppearance_AppCompat_Widget_ActionBar_Title 0x7f0b0004 +int style TextAppearance_AppCompat_Widget_ActionBar_Title_Inverse 0x7f0b0006 +int style TextAppearance_AppCompat_Widget_ActionMode_Subtitle 0x7f0b0018 +int style TextAppearance_AppCompat_Widget_ActionMode_Subtitle_Inverse 0x7f0b0056 +int style TextAppearance_AppCompat_Widget_ActionMode_Title 0x7f0b0017 +int style TextAppearance_AppCompat_Widget_ActionMode_Title_Inverse 0x7f0b0055 +int style TextAppearance_AppCompat_Widget_DropDownItem 0x7f0b0019 +int style TextAppearance_AppCompat_Widget_PopupMenu_Large 0x7f0b0027 +int style TextAppearance_AppCompat_Widget_PopupMenu_Small 0x7f0b0028 +int style TextAppearance_AppCompat_Widget_Switch 0x7f0b004e +int style TextAppearance_Widget_AppCompat_ExpandedMenu_Item 0x7f0b001f +int style TextAppearance_Widget_AppCompat_Toolbar_Subtitle 0x7f0b0037 +int style TextAppearance_Widget_AppCompat_Toolbar_Title 0x7f0b0036 +int style Theme_AppCompat 0x7f0b00ba +int style Theme_AppCompat_CompactMenu 0x7f0b00c3 +int style Theme_AppCompat_Dialog 0x7f0b00c1 +int style Theme_AppCompat_DialogWhenLarge 0x7f0b00bf +int style Theme_AppCompat_Light 0x7f0b00bb +int style Theme_AppCompat_Light_DarkActionBar 0x7f0b00bc +int style Theme_AppCompat_Light_Dialog 0x7f0b00c2 +int style Theme_AppCompat_Light_DialogWhenLarge 0x7f0b00c0 +int style Theme_AppCompat_Light_NoActionBar 0x7f0b00be +int style Theme_AppCompat_NoActionBar 0x7f0b00bd +int style ThemeOverlay_AppCompat 0x7f0b00c4 +int style ThemeOverlay_AppCompat_ActionBar 0x7f0b00c7 +int style ThemeOverlay_AppCompat_Dark 0x7f0b00c6 +int style ThemeOverlay_AppCompat_Dark_ActionBar 0x7f0b00c8 +int style ThemeOverlay_AppCompat_Light 0x7f0b00c5 +int style Widget_AppCompat_ActionBar 0x7f0b0000 +int style Widget_AppCompat_ActionBar_Solid 0x7f0b0002 +int style Widget_AppCompat_ActionBar_TabBar 0x7f0b000d +int style Widget_AppCompat_ActionBar_TabText 0x7f0b0011 +int style Widget_AppCompat_ActionBar_TabView 0x7f0b000f +int style Widget_AppCompat_ActionButton 0x7f0b000a +int style Widget_AppCompat_ActionButton_CloseMode 0x7f0b000b +int style Widget_AppCompat_ActionButton_Overflow 0x7f0b000c +int style Widget_AppCompat_ActionMode 0x7f0b0016 +int style Widget_AppCompat_ActivityChooserView 0x7f0b002f +int style Widget_AppCompat_AutoCompleteTextView 0x7f0b002d +int style Widget_AppCompat_CompoundButton_Switch 0x7f0b0033 +int style Widget_AppCompat_DrawerArrowToggle 0x7f0b0012 +int style Widget_AppCompat_DropDownItem_Spinner 0x7f0b001d +int style Widget_AppCompat_EditText 0x7f0b0032 +int style Widget_AppCompat_Light_ActionBar 0x7f0b0001 +int style Widget_AppCompat_Light_ActionBar_Solid 0x7f0b0003 +int style Widget_AppCompat_Light_ActionBar_Solid_Inverse 0x7f0b004f +int style Widget_AppCompat_Light_ActionBar_TabBar 0x7f0b000e +int style Widget_AppCompat_Light_ActionBar_TabBar_Inverse 0x7f0b0050 +int style Widget_AppCompat_Light_ActionBar_TabText 0x7f0b0013 +int style Widget_AppCompat_Light_ActionBar_TabText_Inverse 0x7f0b0014 +int style Widget_AppCompat_Light_ActionBar_TabView 0x7f0b0010 +int style Widget_AppCompat_Light_ActionBar_TabView_Inverse 0x7f0b0051 +int style Widget_AppCompat_Light_ActionButton 0x7f0b0059 +int style Widget_AppCompat_Light_ActionButton_CloseMode 0x7f0b005b +int style Widget_AppCompat_Light_ActionButton_Overflow 0x7f0b005a +int style Widget_AppCompat_Light_ActionMode_Inverse 0x7f0b0054 +int style Widget_AppCompat_Light_ActivityChooserView 0x7f0b0030 +int style Widget_AppCompat_Light_AutoCompleteTextView 0x7f0b002e +int style Widget_AppCompat_Light_DropDownItem_Spinner 0x7f0b0057 +int style Widget_AppCompat_Light_ListPopupWindow 0x7f0b005e +int style Widget_AppCompat_Light_ListView_DropDown 0x7f0b005d +int style Widget_AppCompat_Light_PopupMenu 0x7f0b0024 +int style Widget_AppCompat_Light_PopupMenu_Overflow 0x7f0b0022 +int style Widget_AppCompat_Light_SearchView 0x7f0b0058 +int style Widget_AppCompat_Light_Spinner_DropDown_ActionBar 0x7f0b005c +int style Widget_AppCompat_ListPopupWindow 0x7f0b0020 +int style Widget_AppCompat_ListView_DropDown 0x7f0b001e +int style Widget_AppCompat_ListView_Menu 0x7f0b0025 +int style Widget_AppCompat_PopupMenu 0x7f0b0023 +int style Widget_AppCompat_PopupMenu_Overflow 0x7f0b0021 +int style Widget_AppCompat_PopupWindow 0x7f0b0026 +int style Widget_AppCompat_ProgressBar 0x7f0b0009 +int style Widget_AppCompat_ProgressBar_Horizontal 0x7f0b0008 +int style Widget_AppCompat_SearchView 0x7f0b0031 +int style Widget_AppCompat_Spinner 0x7f0b001a +int style Widget_AppCompat_Spinner_DropDown 0x7f0b001b +int style Widget_AppCompat_Spinner_DropDown_ActionBar 0x7f0b001c +int style Widget_AppCompat_Toolbar 0x7f0b0034 +int style Widget_AppCompat_Toolbar_Button_Navigation 0x7f0b0035 +int[] styleable ActionBar { 0x7f010000, 0x7f010001, 0x7f01002c, 0x7f010055, 0x7f010056, 0x7f010057, 0x7f010058, 0x7f010059, 0x7f01005a, 0x7f01005b, 0x7f01005c, 0x7f01005d, 0x7f01005e, 0x7f01005f, 0x7f010060, 0x7f010061, 0x7f010062, 0x7f010063, 0x7f010064, 0x7f010065, 0x7f010066, 0x7f010067, 0x7f010068, 0x7f010069, 0x7f01006a, 0x7f01006b, 0x7f01006c } +int styleable ActionBar_background 11 +int styleable ActionBar_backgroundSplit 13 +int styleable ActionBar_backgroundStacked 12 +int styleable ActionBar_contentInsetEnd 22 +int styleable ActionBar_contentInsetLeft 23 +int styleable ActionBar_contentInsetRight 24 +int styleable ActionBar_contentInsetStart 21 +int styleable ActionBar_customNavigationLayout 14 +int styleable ActionBar_displayOptions 4 +int styleable ActionBar_divider 10 +int styleable ActionBar_elevation 25 +int styleable ActionBar_height 1 +int styleable ActionBar_hideOnContentScroll 20 +int styleable ActionBar_homeAsUpIndicator 2 +int styleable ActionBar_homeLayout 15 +int styleable ActionBar_icon 8 +int styleable ActionBar_indeterminateProgressStyle 17 +int styleable ActionBar_itemPadding 19 +int styleable ActionBar_logo 9 +int styleable ActionBar_navigationMode 3 +int styleable ActionBar_popupTheme 26 +int styleable ActionBar_progressBarPadding 18 +int styleable ActionBar_progressBarStyle 16 +int styleable ActionBar_subtitle 5 +int styleable ActionBar_subtitleTextStyle 7 +int styleable ActionBar_title 0 +int styleable ActionBar_titleTextStyle 6 +int[] styleable ActionBarLayout { 0x010100b3 } +int styleable ActionBarLayout_android_layout_gravity 0 +int[] styleable ActionMenuItemView { 0x0101013f } +int styleable ActionMenuItemView_android_minWidth 0 +int[] styleable ActionMenuView { } +int[] styleable ActionMode { 0x7f010001, 0x7f010058, 0x7f010059, 0x7f01005d, 0x7f01005f, 0x7f01006d } +int styleable ActionMode_background 3 +int styleable ActionMode_backgroundSplit 4 +int styleable ActionMode_closeItemLayout 5 +int styleable ActionMode_height 0 +int styleable ActionMode_subtitleTextStyle 2 +int styleable ActionMode_titleTextStyle 1 +int[] styleable ActivityChooserView { 0x7f010084, 0x7f010085 } +int styleable ActivityChooserView_expandActivityOverflowButtonDrawable 1 +int styleable ActivityChooserView_initialActivityCount 0 +int[] styleable CompatTextView { 0x7f010086 } +int styleable CompatTextView_textAllCaps 0 +int[] styleable DrawerArrowToggle { 0x7f010099, 0x7f01009a, 0x7f01009b, 0x7f01009c, 0x7f01009d, 0x7f01009e, 0x7f01009f, 0x7f0100a0 } +int styleable DrawerArrowToggle_barSize 6 +int styleable DrawerArrowToggle_color 0 +int styleable DrawerArrowToggle_drawableSize 2 +int styleable DrawerArrowToggle_gapBetweenBars 3 +int styleable DrawerArrowToggle_middleBarArrowSize 5 +int styleable DrawerArrowToggle_spinBars 1 +int styleable DrawerArrowToggle_thickness 7 +int styleable DrawerArrowToggle_topBottomBarArrowSize 4 +int[] styleable LinearLayoutCompat { 0x010100af, 0x010100c4, 0x01010126, 0x01010127, 0x01010128, 0x7f01005c, 0x7f010087, 0x7f010088, 0x7f010089 } +int styleable LinearLayoutCompat_android_baselineAligned 2 +int styleable LinearLayoutCompat_android_baselineAlignedChildIndex 3 +int styleable LinearLayoutCompat_android_gravity 0 +int styleable LinearLayoutCompat_android_orientation 1 +int styleable LinearLayoutCompat_android_weightSum 4 +int styleable LinearLayoutCompat_divider 5 +int styleable LinearLayoutCompat_dividerPadding 8 +int styleable LinearLayoutCompat_measureWithLargestChild 6 +int styleable LinearLayoutCompat_showDividers 7 +int[] styleable LinearLayoutCompat_Layout { 0x010100b3, 0x010100f4, 0x010100f5, 0x01010181 } +int styleable LinearLayoutCompat_Layout_android_layout_gravity 0 +int styleable LinearLayoutCompat_Layout_android_layout_height 2 +int styleable LinearLayoutCompat_Layout_android_layout_weight 3 +int styleable LinearLayoutCompat_Layout_android_layout_width 1 +int[] styleable ListPopupWindow { 0x010102ac, 0x010102ad } +int styleable ListPopupWindow_android_dropDownHorizontalOffset 0 +int styleable ListPopupWindow_android_dropDownVerticalOffset 1 +int[] styleable MenuGroup { 0x0101000e, 0x010100d0, 0x01010194, 0x010101de, 0x010101df, 0x010101e0 } +int styleable MenuGroup_android_checkableBehavior 5 +int styleable MenuGroup_android_enabled 0 +int styleable MenuGroup_android_id 1 +int styleable MenuGroup_android_menuCategory 3 +int styleable MenuGroup_android_orderInCategory 4 +int styleable MenuGroup_android_visible 2 +int[] styleable MenuItem { 0x01010002, 0x0101000e, 0x010100d0, 0x01010106, 0x01010194, 0x010101de, 0x010101df, 0x010101e1, 0x010101e2, 0x010101e3, 0x010101e4, 0x010101e5, 0x0101026f, 0x7f010071, 0x7f010072, 0x7f010073, 0x7f010074 } +int styleable MenuItem_actionLayout 14 +int styleable MenuItem_actionProviderClass 16 +int styleable MenuItem_actionViewClass 15 +int styleable MenuItem_android_alphabeticShortcut 9 +int styleable MenuItem_android_checkable 11 +int styleable MenuItem_android_checked 3 +int styleable MenuItem_android_enabled 1 +int styleable MenuItem_android_icon 0 +int styleable MenuItem_android_id 2 +int styleable MenuItem_android_menuCategory 5 +int styleable MenuItem_android_numericShortcut 10 +int styleable MenuItem_android_onClick 12 +int styleable MenuItem_android_orderInCategory 6 +int styleable MenuItem_android_title 7 +int styleable MenuItem_android_titleCondensed 8 +int styleable MenuItem_android_visible 4 +int styleable MenuItem_showAsAction 13 +int[] styleable MenuView { 0x010100ae, 0x0101012c, 0x0101012d, 0x0101012e, 0x0101012f, 0x01010130, 0x01010131, 0x7f010070 } +int styleable MenuView_android_headerBackground 4 +int styleable MenuView_android_horizontalDivider 2 +int styleable MenuView_android_itemBackground 5 +int styleable MenuView_android_itemIconDisabledAlpha 6 +int styleable MenuView_android_itemTextAppearance 1 +int styleable MenuView_android_verticalDivider 3 +int styleable MenuView_android_windowAnimationStyle 0 +int styleable MenuView_preserveIconSpacing 7 +int[] styleable PopupWindow { 0x01010176, 0x7f010098 } +int styleable PopupWindow_android_popupBackground 0 +int styleable PopupWindow_overlapAnchor 1 +int[] styleable PopupWindowBackgroundState { 0x7f010097 } +int styleable PopupWindowBackgroundState_state_above_anchor 0 +int[] styleable SearchView { 0x010100da, 0x0101011f, 0x01010220, 0x01010264, 0x7f010079, 0x7f01007a, 0x7f01007b, 0x7f01007c, 0x7f01007d, 0x7f01007e, 0x7f01007f, 0x7f010080, 0x7f010081, 0x7f010082, 0x7f010083 } +int styleable SearchView_android_focusable 0 +int styleable SearchView_android_imeOptions 3 +int styleable SearchView_android_inputType 2 +int styleable SearchView_android_maxWidth 1 +int styleable SearchView_closeIcon 7 +int styleable SearchView_commitIcon 11 +int styleable SearchView_goIcon 8 +int styleable SearchView_iconifiedByDefault 5 +int styleable SearchView_layout 4 +int styleable SearchView_queryBackground 13 +int styleable SearchView_queryHint 6 +int styleable SearchView_searchIcon 9 +int styleable SearchView_submitBackground 14 +int styleable SearchView_suggestionRowLayout 12 +int styleable SearchView_voiceIcon 10 +int[] styleable Spinner { 0x010100af, 0x010100d4, 0x01010175, 0x01010176, 0x01010262, 0x010102ac, 0x010102ad, 0x7f010075, 0x7f010076, 0x7f010077, 0x7f010078 } +int styleable Spinner_android_background 1 +int styleable Spinner_android_dropDownHorizontalOffset 5 +int styleable Spinner_android_dropDownSelector 2 +int styleable Spinner_android_dropDownVerticalOffset 6 +int styleable Spinner_android_dropDownWidth 4 +int styleable Spinner_android_gravity 0 +int styleable Spinner_android_popupBackground 3 +int styleable Spinner_disableChildrenWhenDisabled 10 +int styleable Spinner_popupPromptView 9 +int styleable Spinner_prompt 7 +int styleable Spinner_spinnerMode 8 +int[] styleable SwitchCompat { 0x01010124, 0x01010125, 0x01010142, 0x7f0100a2, 0x7f0100a3, 0x7f0100a4, 0x7f0100a5, 0x7f0100a6, 0x7f0100a7, 0x7f0100a8 } +int styleable SwitchCompat_android_textOff 1 +int styleable SwitchCompat_android_textOn 0 +int styleable SwitchCompat_android_thumb 2 +int styleable SwitchCompat_showText 9 +int styleable SwitchCompat_splitTrack 8 +int styleable SwitchCompat_switchMinWidth 6 +int styleable SwitchCompat_switchPadding 7 +int styleable SwitchCompat_switchTextAppearance 5 +int styleable SwitchCompat_thumbTextPadding 4 +int styleable SwitchCompat_track 3 +int[] styleable Theme { 0x01010057, 0x7f010003, 0x7f010004, 0x7f010005, 0x7f010006, 0x7f010007, 0x7f010008, 0x7f010009, 0x7f01000a, 0x7f01000b, 0x7f01000c, 0x7f01000d, 0x7f01000e, 0x7f01000f, 0x7f010010, 0x7f010011, 0x7f010012, 0x7f010013, 0x7f010014, 0x7f010015, 0x7f010016, 0x7f010017, 0x7f010018, 0x7f010019, 0x7f01001a, 0x7f01001b, 0x7f01001c, 0x7f01001d, 0x7f01001e, 0x7f01001f, 0x7f010020, 0x7f010021, 0x7f010022, 0x7f010023, 0x7f010024, 0x7f010025, 0x7f010026, 0x7f010027, 0x7f010028, 0x7f010029, 0x7f01002a, 0x7f01002b, 0x7f01002c, 0x7f01002d, 0x7f01002e, 0x7f01002f, 0x7f010030, 0x7f010031, 0x7f010032, 0x7f010033, 0x7f010034, 0x7f010035, 0x7f010036, 0x7f010037, 0x7f010038, 0x7f010039, 0x7f01003a, 0x7f01003b, 0x7f01003c, 0x7f01003d, 0x7f01003e, 0x7f01003f, 0x7f010040, 0x7f010041, 0x7f010042, 0x7f010043, 0x7f010044, 0x7f010045, 0x7f010046, 0x7f010047, 0x7f010048, 0x7f010049, 0x7f01004a, 0x7f01004b, 0x7f01004c, 0x7f01004d, 0x7f01004e, 0x7f01004f, 0x7f010050, 0x7f010051, 0x7f010052, 0x7f010053, 0x7f010054 } +int styleable Theme_actionBarDivider 19 +int styleable Theme_actionBarItemBackground 20 +int styleable Theme_actionBarPopupTheme 13 +int styleable Theme_actionBarSize 18 +int styleable Theme_actionBarSplitStyle 15 +int styleable Theme_actionBarStyle 14 +int styleable Theme_actionBarTabBarStyle 9 +int styleable Theme_actionBarTabStyle 8 +int styleable Theme_actionBarTabTextStyle 10 +int styleable Theme_actionBarTheme 16 +int styleable Theme_actionBarWidgetTheme 17 +int styleable Theme_actionButtonStyle 43 +int styleable Theme_actionDropDownStyle 38 +int styleable Theme_actionMenuTextAppearance 21 +int styleable Theme_actionMenuTextColor 22 +int styleable Theme_actionModeBackground 25 +int styleable Theme_actionModeCloseButtonStyle 24 +int styleable Theme_actionModeCloseDrawable 27 +int styleable Theme_actionModeCopyDrawable 29 +int styleable Theme_actionModeCutDrawable 28 +int styleable Theme_actionModeFindDrawable 33 +int styleable Theme_actionModePasteDrawable 30 +int styleable Theme_actionModePopupWindowStyle 35 +int styleable Theme_actionModeSelectAllDrawable 31 +int styleable Theme_actionModeShareDrawable 32 +int styleable Theme_actionModeSplitBackground 26 +int styleable Theme_actionModeStyle 23 +int styleable Theme_actionModeWebSearchDrawable 34 +int styleable Theme_actionOverflowButtonStyle 11 +int styleable Theme_actionOverflowMenuStyle 12 +int styleable Theme_activityChooserViewStyle 50 +int styleable Theme_android_windowIsFloating 0 +int styleable Theme_buttonBarButtonStyle 45 +int styleable Theme_buttonBarStyle 44 +int styleable Theme_colorAccent 77 +int styleable Theme_colorButtonNormal 81 +int styleable Theme_colorControlActivated 79 +int styleable Theme_colorControlHighlight 80 +int styleable Theme_colorControlNormal 78 +int styleable Theme_colorPrimary 75 +int styleable Theme_colorPrimaryDark 76 +int styleable Theme_colorSwitchThumbNormal 82 +int styleable Theme_dividerHorizontal 49 +int styleable Theme_dividerVertical 48 +int styleable Theme_dropDownListViewStyle 67 +int styleable Theme_dropdownListPreferredItemHeight 39 +int styleable Theme_editTextBackground 56 +int styleable Theme_editTextColor 55 +int styleable Theme_homeAsUpIndicator 42 +int styleable Theme_listChoiceBackgroundIndicator 74 +int styleable Theme_listPopupWindowStyle 68 +int styleable Theme_listPreferredItemHeight 62 +int styleable Theme_listPreferredItemHeightLarge 64 +int styleable Theme_listPreferredItemHeightSmall 63 +int styleable Theme_listPreferredItemPaddingLeft 65 +int styleable Theme_listPreferredItemPaddingRight 66 +int styleable Theme_panelBackground 71 +int styleable Theme_panelMenuListTheme 73 +int styleable Theme_panelMenuListWidth 72 +int styleable Theme_popupMenuStyle 53 +int styleable Theme_popupWindowStyle 54 +int styleable Theme_searchViewStyle 61 +int styleable Theme_selectableItemBackground 46 +int styleable Theme_selectableItemBackgroundBorderless 47 +int styleable Theme_spinnerDropDownItemStyle 41 +int styleable Theme_spinnerStyle 40 +int styleable Theme_switchStyle 57 +int styleable Theme_textAppearanceLargePopupMenu 36 +int styleable Theme_textAppearanceListItem 69 +int styleable Theme_textAppearanceListItemSmall 70 +int styleable Theme_textAppearanceSearchResultSubtitle 59 +int styleable Theme_textAppearanceSearchResultTitle 58 +int styleable Theme_textAppearanceSmallPopupMenu 37 +int styleable Theme_textColorSearchUrl 60 +int styleable Theme_toolbarNavigationButtonStyle 52 +int styleable Theme_toolbarStyle 51 +int styleable Theme_windowActionBar 1 +int styleable Theme_windowActionBarOverlay 2 +int styleable Theme_windowActionModeOverlay 3 +int styleable Theme_windowFixedHeightMajor 7 +int styleable Theme_windowFixedHeightMinor 5 +int styleable Theme_windowFixedWidthMajor 4 +int styleable Theme_windowFixedWidthMinor 6 +int[] styleable Toolbar { 0x010100af, 0x01010140, 0x7f010000, 0x7f010057, 0x7f010067, 0x7f010068, 0x7f010069, 0x7f01006a, 0x7f01006c, 0x7f01008a, 0x7f01008b, 0x7f01008c, 0x7f01008d, 0x7f01008e, 0x7f01008f, 0x7f010090, 0x7f010091, 0x7f010092, 0x7f010093, 0x7f010094, 0x7f010095, 0x7f010096 } +int styleable Toolbar_android_gravity 0 +int styleable Toolbar_android_minHeight 1 +int styleable Toolbar_collapseContentDescription 19 +int styleable Toolbar_collapseIcon 18 +int styleable Toolbar_contentInsetEnd 5 +int styleable Toolbar_contentInsetLeft 6 +int styleable Toolbar_contentInsetRight 7 +int styleable Toolbar_contentInsetStart 4 +int styleable Toolbar_maxButtonHeight 16 +int styleable Toolbar_navigationContentDescription 21 +int styleable Toolbar_navigationIcon 20 +int styleable Toolbar_popupTheme 8 +int styleable Toolbar_subtitle 3 +int styleable Toolbar_subtitleTextAppearance 10 +int styleable Toolbar_theme 17 +int styleable Toolbar_title 2 +int styleable Toolbar_titleMarginBottom 15 +int styleable Toolbar_titleMarginEnd 13 +int styleable Toolbar_titleMarginStart 12 +int styleable Toolbar_titleMarginTop 14 +int styleable Toolbar_titleMargins 11 +int styleable Toolbar_titleTextAppearance 9 +int[] styleable View { 0x010100da, 0x7f01006e, 0x7f01006f } +int styleable View_android_focusable 0 +int styleable View_paddingEnd 2 +int styleable View_paddingStart 1 +int[] styleable ViewStubCompat { 0x010100d0, 0x010100f2, 0x010100f3 } +int styleable ViewStubCompat_android_id 0 +int styleable ViewStubCompat_android_inflatedId 2 +int styleable ViewStubCompat_android_layout 1 diff --git a/eclipse-compile/observable/bin/jarlist.cache b/eclipse-compile/observable/bin/jarlist.cache new file mode 100644 index 0000000000..0565465f22 --- /dev/null +++ b/eclipse-compile/observable/bin/jarlist.cache @@ -0,0 +1,3 @@ +# cache for current jar dependency. DO NOT EDIT. +# format is +# Encoding is UTF-8 diff --git a/eclipse-compile/observable/bin/listobservable.jar b/eclipse-compile/observable/bin/listobservable.jar new file mode 100644 index 0000000000..f60faea6e7 Binary files /dev/null and b/eclipse-compile/observable/bin/listobservable.jar differ diff --git a/eclipse-compile/observable/build.gradle b/eclipse-compile/observable/build.gradle new file mode 100755 index 0000000000..20f59fb26a --- /dev/null +++ b/eclipse-compile/observable/build.gradle @@ -0,0 +1,62 @@ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.1.0' + classpath 'com.android.tools.build:gradle:1.0.0' + } +} + +apply plugin: 'com.android.library' + +repositories { + mavenCentral() +} + +dependencies { + compile 'com.android.support:recyclerview-v7:21.0.0' + androidTestCompile ('com.android.support:appcompat-v7:21.0.2') { + exclude module: 'support-v4' + } + androidTestCompile ('com.nineoldandroids:library:2.4.0') { + exclude module: 'support-v4' + } +} + +android { + compileSdkVersion 21 + buildToolsVersion "21.1.1" + + defaultConfig { + minSdkVersion 9 + } + + jacoco { + version = '0.7.2.201409121644' + } + + buildTypes { + debug { + testCoverageEnabled = true + } + } + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + res.srcDirs = ['res'] + } + } + + lintOptions { + abortOnError false + } +} + +apply plugin: 'com.github.kt3k.coveralls' + +coveralls.jacocoReportPath = 'build/outputs/reports/coverage/debug/report.xml' + +// This is from 'https://github.com/chrisbanes/gradle-mvn-push' +apply from: 'gradle-mvn-push.gradle' diff --git a/eclipse-compile/observable/gradle-mvn-push.gradle b/eclipse-compile/observable/gradle-mvn-push.gradle new file mode 100755 index 0000000000..f5f4129c96 --- /dev/null +++ b/eclipse-compile/observable/gradle-mvn-push.gradle @@ -0,0 +1,114 @@ +/* + * Copyright 2013 Chris Banes + * + * 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. + */ + +apply plugin: 'maven' +apply plugin: 'signing' + +def isReleaseBuild() { + return VERSION_NAME.contains("SNAPSHOT") == false +} + +def getReleaseRepositoryUrl() { + return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL + : "https://oss.sonatype.org/service/local/staging/deploy/maven2/" +} + +def getSnapshotRepositoryUrl() { + return hasProperty('SNAPSHOT_REPOSITORY_URL') ? SNAPSHOT_REPOSITORY_URL + : "https://oss.sonatype.org/content/repositories/snapshots/" +} + +def getRepositoryUsername() { + return hasProperty('NEXUS_USERNAME') ? NEXUS_USERNAME : "" +} + +def getRepositoryPassword() { + return hasProperty('NEXUS_PASSWORD') ? NEXUS_PASSWORD : "" +} + +afterEvaluate { project -> + uploadArchives { + repositories { + mavenDeployer { + beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + + pom.groupId = GROUP + pom.artifactId = POM_ARTIFACT_ID + pom.version = VERSION_NAME + + repository(url: getReleaseRepositoryUrl()) { + authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) + } + snapshotRepository(url: getSnapshotRepositoryUrl()) { + authentication(userName: getRepositoryUsername(), password: getRepositoryPassword()) + } + + pom.project { + name POM_NAME + packaging POM_PACKAGING + description POM_DESCRIPTION + url POM_URL + + scm { + url POM_SCM_URL + connection POM_SCM_CONNECTION + developerConnection POM_SCM_DEV_CONNECTION + } + + licenses { + license { + name POM_LICENCE_NAME + url POM_LICENCE_URL + distribution POM_LICENCE_DIST + } + } + + developers { + developer { + id POM_DEVELOPER_ID + name POM_DEVELOPER_NAME + } + } + } + } + } + } + + signing { + required { isReleaseBuild() && gradle.taskGraph.hasTask("uploadArchives") } + sign configurations.archives + } + + task androidJavadocs(type: Javadoc) { + source = android.sourceSets.main.java.srcDirs + classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + } + + task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { + classifier = 'javadoc' + from androidJavadocs.destinationDir + } + + task androidSourcesJar(type: Jar) { + classifier = 'sources' + from android.sourceSets.main.java.sourceFiles + } + + artifacts { + archives androidSourcesJar + archives androidJavadocsJar + } +} diff --git a/eclipse-compile/observable/gradle.properties b/eclipse-compile/observable/gradle.properties new file mode 100755 index 0000000000..a5035de4fa --- /dev/null +++ b/eclipse-compile/observable/gradle.properties @@ -0,0 +1,3 @@ +POM_NAME=Android-ObservableScrollView +POM_ARTIFACT_ID=android-observablescrollview +POM_PACKAGING=aar diff --git a/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/CacheFragmentStatePagerAdapter.java b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/CacheFragmentStatePagerAdapter.java new file mode 100755 index 0000000000..f0057410cb --- /dev/null +++ b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/CacheFragmentStatePagerAdapter.java @@ -0,0 +1,150 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview; + +import android.os.Bundle; +import android.os.Parcelable; +import android.support.v4.app.Fragment; +import android.support.v4.app.FragmentManager; +import android.support.v4.app.FragmentStatePagerAdapter; +import android.util.SparseArray; +import android.view.ViewGroup; + +/** + * FragmentStatePagerAdapter that caches each pages. + * FragmentStatePagerAdapter is also originally caches pages, + * but its keys are not public nor documented, so depending + * on how it create cache key is dangerous. + * This adapter caches pages by itself and provide getter method to the cache. + */ +public abstract class CacheFragmentStatePagerAdapter extends FragmentStatePagerAdapter { + + private static final String STATE_SUPER_STATE = "superState"; + private static final String STATE_PAGES = "pages"; + private static final String STATE_PAGE_INDEX_PREFIX = "pageIndex:"; + private static final String STATE_PAGE_KEY_PREFIX = "page:"; + + private FragmentManager mFm; + private SparseArray mPages; + + public CacheFragmentStatePagerAdapter(FragmentManager fm) { + super(fm); + mPages = new SparseArray(); + mFm = fm; + } + + @Override + public Parcelable saveState() { + Parcelable p = super.saveState(); + Bundle bundle = new Bundle(); + bundle.putParcelable(STATE_SUPER_STATE, p); + + bundle.putInt(STATE_PAGES, mPages.size()); + if (0 < mPages.size()) { + for (int i = 0; i < mPages.size(); i++) { + int position = mPages.keyAt(i); + bundle.putInt(createCacheIndex(i), position); + Fragment f = mPages.get(position); + mFm.putFragment(bundle, createCacheKey(position), f); + } + } + return bundle; + } + + @Override + public void restoreState(Parcelable state, ClassLoader loader) { + Bundle bundle = (Bundle) state; + int pages = bundle.getInt(STATE_PAGES); + if (0 < pages) { + for (int i = 0; i < pages; i++) { + int position = bundle.getInt(createCacheIndex(i)); + Fragment f = mFm.getFragment(bundle, createCacheKey(position)); + mPages.put(position, f); + } + } + + Parcelable p = bundle.getParcelable(STATE_SUPER_STATE); + super.restoreState(p, loader); + } + + /** + * Get a new Fragment instance. + * Each fragments are automatically cached in this method, + * so you don't have to do it by yourself. + * If you want to implement instantiation of Fragments, + * you should override {@link #createItem(int)} instead. + * + * {@inheritDoc} + * + * @param position position of the item in the adapter + * @return fragment instance + */ + @Override + public Fragment getItem(int position) { + Fragment f = createItem(position); + // We should cache fragments manually to access to them later + mPages.put(position, f); + return f; + } + + @Override + public void destroyItem(ViewGroup container, int position, Object object) { + if (0 <= mPages.indexOfKey(position)) { + mPages.remove(position); + } + super.destroyItem(container, position, object); + } + + /** + * Get the item at the specified position in the adapter. + * + * @param position position of the item in the adapter + * @return fragment instance + */ + public Fragment getItemAt(int position) { + return mPages.get(position); + } + + /** + * Create a new Fragment instance. + * This is called inside {@link #getItem(int)}. + * + * @param position position of the item in the adapter + * @return fragment instance + */ + protected abstract Fragment createItem(int position); + + /** + * Create an index string for caching Fragment pages. + * + * @param index index of the item in the adapter + * @return key string for caching Fragment pages + */ + protected String createCacheIndex(int index) { + return STATE_PAGE_INDEX_PREFIX + index; + } + + /** + * Create a key string for caching Fragment pages. + * + * @param position position of the item in the adapter + * @return key string for caching Fragment pages + */ + protected String createCacheKey(int position) { + return STATE_PAGE_KEY_PREFIX + position; + } +} diff --git a/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableGridView.java b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableGridView.java new file mode 100755 index 0000000000..7b759726d4 --- /dev/null +++ b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableGridView.java @@ -0,0 +1,384 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview; + +import android.content.Context; +import android.os.Build; +import android.os.Parcel; +import android.os.Parcelable; +import android.util.AttributeSet; +import android.util.SparseIntArray; +import android.view.MotionEvent; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AbsListView; +import android.widget.GridView; + +/** + * GridView that its scroll position can be observed. + */ +public class ObservableGridView extends GridView implements Scrollable { + + // Fields that should be saved onSaveInstanceState + private int mPrevFirstVisiblePosition; + private int mPrevFirstVisibleChildHeight = -1; + private int mPrevScrolledChildrenHeight; + private int mPrevScrollY; + private int mScrollY; + private SparseIntArray mChildrenHeights; + + // Fields that don't need to be saved onSaveInstanceState + private ObservableScrollViewCallbacks mCallbacks; + private ScrollState mScrollState; + private boolean mFirstScroll; + private boolean mDragging; + private boolean mIntercepted; + private MotionEvent mPrevMoveEvent; + private ViewGroup mTouchInterceptionViewGroup; + + private OnScrollListener mOriginalScrollListener; + private OnScrollListener mScrollListener = new OnScrollListener() { + @Override + public void onScrollStateChanged(AbsListView view, int scrollState) { + if (mOriginalScrollListener != null) { + mOriginalScrollListener.onScrollStateChanged(view, scrollState); + } + } + + @Override + public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { + if (mOriginalScrollListener != null) { + mOriginalScrollListener.onScroll(view, firstVisibleItem, visibleItemCount, totalItemCount); + } + // AbsListView#invokeOnItemScrollListener calls onScrollChanged(0, 0, 0, 0) + // on Android 4.0+, but Android 2.3 is not. (Android 3.0 is unknown) + // So call it with onScrollListener. + onScrollChanged(); + } + }; + + public ObservableGridView(Context context) { + super(context); + init(); + } + + public ObservableGridView(Context context, AttributeSet attrs) { + super(context, attrs); + init(); + } + + public ObservableGridView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + init(); + } + + @Override + public void onRestoreInstanceState(Parcelable state) { + SavedState ss = (SavedState) state; + mPrevFirstVisiblePosition = ss.prevFirstVisiblePosition; + mPrevFirstVisibleChildHeight = ss.prevFirstVisibleChildHeight; + mPrevScrolledChildrenHeight = ss.prevScrolledChildrenHeight; + mPrevScrollY = ss.prevScrollY; + mScrollY = ss.scrollY; + mChildrenHeights = ss.childrenHeights; + super.onRestoreInstanceState(ss.getSuperState()); + } + + @Override + public Parcelable onSaveInstanceState() { + Parcelable superState = super.onSaveInstanceState(); + SavedState ss = new SavedState(superState); + ss.prevFirstVisiblePosition = mPrevFirstVisiblePosition; + ss.prevFirstVisibleChildHeight = mPrevFirstVisibleChildHeight; + ss.prevScrolledChildrenHeight = mPrevScrolledChildrenHeight; + ss.prevScrollY = mPrevScrollY; + ss.scrollY = mScrollY; + ss.childrenHeights = mChildrenHeights; + return ss; + } + + @Override + public boolean onInterceptTouchEvent(MotionEvent ev) { + if (mCallbacks != null) { + switch (ev.getActionMasked()) { + case MotionEvent.ACTION_DOWN: + // Whether or not motion events are consumed by children, + // flag initializations which are related to ACTION_DOWN events should be executed. + // Because if the ACTION_DOWN is consumed by children and only ACTION_MOVEs are + // passed to parent (this view), the flags will be invalid. + // Also, applications might implement initialization codes to onDownMotionEvent, + // so call it here. + mFirstScroll = mDragging = true; + mCallbacks.onDownMotionEvent(); + break; + } + } + return super.onInterceptTouchEvent(ev); + } + + @Override + public boolean onTouchEvent(MotionEvent ev) { + if (mCallbacks != null) { + switch (ev.getActionMasked()) { + case MotionEvent.ACTION_UP: + case MotionEvent.ACTION_CANCEL: + mIntercepted = false; + mDragging = false; + mCallbacks.onUpOrCancelMotionEvent(mScrollState); + break; + case MotionEvent.ACTION_MOVE: + if (mPrevMoveEvent == null) { + mPrevMoveEvent = ev; + } + float diffY = ev.getY() - mPrevMoveEvent.getY(); + mPrevMoveEvent = MotionEvent.obtainNoHistory(ev); + if (getCurrentScrollY() - diffY <= 0) { + // Can't scroll anymore. + + if (mIntercepted) { + // Already dispatched ACTION_DOWN event to parents, so stop here. + return false; + } + + // Apps can set the interception target other than the direct parent. + final ViewGroup parent; + if (mTouchInterceptionViewGroup == null) { + parent = (ViewGroup) getParent(); + } else { + parent = mTouchInterceptionViewGroup; + } + + // Get offset to parents. If the parent is not the direct parent, + // we should aggregate offsets from all of the parents. + float offsetX = 0; + float offsetY = 0; + for (View v = this; v != null && v != parent; v = (View) v.getParent()) { + offsetX += v.getLeft() - v.getScrollX(); + offsetY += v.getTop() - v.getScrollY(); + } + final MotionEvent event = MotionEvent.obtainNoHistory(ev); + event.offsetLocation(offsetX, offsetY); + + if (parent.onInterceptTouchEvent(event)) { + mIntercepted = true; + + // If the parent wants to intercept ACTION_MOVE events, + // we pass ACTION_DOWN event to the parent + // as if these touch events just have began now. + event.setAction(MotionEvent.ACTION_DOWN); + + // Return this onTouchEvent() first and set ACTION_DOWN event for parent + // to the queue, to keep events sequence. + post(new Runnable() { + @Override + public void run() { + parent.dispatchTouchEvent(event); + } + }); + return false; + } + // Even when this can't be scrolled anymore, + // simply returning false here may cause subView's click, + // so delegate it to super. + return super.onTouchEvent(ev); + } + break; + } + } + return super.onTouchEvent(ev); + } + + @Override + public void setOnScrollListener(OnScrollListener l) { + // Don't set l to super.setOnScrollListener(). + // l receives all events through mScrollListener. + mOriginalScrollListener = l; + } + + @Override + public void setScrollViewCallbacks(ObservableScrollViewCallbacks listener) { + mCallbacks = listener; + } + + @Override + public void setTouchInterceptionViewGroup(ViewGroup viewGroup) { + mTouchInterceptionViewGroup = viewGroup; + } + + @Override + public void scrollVerticallyTo(int y) { + scrollTo(0, y); + } + + @Override + public int getCurrentScrollY() { + return mScrollY; + } + + private void init() { + mChildrenHeights = new SparseIntArray(); + super.setOnScrollListener(mScrollListener); + } + + private int getNumColumnsCompat() { + if (Build.VERSION.SDK_INT >= 11) { + return getNumColumns(); + } else { + int columns = 0; + if (getChildCount() > 0) { + int width = getChildAt(0).getMeasuredWidth(); + if (width > 0) { + columns = getWidth() / width; + } + } + return columns > 0 ? columns : AUTO_FIT; + } + } + + private void onScrollChanged() { + if (mCallbacks != null) { + if (getChildCount() > 0) { + int firstVisiblePosition = getFirstVisiblePosition(); + for (int i = getFirstVisiblePosition(), j = 0; i <= getLastVisiblePosition(); i++, j++) { + if (mChildrenHeights.indexOfKey(i) < 0 || getChildAt(j).getHeight() != mChildrenHeights.get(i)) { + if (i % getNumColumnsCompat() == 0) { + mChildrenHeights.put(i, getChildAt(j).getHeight()); + } + } + } + + View firstVisibleChild = getChildAt(0); + if (firstVisibleChild != null) { + if (mPrevFirstVisiblePosition < firstVisiblePosition) { + // scroll down + int skippedChildrenHeight = 0; + if (firstVisiblePosition - mPrevFirstVisiblePosition != 1) { + for (int i = firstVisiblePosition - 1; i > mPrevFirstVisiblePosition; i--) { + if (0 < mChildrenHeights.indexOfKey(i)) { + skippedChildrenHeight += mChildrenHeights.get(i); + } + } + } + mPrevScrolledChildrenHeight += mPrevFirstVisibleChildHeight + skippedChildrenHeight; + mPrevFirstVisibleChildHeight = firstVisibleChild.getHeight(); + } else if (firstVisiblePosition < mPrevFirstVisiblePosition) { + // scroll up + int skippedChildrenHeight = 0; + if (mPrevFirstVisiblePosition - firstVisiblePosition != 1) { + for (int i = mPrevFirstVisiblePosition - 1; i > firstVisiblePosition; i--) { + if (0 < mChildrenHeights.indexOfKey(i)) { + skippedChildrenHeight += mChildrenHeights.get(i); + } + } + } + mPrevScrolledChildrenHeight -= firstVisibleChild.getHeight() + skippedChildrenHeight; + mPrevFirstVisibleChildHeight = firstVisibleChild.getHeight(); + } else if (firstVisiblePosition == 0) { + mPrevFirstVisibleChildHeight = firstVisibleChild.getHeight(); + } + if (mPrevFirstVisibleChildHeight < 0) { + mPrevFirstVisibleChildHeight = 0; + } + mScrollY = mPrevScrolledChildrenHeight - firstVisibleChild.getTop(); + mPrevFirstVisiblePosition = firstVisiblePosition; + + mCallbacks.onScrollChanged(mScrollY, mFirstScroll, mDragging); + if (mFirstScroll) { + mFirstScroll = false; + } + + if (mPrevScrollY < mScrollY) { + mScrollState = ScrollState.UP; + } else if (mScrollY < mPrevScrollY) { + mScrollState = ScrollState.DOWN; + } else { + mScrollState = ScrollState.STOP; + } + mPrevScrollY = mScrollY; + } + } + } + } + + static class SavedState extends BaseSavedState { + int prevFirstVisiblePosition; + int prevFirstVisibleChildHeight = -1; + int prevScrolledChildrenHeight; + int prevScrollY; + int scrollY; + SparseIntArray childrenHeights; + + /** + * Called by onSaveInstanceState. + */ + SavedState(Parcelable superState) { + super(superState); + } + + /** + * Called by CREATOR. + */ + private SavedState(Parcel in) { + super(in); + prevFirstVisiblePosition = in.readInt(); + prevFirstVisibleChildHeight = in.readInt(); + prevScrolledChildrenHeight = in.readInt(); + prevScrollY = in.readInt(); + scrollY = in.readInt(); + childrenHeights = new SparseIntArray(); + final int numOfChildren = in.readInt(); + if (0 < numOfChildren) { + for (int i = 0; i < numOfChildren; i++) { + final int key = in.readInt(); + final int value = in.readInt(); + childrenHeights.put(key, value); + } + } + } + + @Override + public void writeToParcel(Parcel out, int flags) { + super.writeToParcel(out, flags); + out.writeInt(prevFirstVisiblePosition); + out.writeInt(prevFirstVisibleChildHeight); + out.writeInt(prevScrolledChildrenHeight); + out.writeInt(prevScrollY); + out.writeInt(scrollY); + final int numOfChildren = childrenHeights == null ? 0 : childrenHeights.size(); + out.writeInt(numOfChildren); + if (0 < numOfChildren) { + for (int i = 0; i < numOfChildren; i++) { + out.writeInt(childrenHeights.keyAt(i)); + out.writeInt(childrenHeights.valueAt(i)); + } + } + } + + public static final Parcelable.Creator CREATOR + = new Parcelable.Creator() { + @Override + public SavedState createFromParcel(Parcel in) { + return new SavedState(in); + } + + @Override + public SavedState[] newArray(int size) { + return new SavedState[size]; + } + }; + } +} diff --git a/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableListView.java b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableListView.java new file mode 100755 index 0000000000..1d20c5784e --- /dev/null +++ b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableListView.java @@ -0,0 +1,381 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview; + +import android.content.Context; +import android.os.Parcel; +import android.os.Parcelable; +import android.util.AttributeSet; +import android.util.SparseIntArray; +import android.view.MotionEvent; +import android.view.View; +import android.view.ViewGroup; +import android.widget.AbsListView; +import android.widget.ListView; + +/** + * ListView that its scroll position can be observed. + */ +public class ObservableListView extends ListView implements Scrollable { + + // Fields that should be saved onSaveInstanceState + private int mPrevFirstVisiblePosition; + private int mPrevFirstVisibleChildHeight = -1; + private int mPrevScrolledChildrenHeight; + private int mPrevScrollY; + private int mScrollY; + private SparseIntArray mChildrenHeights; + + // Fields that don't need to be saved onSaveInstanceState + private ObservableScrollViewCallbacks mCallbacks; + private ScrollState mScrollState; + private boolean mFirstScroll; + private boolean mDragging; + private boolean mIntercepted; + private MotionEvent mPrevMoveEvent; + private ViewGroup mTouchInterceptionViewGroup; + + private OnScrollListener mOriginalScrollListener; + private OnScrollListener mScrollListener = new OnScrollListener() { + @Override + public void onScrollStateChanged(AbsListView view, int scrollState) { + if (mOriginalScrollListener != null) { + mOriginalScrollListener.onScrollStateChanged(view, scrollState); + } + } + + @Override + public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { + if (mOriginalScrollListener != null) { + mOriginalScrollListener.onScroll(view, firstVisibleItem, visibleItemCount, totalItemCount); + } + // AbsListView#invokeOnItemScrollListener calls onScrollChanged(0, 0, 0, 0) + // on Android 4.0+, but Android 2.3 is not. (Android 3.0 is unknown) + // So call it with onScrollListener. + onScrollChanged(); + } + }; + + public ObservableListView(Context context) { + super(context); + init(); + } + + public ObservableListView(Context context, AttributeSet attrs) { + super(context, attrs); + init(); + } + + public ObservableListView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + init(); + } + + @Override + public void onRestoreInstanceState(Parcelable state) { + SavedState ss = (SavedState) state; + mPrevFirstVisiblePosition = ss.prevFirstVisiblePosition; + mPrevFirstVisibleChildHeight = ss.prevFirstVisibleChildHeight; + mPrevScrolledChildrenHeight = ss.prevScrolledChildrenHeight; + mPrevScrollY = ss.prevScrollY; + mScrollY = ss.scrollY; + mChildrenHeights = ss.childrenHeights; + super.onRestoreInstanceState(ss.getSuperState()); + } + + @Override + public Parcelable onSaveInstanceState() { + Parcelable superState = super.onSaveInstanceState(); + SavedState ss = new SavedState(superState); + ss.prevFirstVisiblePosition = mPrevFirstVisiblePosition; + ss.prevFirstVisibleChildHeight = mPrevFirstVisibleChildHeight; + ss.prevScrolledChildrenHeight = mPrevScrolledChildrenHeight; + ss.prevScrollY = mPrevScrollY; + ss.scrollY = mScrollY; + ss.childrenHeights = mChildrenHeights; + return ss; + } + + @Override + public boolean onInterceptTouchEvent(MotionEvent ev) { + if (mCallbacks != null) { + switch (ev.getActionMasked()) { + case MotionEvent.ACTION_DOWN: + // Whether or not motion events are consumed by children, + // flag initializations which are related to ACTION_DOWN events should be executed. + // Because if the ACTION_DOWN is consumed by children and only ACTION_MOVEs are + // passed to parent (this view), the flags will be invalid. + // Also, applications might implement initialization codes to onDownMotionEvent, + // so call it here. + mFirstScroll = mDragging = true; + mCallbacks.onDownMotionEvent(); + break; + } + } + return super.onInterceptTouchEvent(ev); + } + + @Override + public boolean onTouchEvent(MotionEvent ev) { + if (mCallbacks != null) { + switch (ev.getActionMasked()) { + case MotionEvent.ACTION_UP: + case MotionEvent.ACTION_CANCEL: + mIntercepted = false; + mDragging = false; + mCallbacks.onUpOrCancelMotionEvent(mScrollState); + break; + case MotionEvent.ACTION_MOVE: + if (mPrevMoveEvent == null) { + mPrevMoveEvent = ev; + } + float diffY = ev.getY() - mPrevMoveEvent.getY(); + mPrevMoveEvent = MotionEvent.obtainNoHistory(ev); + if (getCurrentScrollY() - diffY <= 0) { + // Can't scroll anymore. + + if (mIntercepted) { + // Already dispatched ACTION_DOWN event to parents, so stop here. + return false; + } + + // Apps can set the interception target other than the direct parent. + final ViewGroup parent; + if (mTouchInterceptionViewGroup == null) { + parent = (ViewGroup) getParent(); + } else { + parent = mTouchInterceptionViewGroup; + } + + // Get offset to parents. If the parent is not the direct parent, + // we should aggregate offsets from all of the parents. + float offsetX = 0; + float offsetY = 0; + for (View v = this; v != null && v != parent; v = (View) v.getParent()) { + offsetX += v.getLeft() - v.getScrollX(); + offsetY += v.getTop() - v.getScrollY(); + } + final MotionEvent event = MotionEvent.obtainNoHistory(ev); + event.offsetLocation(offsetX, offsetY); + + if (parent.onInterceptTouchEvent(event)) { + mIntercepted = true; + + // If the parent wants to intercept ACTION_MOVE events, + // we pass ACTION_DOWN event to the parent + // as if these touch events just have began now. + event.setAction(MotionEvent.ACTION_DOWN); + + // Return this onTouchEvent() first and set ACTION_DOWN event for parent + // to the queue, to keep events sequence. + post(new Runnable() { + @Override + public void run() { + parent.dispatchTouchEvent(event); + } + }); + return false; + } + // Even when this can't be scrolled anymore, + // simply returning false here may cause subView's click, + // so delegate it to super. + return super.onTouchEvent(ev); + } + break; + } + } + return super.onTouchEvent(ev); + } + + @Override + public void setOnScrollListener(OnScrollListener l) { + // Don't set l to super.setOnScrollListener(). + // l receives all events through mScrollListener. + mOriginalScrollListener = l; + } + + @Override + public void setScrollViewCallbacks(ObservableScrollViewCallbacks listener) { + mCallbacks = listener; + } + + @Override + public void setTouchInterceptionViewGroup(ViewGroup viewGroup) { + mTouchInterceptionViewGroup = viewGroup; + } + + @Override + public void scrollVerticallyTo(int y) { + View firstVisibleChild = getChildAt(0); + if (firstVisibleChild != null) { + int baseHeight = firstVisibleChild.getHeight(); + int position = y / baseHeight; + setSelection(position); + } + } + + @Override + public int getCurrentScrollY() { + return mScrollY; + } + + private void init() { + mChildrenHeights = new SparseIntArray(); + super.setOnScrollListener(mScrollListener); + } + + private void onScrollChanged() { + if (mCallbacks != null) { + if (getChildCount() > 0) { + int firstVisiblePosition = getFirstVisiblePosition(); + for (int i = getFirstVisiblePosition(), j = 0; i <= getLastVisiblePosition(); i++, j++) { + if (mChildrenHeights.indexOfKey(i) < 0 || getChildAt(j).getHeight() != mChildrenHeights.get(i)) { + mChildrenHeights.put(i, getChildAt(j).getHeight()); + } + } + + View firstVisibleChild = getChildAt(0); + if (firstVisibleChild != null) { + if (mPrevFirstVisiblePosition < firstVisiblePosition) { + // scroll down + int skippedChildrenHeight = 0; + if (firstVisiblePosition - mPrevFirstVisiblePosition != 1) { + for (int i = firstVisiblePosition - 1; i > mPrevFirstVisiblePosition; i--) { + if (0 < mChildrenHeights.indexOfKey(i)) { + skippedChildrenHeight += mChildrenHeights.get(i); + } else { + // Approximate each item's height to the first visible child. + // It may be incorrect, but without this, scrollY will be broken + // when scrolling from the bottom. + skippedChildrenHeight += firstVisibleChild.getHeight(); + } + } + } + mPrevScrolledChildrenHeight += mPrevFirstVisibleChildHeight + skippedChildrenHeight; + mPrevFirstVisibleChildHeight = firstVisibleChild.getHeight(); + } else if (firstVisiblePosition < mPrevFirstVisiblePosition) { + // scroll up + int skippedChildrenHeight = 0; + if (mPrevFirstVisiblePosition - firstVisiblePosition != 1) { + for (int i = mPrevFirstVisiblePosition - 1; i > firstVisiblePosition; i--) { + if (0 < mChildrenHeights.indexOfKey(i)) { + skippedChildrenHeight += mChildrenHeights.get(i); + } else { + // Approximate each item's height to the first visible child. + // It may be incorrect, but without this, scrollY will be broken + // when scrolling from the bottom. + skippedChildrenHeight += firstVisibleChild.getHeight(); + } + } + } + mPrevScrolledChildrenHeight -= firstVisibleChild.getHeight() + skippedChildrenHeight; + mPrevFirstVisibleChildHeight = firstVisibleChild.getHeight(); + } else if (firstVisiblePosition == 0) { + mPrevFirstVisibleChildHeight = firstVisibleChild.getHeight(); + } + if (mPrevFirstVisibleChildHeight < 0) { + mPrevFirstVisibleChildHeight = 0; + } + mScrollY = mPrevScrolledChildrenHeight - firstVisibleChild.getTop(); + mPrevFirstVisiblePosition = firstVisiblePosition; + + mCallbacks.onScrollChanged(mScrollY, mFirstScroll, mDragging); + if (mFirstScroll) { + mFirstScroll = false; + } + + if (mPrevScrollY < mScrollY) { + mScrollState = ScrollState.UP; + } else if (mScrollY < mPrevScrollY) { + mScrollState = ScrollState.DOWN; + } else { + mScrollState = ScrollState.STOP; + } + mPrevScrollY = mScrollY; + } + } + } + } + + static class SavedState extends BaseSavedState { + int prevFirstVisiblePosition; + int prevFirstVisibleChildHeight = -1; + int prevScrolledChildrenHeight; + int prevScrollY; + int scrollY; + SparseIntArray childrenHeights; + + /** + * Called by onSaveInstanceState. + */ + SavedState(Parcelable superState) { + super(superState); + } + + /** + * Called by CREATOR. + */ + private SavedState(Parcel in) { + super(in); + prevFirstVisiblePosition = in.readInt(); + prevFirstVisibleChildHeight = in.readInt(); + prevScrolledChildrenHeight = in.readInt(); + prevScrollY = in.readInt(); + scrollY = in.readInt(); + childrenHeights = new SparseIntArray(); + final int numOfChildren = in.readInt(); + if (0 < numOfChildren) { + for (int i = 0; i < numOfChildren; i++) { + final int key = in.readInt(); + final int value = in.readInt(); + childrenHeights.put(key, value); + } + } + } + + @Override + public void writeToParcel(Parcel out, int flags) { + super.writeToParcel(out, flags); + out.writeInt(prevFirstVisiblePosition); + out.writeInt(prevFirstVisibleChildHeight); + out.writeInt(prevScrolledChildrenHeight); + out.writeInt(prevScrollY); + out.writeInt(scrollY); + final int numOfChildren = childrenHeights == null ? 0 : childrenHeights.size(); + out.writeInt(numOfChildren); + if (0 < numOfChildren) { + for (int i = 0; i < numOfChildren; i++) { + out.writeInt(childrenHeights.keyAt(i)); + out.writeInt(childrenHeights.valueAt(i)); + } + } + } + + public static final Parcelable.Creator CREATOR + = new Parcelable.Creator() { + @Override + public SavedState createFromParcel(Parcel in) { + return new SavedState(in); + } + + @Override + public SavedState[] newArray(int size) { + return new SavedState[size]; + } + }; + } +} diff --git a/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableScrollView.java b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableScrollView.java new file mode 100755 index 0000000000..d38c0e2d5b --- /dev/null +++ b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableScrollView.java @@ -0,0 +1,252 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview; + +import android.content.Context; +import android.os.Parcel; +import android.os.Parcelable; +import android.util.AttributeSet; +import android.view.MotionEvent; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ScrollView; + +/** + * ScrollView that its scroll position can be observed. + */ +public class ObservableScrollView extends ScrollView implements Scrollable { + + // Fields that should be saved onSaveInstanceState + private int mPrevScrollY; + private int mScrollY; + + // Fields that don't need to be saved onSaveInstanceState + private ObservableScrollViewCallbacks mCallbacks; + private ScrollState mScrollState; + private boolean mFirstScroll; + private boolean mDragging; + private boolean mIntercepted; + private MotionEvent mPrevMoveEvent; + private ViewGroup mTouchInterceptionViewGroup; + + public ObservableScrollView(Context context) { + super(context); + } + + public ObservableScrollView(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public ObservableScrollView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + } + + @Override + public void onRestoreInstanceState(Parcelable state) { + SavedState ss = (SavedState) state; + mPrevScrollY = ss.prevScrollY; + mScrollY = ss.scrollY; + super.onRestoreInstanceState(ss.getSuperState()); + } + + @Override + public Parcelable onSaveInstanceState() { + Parcelable superState = super.onSaveInstanceState(); + SavedState ss = new SavedState(superState); + ss.prevScrollY = mPrevScrollY; + ss.scrollY = mScrollY; + return ss; + } + + @Override + protected void onScrollChanged(int l, int t, int oldl, int oldt) { + super.onScrollChanged(l, t, oldl, oldt); + if (mCallbacks != null) { + mScrollY = t; + + mCallbacks.onScrollChanged(t, mFirstScroll, mDragging); + if (mFirstScroll) { + mFirstScroll = false; + } + + if (mPrevScrollY < t) { + mScrollState = ScrollState.UP; + } else if (t < mPrevScrollY) { + mScrollState = ScrollState.DOWN; + //} else { + // Keep previous state while dragging. + // Never makes it STOP even if scrollY not changed. + // Before Android 4.4, onTouchEvent calls onScrollChanged directly for ACTION_MOVE, + // which makes mScrollState always STOP when onUpOrCancelMotionEvent is called. + // STOP state is now meaningless for ScrollView. + } + mPrevScrollY = t; + } + } + + @Override + public boolean onInterceptTouchEvent(MotionEvent ev) { + if (mCallbacks != null) { + switch (ev.getActionMasked()) { + case MotionEvent.ACTION_DOWN: + // Whether or not motion events are consumed by children, + // flag initializations which are related to ACTION_DOWN events should be executed. + // Because if the ACTION_DOWN is consumed by children and only ACTION_MOVEs are + // passed to parent (this view), the flags will be invalid. + // Also, applications might implement initialization codes to onDownMotionEvent, + // so call it here. + mFirstScroll = mDragging = true; + mCallbacks.onDownMotionEvent(); + break; + } + } + return super.onInterceptTouchEvent(ev); + } + + @Override + public boolean onTouchEvent(MotionEvent ev) { + if (mCallbacks != null) { + switch (ev.getActionMasked()) { + case MotionEvent.ACTION_UP: + case MotionEvent.ACTION_CANCEL: + mIntercepted = false; + mDragging = false; + mCallbacks.onUpOrCancelMotionEvent(mScrollState); + break; + case MotionEvent.ACTION_MOVE: + if (mPrevMoveEvent == null) { + mPrevMoveEvent = ev; + } + float diffY = ev.getY() - mPrevMoveEvent.getY(); + mPrevMoveEvent = MotionEvent.obtainNoHistory(ev); + if (getCurrentScrollY() - diffY <= 0) { + // Can't scroll anymore. + + if (mIntercepted) { + // Already dispatched ACTION_DOWN event to parents, so stop here. + return false; + } + + // Apps can set the interception target other than the direct parent. + final ViewGroup parent; + if (mTouchInterceptionViewGroup == null) { + parent = (ViewGroup) getParent(); + } else { + parent = mTouchInterceptionViewGroup; + } + + // Get offset to parents. If the parent is not the direct parent, + // we should aggregate offsets from all of the parents. + float offsetX = 0; + float offsetY = 0; + for (View v = this; v != null && v != parent; v = (View) v.getParent()) { + offsetX += v.getLeft() - v.getScrollX(); + offsetY += v.getTop() - v.getScrollY(); + } + final MotionEvent event = MotionEvent.obtainNoHistory(ev); + event.offsetLocation(offsetX, offsetY); + + if (parent.onInterceptTouchEvent(event)) { + mIntercepted = true; + + // If the parent wants to intercept ACTION_MOVE events, + // we pass ACTION_DOWN event to the parent + // as if these touch events just have began now. + event.setAction(MotionEvent.ACTION_DOWN); + + // Return this onTouchEvent() first and set ACTION_DOWN event for parent + // to the queue, to keep events sequence. + post(new Runnable() { + @Override + public void run() { + parent.dispatchTouchEvent(event); + } + }); + return false; + } + // Even when this can't be scrolled anymore, + // simply returning false here may cause subView's click, + // so delegate it to super. + return super.onTouchEvent(ev); + } + break; + } + } + return super.onTouchEvent(ev); + } + + @Override + public void setScrollViewCallbacks(ObservableScrollViewCallbacks listener) { + mCallbacks = listener; + } + + @Override + public void setTouchInterceptionViewGroup(ViewGroup viewGroup) { + mTouchInterceptionViewGroup = viewGroup; + } + + @Override + public void scrollVerticallyTo(int y) { + scrollTo(0, y); + } + + @Override + public int getCurrentScrollY() { + return mScrollY; + } + + static class SavedState extends BaseSavedState { + int prevScrollY; + int scrollY; + + /** + * Called by onSaveInstanceState. + */ + SavedState(Parcelable superState) { + super(superState); + } + + /** + * Called by CREATOR. + */ + private SavedState(Parcel in) { + super(in); + prevScrollY = in.readInt(); + scrollY = in.readInt(); + } + + @Override + public void writeToParcel(Parcel out, int flags) { + super.writeToParcel(out, flags); + out.writeInt(prevScrollY); + out.writeInt(scrollY); + } + + public static final Parcelable.Creator CREATOR + = new Parcelable.Creator() { + @Override + public SavedState createFromParcel(Parcel in) { + return new SavedState(in); + } + + @Override + public SavedState[] newArray(int size) { + return new SavedState[size]; + } + }; + } +} diff --git a/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableScrollViewCallbacks.java b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableScrollViewCallbacks.java new file mode 100755 index 0000000000..4f7e9c621d --- /dev/null +++ b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableScrollViewCallbacks.java @@ -0,0 +1,46 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview; + +/** + * Callbacks for Scrollable widgets. + */ +public interface ObservableScrollViewCallbacks { + /** + * Called when the scroll change events occurred. + * This won't be called just after the view is laid out, so if you'd like to + * initialize the position of your views with this method, you should call this manually + * or invoke scroll as appropriate. + * + * @param scrollY scroll position in Y axis + * @param firstScroll true when this is called for the first time in the consecutive motion events + * @param dragging true when the view is dragged and false when the view is scrolled in the inertia + */ + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging); + + /** + * Called when the down motion event occurred. + */ + public void onDownMotionEvent(); + + /** + * Called when the dragging ended or canceled. + * + * @param scrollState state to indicate the scroll direction + */ + public void onUpOrCancelMotionEvent(ScrollState scrollState); +} diff --git a/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableWebView.java b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableWebView.java new file mode 100755 index 0000000000..3e023f74a5 --- /dev/null +++ b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ObservableWebView.java @@ -0,0 +1,250 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview; + +import android.content.Context; +import android.os.Parcel; +import android.os.Parcelable; +import android.util.AttributeSet; +import android.view.MotionEvent; +import android.view.View; +import android.view.ViewGroup; +import android.webkit.WebView; + +/** + * WebView that its scroll position can be observed. + */ +public class ObservableWebView extends WebView implements Scrollable { + + // Fields that should be saved onSaveInstanceState + private int mPrevScrollY; + private int mScrollY; + + // Fields that don't need to be saved onSaveInstanceState + private ObservableScrollViewCallbacks mCallbacks; + private ScrollState mScrollState; + private boolean mFirstScroll; + private boolean mDragging; + private boolean mIntercepted; + private MotionEvent mPrevMoveEvent; + private ViewGroup mTouchInterceptionViewGroup; + + public ObservableWebView(Context context) { + super(context); + } + + public ObservableWebView(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public ObservableWebView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + } + + @Override + public void onRestoreInstanceState(Parcelable state) { + SavedState ss = (SavedState) state; + mPrevScrollY = ss.prevScrollY; + mScrollY = ss.scrollY; + super.onRestoreInstanceState(ss.getSuperState()); + } + + @Override + public Parcelable onSaveInstanceState() { + Parcelable superState = super.onSaveInstanceState(); + SavedState ss = new SavedState(superState); + ss.prevScrollY = mPrevScrollY; + ss.scrollY = mScrollY; + return ss; + } + + @Override + protected void onScrollChanged(int l, int t, int oldl, int oldt) { + super.onScrollChanged(l, t, oldl, oldt); + if (mCallbacks != null) { + mScrollY = t; + + mCallbacks.onScrollChanged(t, mFirstScroll, mDragging); + if (mFirstScroll) { + mFirstScroll = false; + } + + if (mPrevScrollY < t) { + mScrollState = ScrollState.UP; + } else if (t < mPrevScrollY) { + mScrollState = ScrollState.DOWN; + } else { + mScrollState = ScrollState.STOP; + } + mPrevScrollY = t; + } + } + + @Override + public boolean onInterceptTouchEvent(MotionEvent ev) { + if (mCallbacks != null) { + switch (ev.getActionMasked()) { + case MotionEvent.ACTION_DOWN: + // Whether or not motion events are consumed by children, + // flag initializations which are related to ACTION_DOWN events should be executed. + // Because if the ACTION_DOWN is consumed by children and only ACTION_MOVEs are + // passed to parent (this view), the flags will be invalid. + // Also, applications might implement initialization codes to onDownMotionEvent, + // so call it here. + mFirstScroll = mDragging = true; + mCallbacks.onDownMotionEvent(); + break; + } + } + return super.onInterceptTouchEvent(ev); + } + + @Override + public boolean onTouchEvent(MotionEvent ev) { + if (mCallbacks != null) { + switch (ev.getActionMasked()) { + case MotionEvent.ACTION_DOWN: + break; + case MotionEvent.ACTION_UP: + case MotionEvent.ACTION_CANCEL: + mIntercepted = false; + mDragging = false; + mCallbacks.onUpOrCancelMotionEvent(mScrollState); + break; + case MotionEvent.ACTION_MOVE: + if (mPrevMoveEvent == null) { + mPrevMoveEvent = ev; + } + float diffY = ev.getY() - mPrevMoveEvent.getY(); + mPrevMoveEvent = MotionEvent.obtainNoHistory(ev); + if (getCurrentScrollY() - diffY <= 0) { + // Can't scroll anymore. + + if (mIntercepted) { + // Already dispatched ACTION_DOWN event to parents, so stop here. + return false; + } + + // Apps can set the interception target other than the direct parent. + final ViewGroup parent; + if (mTouchInterceptionViewGroup == null) { + parent = (ViewGroup) getParent(); + } else { + parent = mTouchInterceptionViewGroup; + } + + // Get offset to parents. If the parent is not the direct parent, + // we should aggregate offsets from all of the parents. + float offsetX = 0; + float offsetY = 0; + for (View v = this; v != null && v != parent; v = (View) v.getParent()) { + offsetX += v.getLeft() - v.getScrollX(); + offsetY += v.getTop() - v.getScrollY(); + } + final MotionEvent event = MotionEvent.obtainNoHistory(ev); + event.offsetLocation(offsetX, offsetY); + + if (parent.onInterceptTouchEvent(event)) { + mIntercepted = true; + + // If the parent wants to intercept ACTION_MOVE events, + // we pass ACTION_DOWN event to the parent + // as if these touch events just have began now. + event.setAction(MotionEvent.ACTION_DOWN); + + // Return this onTouchEvent() first and set ACTION_DOWN event for parent + // to the queue, to keep events sequence. + post(new Runnable() { + @Override + public void run() { + parent.dispatchTouchEvent(event); + } + }); + return false; + } + // Even when this can't be scrolled anymore, + // simply returning false here may cause subView's click, + // so delegate it to super. + return super.onTouchEvent(ev); + } + break; + } + } + return super.onTouchEvent(ev); + } + + @Override + public void setScrollViewCallbacks(ObservableScrollViewCallbacks listener) { + mCallbacks = listener; + } + + @Override + public void setTouchInterceptionViewGroup(ViewGroup viewGroup) { + mTouchInterceptionViewGroup = viewGroup; + } + + @Override + public void scrollVerticallyTo(int y) { + scrollTo(0, y); + } + + @Override + public int getCurrentScrollY() { + return mScrollY; + } + + static class SavedState extends BaseSavedState { + int prevScrollY; + int scrollY; + + /** + * Called by onSaveInstanceState. + */ + SavedState(Parcelable superState) { + super(superState); + } + + /** + * Called by CREATOR. + */ + private SavedState(Parcel in) { + super(in); + prevScrollY = in.readInt(); + scrollY = in.readInt(); + } + + @Override + public void writeToParcel(Parcel out, int flags) { + super.writeToParcel(out, flags); + out.writeInt(prevScrollY); + out.writeInt(scrollY); + } + + public static final Parcelable.Creator CREATOR + = new Parcelable.Creator() { + @Override + public SavedState createFromParcel(Parcel in) { + return new SavedState(in); + } + + @Override + public SavedState[] newArray(int size) { + return new SavedState[size]; + } + }; + } +} diff --git a/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ScrollState.java b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ScrollState.java new file mode 100755 index 0000000000..ae2277160f --- /dev/null +++ b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ScrollState.java @@ -0,0 +1,38 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview; + +/** + * Constants that indicates the scroll state of the Scrollable widgets. + */ +public enum ScrollState { + /** + * Widget is stopped. + * This state does not always mean that this widget have never been scrolled. + */ + STOP, + + /** + * Widget is scrolled up by swiping it down. + */ + UP, + + /** + * Widget is scrolled down by swiping it up. + */ + DOWN, +} diff --git a/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ScrollUtils.java b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ScrollUtils.java new file mode 100755 index 0000000000..daec7556c0 --- /dev/null +++ b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/ScrollUtils.java @@ -0,0 +1,143 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview; + +import android.os.Build; +import android.view.View; +import android.view.ViewTreeObserver; + +/** + * Utilities for creating scrolling effects. + */ +public final class ScrollUtils { + + private ScrollUtils() { + } + + /** + * Return a float value within the range. + * This is just a wrapper for Math.min() and Math.max(). + * This may be useful if you feel it confusing ("Which is min and which is max?"). + * + * @param value the target value + * @param minValue minimum value. If value is less than this, minValue will be returned + * @param maxValue maximum value. If value is greater than this, maxValue will be returned + * @return float value limited to the range + */ + public static float getFloat(final float value, final float minValue, final float maxValue) { + return Math.min(maxValue, Math.max(minValue, value)); + } + + /** + * Create a color integer value with specified alpha. + * This may be useful to change alpha value of background color. + * + * @param alpha alpha value from 0.0f to 1.0f. + * @param baseColor base color. alpha value will be ignored. + * @return a color with alpha made from base color + */ + public static int getColorWithAlpha(float alpha, int baseColor) { + int a = Math.min(255, Math.max(0, (int) (alpha * 255))) << 24; + int rgb = 0x00ffffff & baseColor; + return a + rgb; + } + + /** + * Add an OnGlobalLayoutListener for the view. + * This is just a convenience method for using {@code ViewTreeObserver.OnGlobalLayoutListener()}. + * This also handles removing listener when onGlobalLayout is called. + * + * @param view the target view to add global layout listener + * @param runnable runnable to be executed after the view is laid out + */ + public static void addOnGlobalLayoutListener(final View view, final Runnable runnable) { + ViewTreeObserver vto = view.getViewTreeObserver(); + vto.addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { + @Override + public void onGlobalLayout() { + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { + view.getViewTreeObserver().removeGlobalOnLayoutListener(this); + } else { + view.getViewTreeObserver().removeOnGlobalLayoutListener(this); + } + runnable.run(); + } + }); + } + + /** + * Mix two colors. + * {@code toColor} will be {@code toAlpha/1} percent, + * and {@code fromColor} will be {@code (1-toAlpha)/1} percent. + * + * @param fromColor first color to be mixed + * @param toColor second color to be mixed + * @param toAlpha alpha value of toColor, 0.0f to 1.0f. + * @return mixed color value in ARGB. Alpha is fixed value (255). + */ + public static int mixColors(int fromColor, int toColor, float toAlpha) { + float[] fromCmyk = ScrollUtils.cmykFromRgb(fromColor); + float[] toCmyk = ScrollUtils.cmykFromRgb(toColor); + float[] result = new float[4]; + for (int i = 0; i < 4; i++) { + result[i] = Math.min(1, fromCmyk[i] * (1 - toAlpha) + toCmyk[i] * toAlpha); + } + return 0xff000000 + (0x00ffffff & ScrollUtils.rgbFromCmyk(result)); + } + + /** + * Convert RGB color to CMYK color. + * + * @param rgbColor target color + * @return CMYK array + */ + public static float[] cmykFromRgb(int rgbColor) { + int red = (0xff0000 & rgbColor) >> 16; + int green = (0xff00 & rgbColor) >> 8; + int blue = (0xff & rgbColor); + float black = Math.min(1.0f - red / 255.0f, Math.min(1.0f - green / 255.0f, 1.0f - blue / 255.0f)); + float cyan = 1.0f; + float magenta = 1.0f; + float yellow = 1.0f; + if (black != 1.0f) { + // black 1.0 causes zero divide + cyan = (1.0f - (red / 255.0f) - black) / (1.0f - black); + magenta = (1.0f - (green / 255.0f) - black) / (1.0f - black); + yellow = (1.0f - (blue / 255.0f) - black) / (1.0f - black); + } + return new float[]{cyan, magenta, yellow, black}; + } + + /** + * Convert CYMK color to RGB color. + * This method doesn't check f cmyk is not null or have 4 elements in array. + * + * @param cmyk target CYMK color. Each value should be between 0.0f to 1.0f, + * and should be set in this order: cyan, magenta, yellow, black. + * @return ARGB color. Alpha is fixed value (255). + */ + public static int rgbFromCmyk(float[] cmyk) { + float cyan = cmyk[0]; + float magenta = cmyk[1]; + float yellow = cmyk[2]; + float black = cmyk[3]; + int red = (int) ((1.0f - Math.min(1.0f, cyan * (1.0f - black) + black)) * 255); + int green = (int) ((1.0f - Math.min(1.0f, magenta * (1.0f - black) + black)) * 255); + int blue = (int) ((1.0f - Math.min(1.0f, yellow * (1.0f - black) + black)) * 255); + return ((0xff & red) << 16) + ((0xff & green) << 8) + (0xff & blue); + } +} diff --git a/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/Scrollable.java b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/Scrollable.java new file mode 100755 index 0000000000..1043b4bcaf --- /dev/null +++ b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/Scrollable.java @@ -0,0 +1,56 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview; + +import android.view.ViewGroup; + +/** + * Provides common API for observable and scrollable widgets. + */ +public interface Scrollable { + /** + * Sets a callback listener. + * + * @param listener listener to set + */ + void setScrollViewCallbacks(ObservableScrollViewCallbacks listener); + + /** + * Scrolls vertically to the absolute Y. + * Implemented classes are expected to scroll to the exact Y pixels from the top, + * but it depends on the type of the widget. + * + * @param y vertical position to scroll to + */ + void scrollVerticallyTo(int y); + + /** + * Returns the current Y of the scrollable view. + * + * @return current Y pixel + */ + int getCurrentScrollY(); + + /** + * Sets a touch motion event delegation ViewGroup. + * This is used to pass motion events back to parent view. + * It's up to the implementation classes whether or not it works. + * + * @param viewGroup ViewGroup object to dispatch motion events + */ + void setTouchInterceptionViewGroup(ViewGroup viewGroup); +} diff --git a/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/TouchInterceptionFrameLayout.java b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/TouchInterceptionFrameLayout.java new file mode 100755 index 0000000000..6a5ed557d7 --- /dev/null +++ b/eclipse-compile/observable/java/com/github/ksoichiro/android/observablescrollview/TouchInterceptionFrameLayout.java @@ -0,0 +1,286 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview; + +import android.annotation.TargetApi; +import android.content.Context; +import android.graphics.PointF; +import android.graphics.Rect; +import android.os.Build; +import android.util.AttributeSet; +import android.view.MotionEvent; +import android.view.View; +import android.widget.FrameLayout; + +/** + * A layout that delegates interception of touch motion events. + * This layout is provided to move the container of Scrollable views using scroll position. + * Please note that this class overrides or uses touch events API such as onTouchEvent, + * onInterceptTouchEvent and dispatchTouchEvent, + * so be careful when you handle touches with this layout. + */ +public class TouchInterceptionFrameLayout extends FrameLayout { + + /** + * Callbacks for TouchInterceptionFrameLayout. + */ + public interface TouchInterceptionListener { + /** + * Determines whether the layout should intercept this event. + * + * @param ev motion event + * @param moving true if this event is ACTION_MOVE type + * @param diffX difference between previous X and current X, if moving is true + * @param diffY difference between previous Y and current Y, if moving is true + * @return true if the layout should intercept + */ + boolean shouldInterceptTouchEvent(MotionEvent ev, boolean moving, float diffX, float diffY); + + /** + * Called if the down motion event is intercepted by this layout. + * + * @param ev motion event + */ + void onDownMotionEvent(MotionEvent ev); + + /** + * Called if the move motion event is intercepted by this layout. + * + * @param ev motion event + * @param diffX difference between previous X and current X + * @param diffY difference between previous Y and current Y + */ + void onMoveMotionEvent(MotionEvent ev, float diffX, float diffY); + + /** + * Called if the up (or cancel) motion event is intercepted by this layout. + * + * @param ev motion event + */ + void onUpOrCancelMotionEvent(MotionEvent ev); + } + + private boolean mIntercepting; + private boolean mDownMotionEventPended; + private boolean mBeganFromDownMotionEvent; + private boolean mChildrenEventsCanceled; + private PointF mInitialPoint; + private MotionEvent mPendingDownMotionEvent; + private TouchInterceptionListener mTouchInterceptionListener; + + public TouchInterceptionFrameLayout(Context context) { + super(context); + } + + public TouchInterceptionFrameLayout(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public TouchInterceptionFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + @TargetApi(Build.VERSION_CODES.LOLLIPOP) + public TouchInterceptionFrameLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + } + + public void setScrollInterceptionListener(TouchInterceptionListener listener) { + mTouchInterceptionListener = listener; + } + + @Override + public boolean onInterceptTouchEvent(MotionEvent ev) { + if (mTouchInterceptionListener == null) { + return false; + } + + // In here, we must initialize touch state variables + // and ask if we should intercept this event. + // Whether we should intercept or not is kept for the later event handling. + switch (ev.getActionMasked()) { + case MotionEvent.ACTION_DOWN: + mInitialPoint = new PointF(ev.getX(), ev.getY()); + mPendingDownMotionEvent = MotionEvent.obtainNoHistory(ev); + mDownMotionEventPended = true; + mIntercepting = mTouchInterceptionListener.shouldInterceptTouchEvent(ev, false, 0, 0); + mBeganFromDownMotionEvent = mIntercepting; + mChildrenEventsCanceled = false; + return mIntercepting; + case MotionEvent.ACTION_MOVE: + // ACTION_MOVE will be passed suddenly, so initialize to avoid exception. + if (mInitialPoint == null) { + mInitialPoint = new PointF(ev.getX(), ev.getY()); + } + + // diffX and diffY are the origin of the motion, and should be difference + // from the position of the ACTION_DOWN event occurred. + float diffX = ev.getX() - mInitialPoint.x; + float diffY = ev.getY() - mInitialPoint.y; + mIntercepting = mTouchInterceptionListener.shouldInterceptTouchEvent(ev, true, diffX, diffY); + return mIntercepting; + } + return false; + } + + @Override + public boolean onTouchEvent(MotionEvent ev) { + if (mTouchInterceptionListener != null) { + switch (ev.getActionMasked()) { + case MotionEvent.ACTION_DOWN: + if (mIntercepting) { + mTouchInterceptionListener.onDownMotionEvent(ev); + duplicateTouchEventForChildren(ev); + return true; + } + break; + case MotionEvent.ACTION_MOVE: + // ACTION_MOVE will be passed suddenly, so initialize to avoid exception. + if (mInitialPoint == null) { + mInitialPoint = new PointF(ev.getX(), ev.getY()); + } + + // diffX and diffY are the origin of the motion, and should be difference + // from the position of the ACTION_DOWN event occurred. + float diffX = ev.getX() - mInitialPoint.x; + float diffY = ev.getY() - mInitialPoint.y; + mIntercepting = mTouchInterceptionListener.shouldInterceptTouchEvent(ev, true, diffX, diffY); + if (mIntercepting) { + // If this layout didn't receive ACTION_DOWN motion event, + // we should generate ACTION_DOWN event with current position. + if (!mBeganFromDownMotionEvent) { + mBeganFromDownMotionEvent = true; + + MotionEvent event = MotionEvent.obtainNoHistory(mPendingDownMotionEvent); + event.setLocation(ev.getX(), ev.getY()); + mTouchInterceptionListener.onDownMotionEvent(event); + + mInitialPoint = new PointF(ev.getX(), ev.getY()); + diffX = diffY = 0; + } + + // Children's touches should be canceled + if (!mChildrenEventsCanceled) { + mChildrenEventsCanceled = true; + duplicateTouchEventForChildren(obtainMotionEvent(ev, MotionEvent.ACTION_CANCEL)); + } + + mTouchInterceptionListener.onMoveMotionEvent(ev, diffX, diffY); + + // If next mIntercepting become false, + // then we should generate fake ACTION_DOWN event. + // Therefore we set pending flag to true as if this is a down motion event. + mDownMotionEventPended = true; + + // Whether or not this event is consumed by the listener, + // assume it consumed because we declared to intercept the event. + return true; + } else { + if (mDownMotionEventPended) { + mDownMotionEventPended = false; + MotionEvent event = MotionEvent.obtainNoHistory(mPendingDownMotionEvent); + event.setLocation(ev.getX(), ev.getY()); + duplicateTouchEventForChildren(ev, event); + } else { + duplicateTouchEventForChildren(ev); + } + + // If next mIntercepting become true, + // then we should generate fake ACTION_DOWN event. + // Therefore we set beganFromDownMotionEvent flag to false + // as if we haven't received a down motion event. + mBeganFromDownMotionEvent = false; + + // Reserve children's click cancellation here if they've already canceled + mChildrenEventsCanceled = false; + } + break; + case MotionEvent.ACTION_UP: + case MotionEvent.ACTION_CANCEL: + mBeganFromDownMotionEvent = false; + if (mIntercepting) { + mTouchInterceptionListener.onUpOrCancelMotionEvent(ev); + } + + // Children's touches should be canceled regardless of + // whether or not this layout intercepted the consecutive motion events. + if (!mChildrenEventsCanceled) { + mChildrenEventsCanceled = true; + if (mDownMotionEventPended) { + mDownMotionEventPended = false; + MotionEvent event = MotionEvent.obtainNoHistory(mPendingDownMotionEvent); + event.setLocation(ev.getX(), ev.getY()); + duplicateTouchEventForChildren(ev, event); + } else { + duplicateTouchEventForChildren(ev); + } + } + return true; + } + } + return super.onTouchEvent(ev); + } + + private MotionEvent obtainMotionEvent(MotionEvent base, int action) { + MotionEvent ev = MotionEvent.obtainNoHistory(base); + ev.setAction(action); + return ev; + } + + /** + * Duplicate touch events to child views. + * We want to dispatch a down motion event and the move events to + * child views, but calling dispatchTouchEvent() causes StackOverflowError. + * Therefore we do it manually. + * + * @param ev motion event to be passed to children + * @param pendingEvents pending events like ACTION_DOWN. This will be passed to the children before ev + */ + private void duplicateTouchEventForChildren(MotionEvent ev, MotionEvent... pendingEvents) { + if (ev == null) { + return; + } + for (int i = getChildCount() - 1; 0 <= i; i--) { + View childView = getChildAt(i); + if (childView != null) { + Rect childRect = new Rect(); + childView.getHitRect(childRect); + MotionEvent event = MotionEvent.obtainNoHistory(ev); + if (!childRect.contains((int) event.getX(), (int) event.getY())) { + continue; + } + float offsetX = -childView.getLeft(); + float offsetY = -childView.getTop(); + boolean consumed = false; + if (pendingEvents != null) { + for (MotionEvent pe : pendingEvents) { + if (pe != null) { + MotionEvent peAdjusted = MotionEvent.obtainNoHistory(pe); + peAdjusted.offsetLocation(offsetX, offsetY); + consumed |= childView.dispatchTouchEvent(peAdjusted); + } + } + } + event.offsetLocation(offsetX, offsetY); + consumed |= childView.dispatchTouchEvent(event); + if (consumed) { + break; + } + } + } + } +} diff --git a/eclipse-compile/observable/java2/androidTest/AndroidManifest.xml b/eclipse-compile/observable/java2/androidTest/AndroidManifest.xml new file mode 100755 index 0000000000..0bbcb89165 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/AndroidManifest.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eclipse-compile/observable/java2/androidTest/assets/lipsum.html b/eclipse-compile/observable/java2/androidTest/assets/lipsum.html new file mode 100755 index 0000000000..7d71889e3b --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/assets/lipsum.html @@ -0,0 +1,17 @@ + + + + + +
+

Lorem ipsum dolor sit amet, ut duis lorem provident sed felis blandit, condimentum donec lectus ipsum et mauris, morbi porttitor interdum feugiat nulla donec sodales, vestibulum nisl primis a molestie vestibulum quam, sapien mauris metus risus suspendisse magnis. Augue viverra nulla faucibus egestas eu, a etiam id congue rutrum ante, arcu tincidunt donec quam felis at ornare, iaculis ligula sodales venenatis commodo volutpat neque, suspendisse elit praesent tellus felis mi amet. Inceptos amet tempor lectus lorem est non, ac donec ac libero neque mauris, tellus ante metus eget leo consequat. Scelerisque dolor curabitur pretium blandit ut feugiat, amet lacus pulvinar justo convallis ut, sed natoque ipsum urna posuere nibh eu. Sed at sed vulputate sit orci, facilisis a aliquam tellus quam aliquam, eu aliquam donec at molestie ante, pellentesque mauris lorem ultrices libero faucibus porta, imperdiet adipiscing sit hac diam ut nulla. Lacus enim elit pulvinar donec vehicula dapibus, accumsan purus officia cursus dolor sapien, eu amet dis mauris mi nulla ut. Non accusamus etiam pede non urna tempus, vestibulum aliquam tortor eget pharetra sodales, in vestibulum ut justo orci nulla, lobortis purus sem semper consectetuer magni purus. Dolor a leo vestibulum amet ut sit, arcu ut eaque urna fusce aliquet turpis, sed fermentum sed vestibulum nisl pede, tristique enim lorem posuere in laborum ut. Vestibulum id id justo leo nulla, magna lobortis ullamcorper et dignissim pellentesque, duis suspendisse quis id lorem ante. Vivamus a nullam ante adipiscing amet, mi vel consectetuer nunc aenean pede quisque, eget rhoncus dis porttitor habitant nunc vivamus, duis cubilia blandit non donec justo dictumst, praesent vitae nulla nam pulvinar urna. Adipiscing adipiscing justo urna pulvinar imperdiet nullam, vitae fusce rhoncus proin nonummy suscipit, ullamcorper amet et non potenti platea ultrices, mauris nullam sapien nunc justo vel, eu semper pellentesque arcu fusce augue. Malesuada mauris nibh sit a a scelerisque, velit sem lectus tellus convallis consectetuer, ultricies auctor a ante eros amet sed.

+

Risus lacus duis leo platea wisi, felis maecenas rutrum in id in donec, non id a potenti libero eget, posuere elit ea sed pellentesque quis. Sunt lacus urna lorem elit duis, nibh donec purus quisque consectetuer dolor, neque vestibulum proin ornare eros nonummy phasellus. Iaculis cras eu at egestas dolor montes, viverra quisque malesuada consectetuer semper maecenas, a sed vitae donec tempor aliqua metus, ornare mollis suscipit et erat fusce, sit orci aut auctor elementum fames aliquam. Platea dui integer magnis non metus, minus dignissimos ante massa nostra et, rutrum sapien egestas quis sapien donec donec. Erat sit a eros aenean natoque, quam libero id lorem enim proin, lorem ipsum fermentum mattis metus et. Aliquam aliquet suscipit purus conubia at neque, platea vivamus vestibulum nulla quibusdam senectus, et morbi lectus malesuada gravida donec, elementum sit convallis pellentesque velit amet. Et eveniet viverra vehicula consectetuer justo, provident sed commodo non lacinia velit, tempor phasellus vel leo nisl cras, vivamus et arcu interdum dui eu amet. Volutpat wisi rhoncus vel turpis diam quibusdam, dapibus elit est quisque cubilia mauris, nulla elit magna tempor accumsan bibendum, lorem varius sed interdum eget mattis, scelerisque egestas feugiat donec dui molestie. Leo facilisis nisl sit montes ligula sed, enim commodo consectetuer nunc est et, ut sed vehicula dolor luctus elit. Fermentum cras donec eget nibh est vel, sed justo risus et pharetra diam, eu vivamus egestas ligula risus diam, sed justo eget hac ut mauris. Vestibulum diam nec vitae mi eget suspendisse, aenean arcu purus facilisis purus class in, id aliquam sit id scelerisque sapien etiam. Ut nullam sit sed at mauris lobortis, consequat dolor autem ipsum euismod nulla, elit quis proin eget conubia varius, erat arcu massa mus in mauris, scelerisque ut eu sollicitudin libero leo urna.

+

Consectetuer luctus tempor elit ut dolor ligula, quis dui per dui hendrerit ante sagittis, in quisque pretium in eleifend enim. Condimentum iaculis vitae feugiat dis tellus vel, lectus dolor nec dui nulla nascetur, et pellentesque curabitur lorem leo velit eget. Id nascetur arcu lobortis suspendisse imperdiet urna, natoque nascetur ante in porta a, interdum hendrerit mi bibendum platea tellus, urna in enim ornare vestibulum faucibus enim. Leo fusce egestas ante nec volutpat, in tempor vel facilisis potenti ut, pede at non lorem a commodo, nulla dolor orci interdum vestibulum nulla. Dui nulla vestibulum quisque a pharetra porta, integer nec ipsum nec sed dui pharetra, magna et dignissim ipsum sed dictum, litora eros vivamus scelerisque libero ipsum. Sed ac ac lorem molestie adipiscing morbi, pellentesque imperdiet nunc quis morbi amet ante, libero dui ligula nec risus neque et, velit nonummy phasellus et facilisi amet, ligula in elementum non sapien pulvinar faucibus. Eu leo ut posuere sed aliquet, tincidunt vel urna volutpat tempus sem, sit felis aliquet vestibulum condimentum sit, amet nibh vel tellus purus ullamcorper libero, nulla vestibulum pede ut vestibulum pretium. Eu nulla vestibulum a neque in metus, quisquam nam sed cursus eget luctus, pede ultrices nec sed dignissim pellentesque, sit class cursus metus nulla placerat mauris, consequat mollis neque vivamus amet pede. Mauris dolor nulla diam eros bibendum, quam ante vestibulum morbi non ligula vel, molestie curabitur rhoncus nulla euismod interdum non. Nulla fringilla lorem mollis ad massa, sit molestie nibh lorem arcu volutpat, accumsan commodo lectus eu et donec, sit tempor tempus rutrum in curabitur amet. Nec urna euismod a tincidunt commodo, eu pede turpis libero vitae viverra, ante vestibulum nam non habitasse potenti, mauris imperdiet in in nunc convallis. Et nostra wisi in est accumsan vehicula, quisque vitae felis mauris sed vulputate nec, ante imperdiet sollicitudin massa iaculis massa sit.

+

Quam libero nulla netus eu porta curae, ut nulla bibendum facilisis et urna sed, quis congue vestibulum aliquam interdum etiam. Nulla vel lobortis ullamcorper vitae excepturi, neque urna feugiat lectus vel lacinia, massa pretium orci eu metus neque vulputate. Imperdiet ac velit rhoncus nulla malesuada nullam, nec pulvinar justo gravida lorem rutrum magna, habitasse repudiandae mi eros vestibulum ante, nec euismod dui iaculis in turpis pretium, ac id metus egestas proin lacus lectus. Laoreet lorem nec vitae risus erat arcu, vitae quam ut in ante tristique, porta dolor pede quam et odio nam, arcu lacus sem congue ante cursus massa. Et mattis sagittis erat accumsan fusce quam, vehicula ligula beatae natoque fusce sodales conubia, habitasse metus cum magnis viverra nam cursus, egestas urna wisi primis blandit eu magna, eget libero elit lacus lorem dis aliquam. Ut mauris ante natoque lacus massa, justo a lectus sodales enim adipiscing id, accumsan ut ipsum vestibulum sed enim auctor, vitae congue tincidunt id phasellus lacinia scelerisque, tincidunt sapien nulla euismod volutpat iaculis. Platea sociis nec aliquet nec molestie, in mi et augue sapien in vivamus, integer fames proin vitae in ullamcorper et. Fringilla etiam sapiente rhoncus suspendisse nec id, lobortis cras eget egestas dui ac nec, justo lacus ut lorem bibendum quia eros, eget a gravida id donec nunc suscipit, porta sed in sodales non rutrum. Lectus vel dui elementum pellentesque magna aliquam, vitae non sit pede et fusce nibh, id id deserunt ornare dui sit condimentum, in adipiscing imperdiet turpis nam aliquet, facilisis metus magna lacus wisi facilisis tortor. Vulputate elit accumsan quam amet ligula, suspendisse lacus mi nonummy integer urna, libero nulla nunc varius in odio, laoreet nulla amet placerat amet nec. Consectetuer vel massa hendrerit vitae iaculis id, sed ut ut laudantium odio in, elit vestibulum duis ante maecenas interdum in, neque vehicula ultrices varius in quam, pede tellus pellentesque sed nullam quis.

+
+ + \ No newline at end of file diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/SavedStateTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/SavedStateTest.java new file mode 100755 index 0000000000..c98d0fa50b --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/SavedStateTest.java @@ -0,0 +1,129 @@ +package com.github.ksoichiro.android.observablescrollview; + +import android.os.Parcel; +import android.test.InstrumentationTestCase; +import android.util.SparseIntArray; +import android.view.AbsSavedState; + +public class SavedStateTest extends InstrumentationTestCase { + + public void testGridViewSavedState() throws Throwable { + Parcel parcel = Parcel.obtain(); + ObservableGridView.SavedState state1 = new ObservableGridView.SavedState(AbsSavedState.EMPTY_STATE); + state1.prevFirstVisiblePosition = 1; + state1.prevFirstVisibleChildHeight = 2; + state1.prevScrolledChildrenHeight = 3; + state1.prevScrollY = 4; + state1.scrollY = 5; + state1.childrenHeights = new SparseIntArray(); + state1.childrenHeights.put(0, 10); + state1.childrenHeights.put(1, 20); + state1.childrenHeights.put(2, 30); + state1.writeToParcel(parcel, 0); + + parcel.setDataPosition(0); + + ObservableGridView.SavedState state2 = ObservableGridView.SavedState.CREATOR.createFromParcel(parcel); + assertNotNull(state2); + assertEquals(state1.prevFirstVisiblePosition, state2.prevFirstVisiblePosition); + assertEquals(state1.prevFirstVisibleChildHeight, state2.prevFirstVisibleChildHeight); + assertEquals(state1.prevScrolledChildrenHeight, state2.prevScrolledChildrenHeight); + assertEquals(state1.prevScrollY, state2.prevScrollY); + assertEquals(state1.scrollY, state2.scrollY); + assertNotNull(state1.childrenHeights); + assertEquals(3, state1.childrenHeights.size()); + assertEquals(10, state1.childrenHeights.get(0)); + assertEquals(20, state1.childrenHeights.get(1)); + assertEquals(30, state1.childrenHeights.get(2)); + } + + public void testListViewSavedState() throws Throwable { + Parcel parcel = Parcel.obtain(); + ObservableListView.SavedState state1 = new ObservableListView.SavedState(AbsSavedState.EMPTY_STATE); + state1.prevFirstVisiblePosition = 1; + state1.prevFirstVisibleChildHeight = 2; + state1.prevScrolledChildrenHeight = 3; + state1.prevScrollY = 4; + state1.scrollY = 5; + state1.childrenHeights = new SparseIntArray(); + state1.childrenHeights.put(0, 10); + state1.childrenHeights.put(1, 20); + state1.childrenHeights.put(2, 30); + state1.writeToParcel(parcel, 0); + + parcel.setDataPosition(0); + + ObservableListView.SavedState state2 = ObservableListView.SavedState.CREATOR.createFromParcel(parcel); + assertNotNull(state2); + assertEquals(state1.prevFirstVisiblePosition, state2.prevFirstVisiblePosition); + assertEquals(state1.prevFirstVisibleChildHeight, state2.prevFirstVisibleChildHeight); + assertEquals(state1.prevScrolledChildrenHeight, state2.prevScrolledChildrenHeight); + assertEquals(state1.prevScrollY, state2.prevScrollY); + assertEquals(state1.scrollY, state2.scrollY); + assertNotNull(state1.childrenHeights); + assertEquals(3, state1.childrenHeights.size()); + assertEquals(10, state1.childrenHeights.get(0)); + assertEquals(20, state1.childrenHeights.get(1)); + assertEquals(30, state1.childrenHeights.get(2)); + } + + public void testRecyclerViewSavedState() throws Throwable { + Parcel parcel = Parcel.obtain(); + ObservableRecyclerView.SavedState state1 = new ObservableRecyclerView.SavedState(AbsSavedState.EMPTY_STATE); + state1.prevFirstVisiblePosition = 1; + state1.prevFirstVisibleChildHeight = 2; + state1.prevScrolledChildrenHeight = 3; + state1.prevScrollY = 4; + state1.scrollY = 5; + state1.childrenHeights = new SparseIntArray(); + state1.childrenHeights.put(0, 10); + state1.childrenHeights.put(1, 20); + state1.childrenHeights.put(2, 30); + state1.writeToParcel(parcel, 0); + + parcel.setDataPosition(0); + + ObservableRecyclerView.SavedState state2 = ObservableRecyclerView.SavedState.CREATOR.createFromParcel(parcel); + assertNotNull(state2); + assertEquals(state1.prevFirstVisiblePosition, state2.prevFirstVisiblePosition); + assertEquals(state1.prevFirstVisibleChildHeight, state2.prevFirstVisibleChildHeight); + assertEquals(state1.prevScrolledChildrenHeight, state2.prevScrolledChildrenHeight); + assertEquals(state1.prevScrollY, state2.prevScrollY); + assertEquals(state1.scrollY, state2.scrollY); + assertNotNull(state1.childrenHeights); + assertEquals(3, state1.childrenHeights.size()); + assertEquals(10, state1.childrenHeights.get(0)); + assertEquals(20, state1.childrenHeights.get(1)); + assertEquals(30, state1.childrenHeights.get(2)); + } + + public void testScrollViewSavedState() throws Throwable { + Parcel parcel = Parcel.obtain(); + ObservableScrollView.SavedState state1 = new ObservableScrollView.SavedState(AbsSavedState.EMPTY_STATE); + state1.prevScrollY = 1; + state1.scrollY = 2; + state1.writeToParcel(parcel, 0); + + parcel.setDataPosition(0); + + ObservableScrollView.SavedState state2 = ObservableScrollView.SavedState.CREATOR.createFromParcel(parcel); + assertNotNull(state2); + assertEquals(state1.prevScrollY, state2.prevScrollY); + assertEquals(state1.scrollY, state2.scrollY); + } + + public void testWebViewSavedState() throws Throwable { + Parcel parcel = Parcel.obtain(); + ObservableWebView.SavedState state1 = new ObservableWebView.SavedState(AbsSavedState.EMPTY_STATE); + state1.prevScrollY = 1; + state1.scrollY = 2; + state1.writeToParcel(parcel, 0); + + parcel.setDataPosition(0); + + ObservableWebView.SavedState state2 = ObservableWebView.SavedState.CREATOR.createFromParcel(parcel); + assertNotNull(state2); + assertEquals(state1.prevScrollY, state2.prevScrollY); + assertEquals(state1.scrollY, state2.scrollY); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/GridViewActivity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/GridViewActivity.java new file mode 100755 index 0000000000..111b616fda --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/GridViewActivity.java @@ -0,0 +1,42 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.widget.AbsListView; + +import com.github.ksoichiro.android.observablescrollview.ObservableGridView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollState; + +public class GridViewActivity extends Activity implements ObservableScrollViewCallbacks { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_gridview); + ObservableGridView scrollable = (ObservableGridView) findViewById(R.id.scrollable); + scrollable.setScrollViewCallbacks(this); + UiTestUtils.setDummyData(this, scrollable); + scrollable.setOnScrollListener(new AbsListView.OnScrollListener() { + @Override + public void onScrollStateChanged(AbsListView view, int scrollState) { + } + + @Override + public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { + } + }); + } + + @Override + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { + } + + @Override + public void onDownMotionEvent() { + } + + @Override + public void onUpOrCancelMotionEvent(ScrollState scrollState) { + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/GridViewActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/GridViewActivityTest.java new file mode 100755 index 0000000000..7a08f3502b --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/GridViewActivityTest.java @@ -0,0 +1,58 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.test.ActivityInstrumentationTestCase2; +import android.util.DisplayMetrics; +import android.util.TypedValue; + +import com.github.ksoichiro.android.observablescrollview.ObservableGridView; + +public class GridViewActivityTest extends ActivityInstrumentationTestCase2 { + + private Activity activity; + private ObservableGridView scrollable; + + public GridViewActivityTest() { + super(GridViewActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + scrollable = (ObservableGridView) activity.findViewById(R.id.scrollable); + } + + public void testScroll() throws Throwable { + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + } + + public void testSaveAndRestoreInstanceState() throws Throwable { + UiTestUtils.saveAndRestoreInstanceState(this, activity); + testScroll(); + } + + public void testScrollVerticallyTo() throws Throwable { + final DisplayMetrics metrics = activity.getResources().getDisplayMetrics(); + runTestOnUiThread(new Runnable() { + @Override + public void run() { + scrollable.scrollVerticallyTo((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 48, metrics)); + } + }); + getInstrumentation().waitForIdleSync(); + + runTestOnUiThread(new Runnable() { + @Override + public void run() { + scrollable.scrollVerticallyTo(0); + } + }); + getInstrumentation().waitForIdleSync(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ListViewActivity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ListViewActivity.java new file mode 100755 index 0000000000..5d6dc79611 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ListViewActivity.java @@ -0,0 +1,42 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.widget.AbsListView; + +import com.github.ksoichiro.android.observablescrollview.ObservableListView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollState; + +public class ListViewActivity extends Activity implements ObservableScrollViewCallbacks { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_listview); + ObservableListView scrollable = (ObservableListView) findViewById(R.id.scrollable); + scrollable.setScrollViewCallbacks(this); + UiTestUtils.setDummyData(this, scrollable); + scrollable.setOnScrollListener(new AbsListView.OnScrollListener() { + @Override + public void onScrollStateChanged(AbsListView view, int scrollState) { + } + + @Override + public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { + } + }); + } + + @Override + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { + } + + @Override + public void onDownMotionEvent() { + } + + @Override + public void onUpOrCancelMotionEvent(ScrollState scrollState) { + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ListViewActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ListViewActivityTest.java new file mode 100755 index 0000000000..188fbc4fbc --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ListViewActivityTest.java @@ -0,0 +1,58 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.test.ActivityInstrumentationTestCase2; +import android.util.DisplayMetrics; +import android.util.TypedValue; + +import com.github.ksoichiro.android.observablescrollview.ObservableListView; + +public class ListViewActivityTest extends ActivityInstrumentationTestCase2 { + + private Activity activity; + private ObservableListView scrollable; + + public ListViewActivityTest() { + super(ListViewActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + scrollable = (ObservableListView) activity.findViewById(R.id.scrollable); + } + + public void testScroll() throws Throwable { + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + } + + public void testSaveAndRestoreInstanceState() throws Throwable { + UiTestUtils.saveAndRestoreInstanceState(this, activity); + testScroll(); + } + + public void testScrollVerticallyTo() throws Throwable { + final DisplayMetrics metrics = activity.getResources().getDisplayMetrics(); + runTestOnUiThread(new Runnable() { + @Override + public void run() { + scrollable.scrollVerticallyTo((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 48, metrics)); + } + }); + getInstrumentation().waitForIdleSync(); + + runTestOnUiThread(new Runnable() { + @Override + public void run() { + scrollable.scrollVerticallyTo(0); + } + }); + getInstrumentation().waitForIdleSync(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ListViewScrollFromBottomActivity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ListViewScrollFromBottomActivity.java new file mode 100755 index 0000000000..6a3509b2aa --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ListViewScrollFromBottomActivity.java @@ -0,0 +1,24 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.os.Bundle; + +import com.github.ksoichiro.android.observablescrollview.ObservableListView; +import com.github.ksoichiro.android.observablescrollview.ScrollUtils; + +public class ListViewScrollFromBottomActivity extends ListViewActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + final ObservableListView scrollable = (ObservableListView) findViewById(R.id.scrollable); + ScrollUtils.addOnGlobalLayoutListener(scrollable, new Runnable() { + @Override + public void run() { + int count = scrollable.getAdapter().getCount() - 1; + int position = count == 0 ? 1 : count > 0 ? count : 0; + scrollable.smoothScrollToPosition(position); + scrollable.setSelection(position); + } + }); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ListViewScrollFromBottomActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ListViewScrollFromBottomActivityTest.java new file mode 100755 index 0000000000..db8b465bba --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ListViewScrollFromBottomActivityTest.java @@ -0,0 +1,32 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.test.ActivityInstrumentationTestCase2; + +import com.github.ksoichiro.android.observablescrollview.ObservableListView; + +public class ListViewScrollFromBottomActivityTest extends ActivityInstrumentationTestCase2 { + + private Activity activity; + private ObservableListView scrollable; + + public ListViewScrollFromBottomActivityTest() { + super(ListViewScrollFromBottomActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + scrollable = (ObservableListView) activity.findViewById(R.id.scrollable); + } + + public void testScroll() throws Throwable { + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/RecyclerViewActivity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/RecyclerViewActivity.java new file mode 100755 index 0000000000..0175397494 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/RecyclerViewActivity.java @@ -0,0 +1,36 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.support.v7.widget.LinearLayoutManager; + +import com.github.ksoichiro.android.observablescrollview.ObservableRecyclerView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollState; + +public class RecyclerViewActivity extends Activity implements ObservableScrollViewCallbacks { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_recyclerview); + + ObservableRecyclerView recyclerView = (ObservableRecyclerView) findViewById(R.id.scrollable); + recyclerView.setLayoutManager(new LinearLayoutManager(this)); + recyclerView.setHasFixedSize(true); + recyclerView.setScrollViewCallbacks(this); + UiTestUtils.setDummyData(this, recyclerView); + } + + @Override + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { + } + + @Override + public void onDownMotionEvent() { + } + + @Override + public void onUpOrCancelMotionEvent(ScrollState scrollState) { + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/RecyclerViewActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/RecyclerViewActivityTest.java new file mode 100755 index 0000000000..33335ed057 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/RecyclerViewActivityTest.java @@ -0,0 +1,59 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.test.ActivityInstrumentationTestCase2; +import android.util.DisplayMetrics; +import android.util.TypedValue; + +import com.github.ksoichiro.android.observablescrollview.ObservableRecyclerView; + +public class RecyclerViewActivityTest extends ActivityInstrumentationTestCase2 { + + private Activity activity; + private ObservableRecyclerView scrollable; + + public RecyclerViewActivityTest() { + super(RecyclerViewActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + scrollable = (ObservableRecyclerView) activity.findViewById(R.id.scrollable); + getInstrumentation().waitForIdleSync(); + } + + public void testScroll() throws Throwable { + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + } + + public void testSaveAndRestoreInstanceState() throws Throwable { + UiTestUtils.saveAndRestoreInstanceState(this, activity); + testScroll(); + } + + public void testScrollVerticallyTo() throws Throwable { + final DisplayMetrics metrics = activity.getResources().getDisplayMetrics(); + runTestOnUiThread(new Runnable() { + @Override + public void run() { + scrollable.scrollVerticallyTo((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 48, metrics)); + } + }); + getInstrumentation().waitForIdleSync(); + + runTestOnUiThread(new Runnable() { + @Override + public void run() { + scrollable.scrollVerticallyTo(0); + } + }); + getInstrumentation().waitForIdleSync(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/RecyclerViewScrollFromBottomActivity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/RecyclerViewScrollFromBottomActivity.java new file mode 100755 index 0000000000..5bf39218a1 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/RecyclerViewScrollFromBottomActivity.java @@ -0,0 +1,23 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.os.Bundle; + +import com.github.ksoichiro.android.observablescrollview.ObservableRecyclerView; +import com.github.ksoichiro.android.observablescrollview.ScrollUtils; + +public class RecyclerViewScrollFromBottomActivity extends RecyclerViewActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + final ObservableRecyclerView scrollable = (ObservableRecyclerView) findViewById(R.id.scrollable); + ScrollUtils.addOnGlobalLayoutListener(scrollable, new Runnable() { + @Override + public void run() { + int count = scrollable.getAdapter().getItemCount() - 1; + int position = count == 0 ? 1 : count > 0 ? count : 0; + scrollable.scrollToPosition(position); + } + }); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/RecyclerViewScrollFromBottomActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/RecyclerViewScrollFromBottomActivityTest.java new file mode 100755 index 0000000000..37eaf4d582 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/RecyclerViewScrollFromBottomActivityTest.java @@ -0,0 +1,33 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.test.ActivityInstrumentationTestCase2; + +import com.github.ksoichiro.android.observablescrollview.ObservableListView; +import com.github.ksoichiro.android.observablescrollview.ObservableRecyclerView; + +public class RecyclerViewScrollFromBottomActivityTest extends ActivityInstrumentationTestCase2 { + + private Activity activity; + private ObservableRecyclerView scrollable; + + public RecyclerViewScrollFromBottomActivityTest() { + super(RecyclerViewScrollFromBottomActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + scrollable = (ObservableRecyclerView) activity.findViewById(R.id.scrollable); + } + + public void testScroll() throws Throwable { + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ScrollUtilsTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ScrollUtilsTest.java new file mode 100755 index 0000000000..6b2aecdf44 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ScrollUtilsTest.java @@ -0,0 +1,26 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.graphics.Color; +import android.test.InstrumentationTestCase; + +import com.github.ksoichiro.android.observablescrollview.ScrollUtils; + +import junit.framework.Assert; + +public class ScrollUtilsTest extends InstrumentationTestCase { + + public void testGetFloat() { + Assert.assertEquals(1.0f, ScrollUtils.getFloat(1, 0, 2)); + assertEquals(0.0f, ScrollUtils.getFloat(-1, 0, 2)); + assertEquals(2.0f, ScrollUtils.getFloat(3, 0, 2)); + } + + public void testGetColorWithAlpha() { + assertEquals(Color.parseColor("#00123456"), ScrollUtils.getColorWithAlpha(0, Color.parseColor("#FF123456"))); + assertEquals(Color.parseColor("#FF123456"), ScrollUtils.getColorWithAlpha(1, Color.parseColor("#FF123456"))); + } + + public void testMixColors() { + assertEquals(Color.parseColor("#000000"), ScrollUtils.mixColors(Color.parseColor("#000000"), Color.parseColor("#FFFFFF"), 0)); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ScrollViewActivity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ScrollViewActivity.java new file mode 100755 index 0000000000..d98a9727f0 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ScrollViewActivity.java @@ -0,0 +1,31 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; + +import com.github.ksoichiro.android.observablescrollview.ObservableScrollView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollState; +import com.github.ksoichiro.android.observablescrollview.Scrollable; + +public class ScrollViewActivity extends Activity implements ObservableScrollViewCallbacks { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_scrollview); + ((Scrollable) findViewById(R.id.scrollable)).setScrollViewCallbacks(this); + } + + @Override + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { + } + + @Override + public void onDownMotionEvent() { + } + + @Override + public void onUpOrCancelMotionEvent(ScrollState scrollState) { + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ScrollViewActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ScrollViewActivityTest.java new file mode 100755 index 0000000000..c7bcf06a33 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ScrollViewActivityTest.java @@ -0,0 +1,37 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.test.ActivityInstrumentationTestCase2; + +import com.github.ksoichiro.android.observablescrollview.ObservableScrollView; + +public class ScrollViewActivityTest extends ActivityInstrumentationTestCase2 { + + private Activity activity; + private ObservableScrollView scrollable; + + public ScrollViewActivityTest() { + super(ScrollViewActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + scrollable = (ObservableScrollView) activity.findViewById(R.id.scrollable); + } + + public void testScroll() throws Throwable { + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + } + + public void testSaveAndRestoreInstanceState() throws Throwable { + UiTestUtils.saveAndRestoreInstanceState(this, activity); + testScroll(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/SimpleHeaderRecyclerAdapter.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/SimpleHeaderRecyclerAdapter.java new file mode 100755 index 0000000000..18a3887f17 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/SimpleHeaderRecyclerAdapter.java @@ -0,0 +1,86 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview.test; + +import android.content.Context; +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import java.util.ArrayList; + +public class SimpleHeaderRecyclerAdapter extends RecyclerView.Adapter { + private static final int VIEW_TYPE_HEADER = 0; + private static final int VIEW_TYPE_ITEM = 1; + + private LayoutInflater mInflater; + private ArrayList mItems; + private View mHeaderView; + + public SimpleHeaderRecyclerAdapter(Context context, ArrayList items, View headerView) { + mInflater = LayoutInflater.from(context); + mItems = items; + mHeaderView = headerView; + } + + @Override + public int getItemCount() { + if (mHeaderView == null) { + return mItems.size(); + } else { + return mItems.size() + 1; + } + } + + @Override + public int getItemViewType(int position) { + return (position == 0) ? VIEW_TYPE_HEADER : VIEW_TYPE_ITEM; + } + + @Override + public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { + if (viewType == VIEW_TYPE_HEADER) { + return new HeaderViewHolder(mHeaderView); + } else { + return new ItemViewHolder(mInflater.inflate(android.R.layout.simple_list_item_1, parent, false)); + } + } + + @Override + public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int position) { + if (viewHolder instanceof ItemViewHolder) { + ((ItemViewHolder) viewHolder).textView.setText(mItems.get(position - 1)); + } + } + + static class HeaderViewHolder extends RecyclerView.ViewHolder { + public HeaderViewHolder(View view) { + super(view); + } + } + + static class ItemViewHolder extends RecyclerView.ViewHolder { + TextView textView; + + public ItemViewHolder(View view) { + super(view); + textView = (TextView) view.findViewById(android.R.id.text1); + } + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/SimpleRecyclerAdapter.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/SimpleRecyclerAdapter.java new file mode 100755 index 0000000000..daf2b5dfa4 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/SimpleRecyclerAdapter.java @@ -0,0 +1,60 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview.test; + +import android.content.Context; +import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import java.util.ArrayList; + +public class SimpleRecyclerAdapter extends RecyclerView.Adapter { + private LayoutInflater mInflater; + private ArrayList mItems; + + public SimpleRecyclerAdapter(Context context, ArrayList items) { + mInflater = LayoutInflater.from(context); + mItems = items; + } + + @Override + public int getItemCount() { + return mItems.size(); + } + + @Override + public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { + return new ViewHolder(mInflater.inflate(android.R.layout.simple_list_item_1, parent, false)); + } + + @Override + public void onBindViewHolder(ViewHolder viewHolder, int position) { + viewHolder.textView.setText(mItems.get(position)); + } + + static class ViewHolder extends RecyclerView.ViewHolder { + TextView textView; + + public ViewHolder(View view) { + super(view); + textView = (TextView) view.findViewById(android.R.id.text1); + } + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionGridViewActivity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionGridViewActivity.java new file mode 100755 index 0000000000..5a0891c828 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionGridViewActivity.java @@ -0,0 +1,97 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.view.MotionEvent; +import android.widget.FrameLayout; +import android.widget.TextView; + +import com.github.ksoichiro.android.observablescrollview.ObservableGridView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollState; +import com.github.ksoichiro.android.observablescrollview.Scrollable; +import com.github.ksoichiro.android.observablescrollview.TouchInterceptionFrameLayout; +import com.nineoldandroids.view.ViewHelper; + +public class TouchInterceptionGridViewActivity extends Activity implements ObservableScrollViewCallbacks { + + private TouchInterceptionFrameLayout mInterceptionLayout; + private Scrollable mScrollable; + + private int mIntersectionHeight; + private int mHeaderBarHeight; + + private float mScrollYOnDownMotion; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_touchinterception_gridview); + ((TextView) findViewById(R.id.title)).setText(getClass().getSimpleName()); + mScrollable = (Scrollable) findViewById(R.id.scrollable); + mScrollable.setScrollViewCallbacks(this); + UiTestUtils.setDummyData(this, (ObservableGridView) mScrollable); + + mIntersectionHeight = getResources().getDimensionPixelSize(R.dimen.intersection_height); + mHeaderBarHeight = getResources().getDimensionPixelSize(R.dimen.header_bar_height); + + mInterceptionLayout = (TouchInterceptionFrameLayout) findViewById(R.id.scroll_wrapper); + mInterceptionLayout.setScrollInterceptionListener(mInterceptionListener); + } + + @Override + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { + } + + @Override + public void onDownMotionEvent() { + } + + @Override + public void onUpOrCancelMotionEvent(ScrollState scrollState) { + } + + private TouchInterceptionFrameLayout.TouchInterceptionListener mInterceptionListener = new TouchInterceptionFrameLayout.TouchInterceptionListener() { + @Override + public boolean shouldInterceptTouchEvent(MotionEvent ev, boolean moving, float diffX, float diffY) { + final int minInterceptionLayoutY = -mIntersectionHeight; + return minInterceptionLayoutY < (int) ViewHelper.getY(mInterceptionLayout) + || (moving && mScrollable.getCurrentScrollY() - diffY < 0); + } + + @Override + public void onDownMotionEvent(MotionEvent ev) { + mScrollYOnDownMotion = mScrollable.getCurrentScrollY(); + } + + @Override + public void onMoveMotionEvent(MotionEvent ev, float diffX, float diffY) { + float translationY = ViewHelper.getTranslationY(mInterceptionLayout) - mScrollYOnDownMotion + diffY; + if (translationY < -mIntersectionHeight) { + translationY = -mIntersectionHeight; + } else if (getScreenHeight() - mHeaderBarHeight < translationY) { + translationY = getScreenHeight() - mHeaderBarHeight; + } + + slideTo(translationY, true); + } + + @Override + public void onUpOrCancelMotionEvent(MotionEvent ev) { + } + }; + + private void slideTo(float translationY, final boolean animated) { + ViewHelper.setTranslationY(mInterceptionLayout, translationY); + + if (translationY < 0) { + FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mInterceptionLayout.getLayoutParams(); + lp.height = (int) -translationY + getScreenHeight(); + mInterceptionLayout.requestLayout(); + } + } + + private int getScreenHeight() { + return findViewById(android.R.id.content).getHeight(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionGridViewActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionGridViewActivityTest.java new file mode 100755 index 0000000000..381f247921 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionGridViewActivityTest.java @@ -0,0 +1,44 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.test.ActivityInstrumentationTestCase2; +import android.test.TouchUtils; + +import com.github.ksoichiro.android.observablescrollview.ObservableGridView; + +public class TouchInterceptionGridViewActivityTest extends ActivityInstrumentationTestCase2 { + + private Activity activity; + private ObservableGridView scrollable; + + public TouchInterceptionGridViewActivityTest() { + super(TouchInterceptionGridViewActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + scrollable = (ObservableGridView) activity.findViewById(R.id.scrollable); + } + + public void testScroll() throws Throwable { + TouchUtils.touchAndCancelView(this, scrollable); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + } + + public void testSaveAndRestoreInstanceState() throws Throwable { + UiTestUtils.saveAndRestoreInstanceState(this, activity); + testScroll(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionListViewActivity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionListViewActivity.java new file mode 100755 index 0000000000..3b8007489b --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionListViewActivity.java @@ -0,0 +1,97 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.view.MotionEvent; +import android.widget.FrameLayout; +import android.widget.TextView; + +import com.github.ksoichiro.android.observablescrollview.ObservableListView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollState; +import com.github.ksoichiro.android.observablescrollview.Scrollable; +import com.github.ksoichiro.android.observablescrollview.TouchInterceptionFrameLayout; +import com.nineoldandroids.view.ViewHelper; + +public class TouchInterceptionListViewActivity extends Activity implements ObservableScrollViewCallbacks { + + private TouchInterceptionFrameLayout mInterceptionLayout; + private Scrollable mScrollable; + + private int mIntersectionHeight; + private int mHeaderBarHeight; + + private float mScrollYOnDownMotion; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_touchinterception_listview); + ((TextView) findViewById(R.id.title)).setText(getClass().getSimpleName()); + mScrollable = (Scrollable) findViewById(R.id.scrollable); + mScrollable.setScrollViewCallbacks(this); + UiTestUtils.setDummyData(this, (ObservableListView) mScrollable); + + mIntersectionHeight = getResources().getDimensionPixelSize(R.dimen.intersection_height); + mHeaderBarHeight = getResources().getDimensionPixelSize(R.dimen.header_bar_height); + + mInterceptionLayout = (TouchInterceptionFrameLayout) findViewById(R.id.scroll_wrapper); + mInterceptionLayout.setScrollInterceptionListener(mInterceptionListener); + } + + @Override + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { + } + + @Override + public void onDownMotionEvent() { + } + + @Override + public void onUpOrCancelMotionEvent(ScrollState scrollState) { + } + + private TouchInterceptionFrameLayout.TouchInterceptionListener mInterceptionListener = new TouchInterceptionFrameLayout.TouchInterceptionListener() { + @Override + public boolean shouldInterceptTouchEvent(MotionEvent ev, boolean moving, float diffX, float diffY) { + final int minInterceptionLayoutY = -mIntersectionHeight; + return minInterceptionLayoutY < (int) ViewHelper.getY(mInterceptionLayout) + || (moving && mScrollable.getCurrentScrollY() - diffY < 0); + } + + @Override + public void onDownMotionEvent(MotionEvent ev) { + mScrollYOnDownMotion = mScrollable.getCurrentScrollY(); + } + + @Override + public void onMoveMotionEvent(MotionEvent ev, float diffX, float diffY) { + float translationY = ViewHelper.getTranslationY(mInterceptionLayout) - mScrollYOnDownMotion + diffY; + if (translationY < -mIntersectionHeight) { + translationY = -mIntersectionHeight; + } else if (getScreenHeight() - mHeaderBarHeight < translationY) { + translationY = getScreenHeight() - mHeaderBarHeight; + } + + slideTo(translationY, true); + } + + @Override + public void onUpOrCancelMotionEvent(MotionEvent ev) { + } + }; + + private void slideTo(float translationY, final boolean animated) { + ViewHelper.setTranslationY(mInterceptionLayout, translationY); + + if (translationY < 0) { + FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mInterceptionLayout.getLayoutParams(); + lp.height = (int) -translationY + getScreenHeight(); + mInterceptionLayout.requestLayout(); + } + } + + private int getScreenHeight() { + return findViewById(android.R.id.content).getHeight(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionListViewActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionListViewActivityTest.java new file mode 100755 index 0000000000..430b775905 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionListViewActivityTest.java @@ -0,0 +1,44 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.test.ActivityInstrumentationTestCase2; +import android.test.TouchUtils; + +import com.github.ksoichiro.android.observablescrollview.ObservableListView; + +public class TouchInterceptionListViewActivityTest extends ActivityInstrumentationTestCase2 { + + private Activity activity; + private ObservableListView scrollable; + + public TouchInterceptionListViewActivityTest() { + super(TouchInterceptionListViewActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + scrollable = (ObservableListView) activity.findViewById(R.id.scrollable); + } + + public void testScroll() throws Throwable { + TouchUtils.touchAndCancelView(this, scrollable); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + } + + public void testSaveAndRestoreInstanceState() throws Throwable { + UiTestUtils.saveAndRestoreInstanceState(this, activity); + testScroll(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionRecyclerViewActivity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionRecyclerViewActivity.java new file mode 100755 index 0000000000..a7b80620b9 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionRecyclerViewActivity.java @@ -0,0 +1,102 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.support.v7.widget.LinearLayoutManager; +import android.view.MotionEvent; +import android.widget.FrameLayout; +import android.widget.TextView; + +import com.github.ksoichiro.android.observablescrollview.ObservableRecyclerView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollState; +import com.github.ksoichiro.android.observablescrollview.Scrollable; +import com.github.ksoichiro.android.observablescrollview.TouchInterceptionFrameLayout; +import com.nineoldandroids.view.ViewHelper; + +public class TouchInterceptionRecyclerViewActivity extends Activity implements ObservableScrollViewCallbacks { + + private TouchInterceptionFrameLayout mInterceptionLayout; + private Scrollable mScrollable; + + private int mIntersectionHeight; + private int mHeaderBarHeight; + + private float mScrollYOnDownMotion; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_touchinterception_recyclerview); + ((TextView) findViewById(R.id.title)).setText(getClass().getSimpleName()); + mScrollable = (Scrollable) findViewById(R.id.scrollable); + mScrollable.setScrollViewCallbacks(this); + ObservableRecyclerView recyclerView = (ObservableRecyclerView) mScrollable; + recyclerView.setLayoutManager(new LinearLayoutManager(this)); + recyclerView.setHasFixedSize(true); + recyclerView.setScrollViewCallbacks(this); + UiTestUtils.setDummyData(this, recyclerView); + + mIntersectionHeight = getResources().getDimensionPixelSize(R.dimen.intersection_height); + mHeaderBarHeight = getResources().getDimensionPixelSize(R.dimen.header_bar_height); + + mInterceptionLayout = (TouchInterceptionFrameLayout) findViewById(R.id.scroll_wrapper); + mInterceptionLayout.setScrollInterceptionListener(mInterceptionListener); + } + + @Override + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { + } + + @Override + public void onDownMotionEvent() { + } + + @Override + public void onUpOrCancelMotionEvent(ScrollState scrollState) { + } + + private TouchInterceptionFrameLayout.TouchInterceptionListener mInterceptionListener = new TouchInterceptionFrameLayout.TouchInterceptionListener() { + @Override + public boolean shouldInterceptTouchEvent(MotionEvent ev, boolean moving, float diffX, float diffY) { + final int minInterceptionLayoutY = -mIntersectionHeight; + return minInterceptionLayoutY < (int) ViewHelper.getY(mInterceptionLayout) + || (moving && mScrollable.getCurrentScrollY() - diffY < 0); + } + + @Override + public void onDownMotionEvent(MotionEvent ev) { + mScrollYOnDownMotion = mScrollable.getCurrentScrollY(); + } + + @Override + public void onMoveMotionEvent(MotionEvent ev, float diffX, float diffY) { + float translationY = ViewHelper.getTranslationY(mInterceptionLayout) - mScrollYOnDownMotion + diffY; + if (translationY < -mIntersectionHeight) { + translationY = -mIntersectionHeight; + } else if (getScreenHeight() - mHeaderBarHeight < translationY) { + translationY = getScreenHeight() - mHeaderBarHeight; + } + + slideTo(translationY, true); + } + + @Override + public void onUpOrCancelMotionEvent(MotionEvent ev) { + } + }; + + private void slideTo(float translationY, final boolean animated) { + ViewHelper.setTranslationY(mInterceptionLayout, translationY); + + if (translationY < 0) { + FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mInterceptionLayout.getLayoutParams(); + lp.height = (int) -translationY + getScreenHeight(); + mInterceptionLayout.requestLayout(); + } + } + + private int getScreenHeight() { + return findViewById(android.R.id.content).getHeight(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionRecyclerViewActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionRecyclerViewActivityTest.java new file mode 100755 index 0000000000..caf54346f9 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionRecyclerViewActivityTest.java @@ -0,0 +1,45 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.test.ActivityInstrumentationTestCase2; +import android.test.TouchUtils; + +import com.github.ksoichiro.android.observablescrollview.ObservableListView; +import com.github.ksoichiro.android.observablescrollview.ObservableRecyclerView; + +public class TouchInterceptionRecyclerViewActivityTest extends ActivityInstrumentationTestCase2 { + + private Activity activity; + private ObservableRecyclerView scrollable; + + public TouchInterceptionRecyclerViewActivityTest() { + super(TouchInterceptionRecyclerViewActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + scrollable = (ObservableRecyclerView) activity.findViewById(R.id.scrollable); + } + + public void testScroll() throws Throwable { + TouchUtils.touchAndCancelView(this, scrollable); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + } + + public void testSaveAndRestoreInstanceState() throws Throwable { + UiTestUtils.saveAndRestoreInstanceState(this, activity); + testScroll(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionScrollViewActivity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionScrollViewActivity.java new file mode 100755 index 0000000000..f2b9c5cb46 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionScrollViewActivity.java @@ -0,0 +1,95 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.view.MotionEvent; +import android.widget.FrameLayout; +import android.widget.TextView; + +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollState; +import com.github.ksoichiro.android.observablescrollview.Scrollable; +import com.github.ksoichiro.android.observablescrollview.TouchInterceptionFrameLayout; +import com.nineoldandroids.view.ViewHelper; + +public class TouchInterceptionScrollViewActivity extends Activity implements ObservableScrollViewCallbacks { + + private TouchInterceptionFrameLayout mInterceptionLayout; + private Scrollable mScrollable; + + private int mIntersectionHeight; + private int mHeaderBarHeight; + + private float mScrollYOnDownMotion; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_touchinterception_scrollview); + ((TextView) findViewById(R.id.title)).setText(getClass().getSimpleName()); + mScrollable = (Scrollable) findViewById(R.id.scrollable); + mScrollable.setScrollViewCallbacks(this); + + mIntersectionHeight = getResources().getDimensionPixelSize(R.dimen.intersection_height); + mHeaderBarHeight = getResources().getDimensionPixelSize(R.dimen.header_bar_height); + + mInterceptionLayout = (TouchInterceptionFrameLayout) findViewById(R.id.scroll_wrapper); + mInterceptionLayout.setScrollInterceptionListener(mInterceptionListener); + } + + @Override + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { + } + + @Override + public void onDownMotionEvent() { + } + + @Override + public void onUpOrCancelMotionEvent(ScrollState scrollState) { + } + + private TouchInterceptionFrameLayout.TouchInterceptionListener mInterceptionListener = new TouchInterceptionFrameLayout.TouchInterceptionListener() { + @Override + public boolean shouldInterceptTouchEvent(MotionEvent ev, boolean moving, float diffX, float diffY) { + final int minInterceptionLayoutY = -mIntersectionHeight; + return minInterceptionLayoutY < (int) ViewHelper.getY(mInterceptionLayout) + || (moving && mScrollable.getCurrentScrollY() - diffY < 0); + } + + @Override + public void onDownMotionEvent(MotionEvent ev) { + mScrollYOnDownMotion = mScrollable.getCurrentScrollY(); + } + + @Override + public void onMoveMotionEvent(MotionEvent ev, float diffX, float diffY) { + float translationY = ViewHelper.getTranslationY(mInterceptionLayout) - mScrollYOnDownMotion + diffY; + if (translationY < -mIntersectionHeight) { + translationY = -mIntersectionHeight; + } else if (getScreenHeight() - mHeaderBarHeight < translationY) { + translationY = getScreenHeight() - mHeaderBarHeight; + } + + slideTo(translationY, true); + } + + @Override + public void onUpOrCancelMotionEvent(MotionEvent ev) { + } + }; + + private void slideTo(float translationY, final boolean animated) { + ViewHelper.setTranslationY(mInterceptionLayout, translationY); + + if (translationY < 0) { + FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mInterceptionLayout.getLayoutParams(); + lp.height = (int) -translationY + getScreenHeight(); + mInterceptionLayout.requestLayout(); + } + } + + private int getScreenHeight() { + return findViewById(android.R.id.content).getHeight(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionScrollViewActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionScrollViewActivityTest.java new file mode 100755 index 0000000000..1c56fd405f --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionScrollViewActivityTest.java @@ -0,0 +1,44 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.test.ActivityInstrumentationTestCase2; +import android.test.TouchUtils; + +import com.github.ksoichiro.android.observablescrollview.ObservableScrollView; + +public class TouchInterceptionScrollViewActivityTest extends ActivityInstrumentationTestCase2 { + + private Activity activity; + private ObservableScrollView scrollable; + + public TouchInterceptionScrollViewActivityTest() { + super(TouchInterceptionScrollViewActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + scrollable = (ObservableScrollView) activity.findViewById(R.id.scrollable); + } + + public void testScroll() throws Throwable { + TouchUtils.touchAndCancelView(this, scrollable); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + } + + public void testSaveAndRestoreInstanceState() throws Throwable { + UiTestUtils.saveAndRestoreInstanceState(this, activity); + testScroll(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionWebViewActivity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionWebViewActivity.java new file mode 100755 index 0000000000..023905b1ea --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionWebViewActivity.java @@ -0,0 +1,97 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.view.MotionEvent; +import android.webkit.WebView; +import android.widget.FrameLayout; +import android.widget.TextView; + +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollState; +import com.github.ksoichiro.android.observablescrollview.Scrollable; +import com.github.ksoichiro.android.observablescrollview.TouchInterceptionFrameLayout; +import com.nineoldandroids.view.ViewHelper; + +public class TouchInterceptionWebViewActivity extends Activity implements ObservableScrollViewCallbacks { + + private TouchInterceptionFrameLayout mInterceptionLayout; + private Scrollable mScrollable; + + private int mIntersectionHeight; + private int mHeaderBarHeight; + + private float mScrollYOnDownMotion; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_touchinterception_webview); + ((TextView) findViewById(R.id.title)).setText(getClass().getSimpleName()); + mScrollable = (Scrollable) findViewById(R.id.scrollable); + mScrollable.setScrollViewCallbacks(this); + ((WebView) mScrollable).loadUrl("file:///android_asset/lipsum.html"); + + mIntersectionHeight = getResources().getDimensionPixelSize(R.dimen.intersection_height); + mHeaderBarHeight = getResources().getDimensionPixelSize(R.dimen.header_bar_height); + + mInterceptionLayout = (TouchInterceptionFrameLayout) findViewById(R.id.scroll_wrapper); + mInterceptionLayout.setScrollInterceptionListener(mInterceptionListener); + } + + @Override + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { + } + + @Override + public void onDownMotionEvent() { + } + + @Override + public void onUpOrCancelMotionEvent(ScrollState scrollState) { + } + + private TouchInterceptionFrameLayout.TouchInterceptionListener mInterceptionListener = new TouchInterceptionFrameLayout.TouchInterceptionListener() { + @Override + public boolean shouldInterceptTouchEvent(MotionEvent ev, boolean moving, float diffX, float diffY) { + final int minInterceptionLayoutY = -mIntersectionHeight; + return minInterceptionLayoutY < (int) ViewHelper.getY(mInterceptionLayout) + || (moving && mScrollable.getCurrentScrollY() - diffY < 0); + } + + @Override + public void onDownMotionEvent(MotionEvent ev) { + mScrollYOnDownMotion = mScrollable.getCurrentScrollY(); + } + + @Override + public void onMoveMotionEvent(MotionEvent ev, float diffX, float diffY) { + float translationY = ViewHelper.getTranslationY(mInterceptionLayout) - mScrollYOnDownMotion + diffY; + if (translationY < -mIntersectionHeight) { + translationY = -mIntersectionHeight; + } else if (getScreenHeight() - mHeaderBarHeight < translationY) { + translationY = getScreenHeight() - mHeaderBarHeight; + } + + slideTo(translationY, true); + } + + @Override + public void onUpOrCancelMotionEvent(MotionEvent ev) { + } + }; + + private void slideTo(float translationY, final boolean animated) { + ViewHelper.setTranslationY(mInterceptionLayout, translationY); + + if (translationY < 0) { + FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mInterceptionLayout.getLayoutParams(); + lp.height = (int) -translationY + getScreenHeight(); + mInterceptionLayout.requestLayout(); + } + } + + private int getScreenHeight() { + return findViewById(android.R.id.content).getHeight(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionWebViewActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionWebViewActivityTest.java new file mode 100755 index 0000000000..d1f24e4fa1 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/TouchInterceptionWebViewActivityTest.java @@ -0,0 +1,44 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.test.ActivityInstrumentationTestCase2; +import android.test.TouchUtils; + +import com.github.ksoichiro.android.observablescrollview.ObservableWebView; + +public class TouchInterceptionWebViewActivityTest extends ActivityInstrumentationTestCase2 { + + private Activity activity; + private ObservableWebView scrollable; + + public TouchInterceptionWebViewActivityTest() { + super(TouchInterceptionWebViewActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + scrollable = (ObservableWebView) activity.findViewById(R.id.scrollable); + } + + public void testScroll() throws Throwable { + TouchUtils.touchAndCancelView(this, scrollable); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + } + + public void testSaveAndRestoreInstanceState() throws Throwable { + UiTestUtils.saveAndRestoreInstanceState(this, activity); + testScroll(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/UiTestUtils.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/UiTestUtils.java new file mode 100755 index 0000000000..43ebbf8440 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/UiTestUtils.java @@ -0,0 +1,124 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.content.Context; +import android.os.Bundle; +import android.support.v7.widget.RecyclerView; +import android.test.InstrumentationTestCase; +import android.test.TouchUtils; +import android.util.TypedValue; +import android.view.View; +import android.widget.ArrayAdapter; +import android.widget.GridView; +import android.widget.ListView; + +import java.util.ArrayList; + +public class UiTestUtils { + + private static final int NUM_OF_ITEMS = 100; + private static final int NUM_OF_ITEMS_FEW = 3; + private static final int DRAG_STEP_COUNT = 50; + + public enum Direction { + LEFT, RIGHT, UP, DOWN + } + + private UiTestUtils() { + } + + public static void saveAndRestoreInstanceState(final InstrumentationTestCase test, final Activity activity) throws Throwable { + test.runTestOnUiThread(new Runnable() { + @Override + public void run() { + Bundle outState = new Bundle(); + test.getInstrumentation().callActivityOnSaveInstanceState(activity, outState); + test.getInstrumentation().callActivityOnPause(activity); + test.getInstrumentation().callActivityOnResume(activity); + test.getInstrumentation().callActivityOnRestoreInstanceState(activity, outState); + } + }); + test.getInstrumentation().waitForIdleSync(); + } + + public static void swipeHorizontally(InstrumentationTestCase test, View v, Direction direction) { + int[] xy = new int[2]; + v.getLocationOnScreen(xy); + + final int viewWidth = v.getWidth(); + final int viewHeight = v.getHeight(); + + float distanceFromEdge = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 8, + v.getResources().getDisplayMetrics()); + float xStart = xy[0] + ((direction == Direction.LEFT) ? (viewWidth - distanceFromEdge) : distanceFromEdge); + float xEnd = xy[0] + ((direction == Direction.LEFT) ? distanceFromEdge : (viewWidth - distanceFromEdge)); + float y = xy[1] + (viewHeight / 2.0f); + + TouchUtils.drag(test, xStart, xEnd, y, y, DRAG_STEP_COUNT); + } + + public static void swipeVertically(InstrumentationTestCase test, View v, Direction direction) { + int[] xy = new int[2]; + v.getLocationOnScreen(xy); + + final int viewWidth = v.getWidth(); + final int viewHeight = v.getHeight(); + + float distanceFromEdge = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 8, + v.getResources().getDisplayMetrics()); + float x = xy[0] + (viewWidth / 2.0f); + float yStart = xy[1] + ((direction == Direction.UP) ? (viewHeight - distanceFromEdge) : distanceFromEdge); + float yEnd = xy[1] + ((direction == Direction.UP) ? distanceFromEdge : (viewHeight - distanceFromEdge)); + + TouchUtils.drag(test, x, x, yStart, yEnd, DRAG_STEP_COUNT); + } + + public static ArrayList getDummyData() { + return getDummyData(NUM_OF_ITEMS); + } + + public static ArrayList getDummyData(int num) { + ArrayList items = new ArrayList(); + for (int i = 1; i <= num; i++) { + items.add("Item " + i); + } + return items; + } + + public static void setDummyData(Context context, GridView gridView) { + gridView.setAdapter(new ArrayAdapter(context, android.R.layout.simple_list_item_1, getDummyData())); + } + + public static void setDummyData(Context context, ListView listView) { + setDummyData(context, listView, NUM_OF_ITEMS); + } + + public static void setDummyDataFew(Context context, ListView listView) { + setDummyData(context, listView, NUM_OF_ITEMS_FEW); + } + + public static void setDummyData(Context context, ListView listView, int num) { + listView.setAdapter(new ArrayAdapter(context, android.R.layout.simple_list_item_1, getDummyData(num))); + } + + public static void setDummyDataWithHeader(Context context, ListView listView, View headerView) { + listView.addHeaderView(headerView); + setDummyData(context, listView); + } + + public static void setDummyData(Context context, RecyclerView recyclerView) { + setDummyData(context, recyclerView, NUM_OF_ITEMS); + } + + public static void setDummyDataFew(Context context, RecyclerView recyclerView) { + setDummyData(context, recyclerView, NUM_OF_ITEMS_FEW); + } + + public static void setDummyData(Context context, RecyclerView recyclerView, int num) { + recyclerView.setAdapter(new SimpleRecyclerAdapter(context, getDummyData(num))); + } + + public static void setDummyDataWithHeader(Context context, RecyclerView recyclerView, View headerView) { + recyclerView.setAdapter(new SimpleHeaderRecyclerAdapter(context, getDummyData(), headerView)); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2Activity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2Activity.java new file mode 100755 index 0000000000..ecde277728 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2Activity.java @@ -0,0 +1,291 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview.test; + +import android.content.res.TypedArray; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.support.v4.app.FragmentManager; +import android.support.v4.view.ViewPager; +import android.support.v7.app.ActionBarActivity; +import android.support.v7.widget.Toolbar; +import android.util.TypedValue; +import android.view.MotionEvent; +import android.view.View; +import android.view.ViewConfiguration; +import android.widget.FrameLayout; + +import com.github.ksoichiro.android.observablescrollview.CacheFragmentStatePagerAdapter; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollState; +import com.github.ksoichiro.android.observablescrollview.ScrollUtils; +import com.github.ksoichiro.android.observablescrollview.Scrollable; +import com.github.ksoichiro.android.observablescrollview.TouchInterceptionFrameLayout; +import com.google.samples.apps.iosched.ui.widget.SlidingTabLayout; +import com.nineoldandroids.animation.ValueAnimator; +import com.nineoldandroids.view.ViewHelper; + +public class ViewPagerTab2Activity extends ActionBarActivity implements ObservableScrollViewCallbacks { + + private View mToolbarView; + private TouchInterceptionFrameLayout mInterceptionLayout; + private ViewPager mPager; + private NavigationAdapter mPagerAdapter; + private int mSlop; + private boolean mScrolled; + private ScrollState mLastScrollState; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_viewpagertab2); + + setSupportActionBar((Toolbar) findViewById(R.id.toolbar)); + + mToolbarView = findViewById(R.id.toolbar); + mPagerAdapter = new NavigationAdapter(getSupportFragmentManager()); + mPager = (ViewPager) findViewById(R.id.pager); + mPager.setAdapter(mPagerAdapter); + // Padding for ViewPager must be set outside the ViewPager itself + // because with padding, EdgeEffect of ViewPager become strange. + final int tabHeight = getResources().getDimensionPixelSize(R.dimen.tab_height); + findViewById(R.id.pager_wrapper).setPadding(0, getActionBarSize() + tabHeight, 0, 0); + + SlidingTabLayout slidingTabLayout = (SlidingTabLayout) findViewById(R.id.sliding_tabs); + slidingTabLayout.setCustomTabView(R.layout.tab_indicator, android.R.id.text1); + slidingTabLayout.setSelectedIndicatorColors(getResources().getColor(R.color.accent)); + slidingTabLayout.setDistributeEvenly(true); + slidingTabLayout.setViewPager(mPager); + + ViewConfiguration vc = ViewConfiguration.get(this); + mSlop = vc.getScaledTouchSlop(); + mInterceptionLayout = (TouchInterceptionFrameLayout) findViewById(R.id.container); + mInterceptionLayout.setScrollInterceptionListener(mInterceptionListener); + } + + @Override + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { + } + + @Override + public void onDownMotionEvent() { + } + + @Override + public void onUpOrCancelMotionEvent(ScrollState scrollState) { + if (!mScrolled) { + // This event can be used only when TouchInterceptionFrameLayout + // doesn't handle the consecutive events. + adjustToolbar(scrollState); + } + } + + private TouchInterceptionFrameLayout.TouchInterceptionListener mInterceptionListener = new TouchInterceptionFrameLayout.TouchInterceptionListener() { + @Override + public boolean shouldInterceptTouchEvent(MotionEvent ev, boolean moving, float diffX, float diffY) { + if (!mScrolled && mSlop < Math.abs(diffX) && Math.abs(diffY) < Math.abs(diffX)) { + // Horizontal scroll is maybe handled by ViewPager + return false; + } + + Scrollable scrollable = getCurrentScrollable(); + if (scrollable == null) { + mScrolled = false; + return false; + } + + // If interceptionLayout can move, it should intercept. + // And once it begins to move, horizontal scroll shouldn't work any longer. + int toolbarHeight = mToolbarView.getHeight(); + int translationY = (int) ViewHelper.getTranslationY(mInterceptionLayout); + boolean scrollingUp = 0 < diffY; + boolean scrollingDown = diffY < 0; + if (scrollingUp) { + if (translationY < 0) { + mScrolled = true; + mLastScrollState = ScrollState.UP; + return true; + } + } else if (scrollingDown) { + if (-toolbarHeight < translationY) { + mScrolled = true; + mLastScrollState = ScrollState.DOWN; + return true; + } + } + mScrolled = false; + return false; + } + + @Override + public void onDownMotionEvent(MotionEvent ev) { + } + + @Override + public void onMoveMotionEvent(MotionEvent ev, float diffX, float diffY) { + float translationY = ScrollUtils.getFloat(ViewHelper.getTranslationY(mInterceptionLayout) + diffY, -mToolbarView.getHeight(), 0); + ViewHelper.setTranslationY(mInterceptionLayout, translationY); + if (translationY < 0) { + FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mInterceptionLayout.getLayoutParams(); + lp.height = (int) (-translationY + getScreenHeight()); + mInterceptionLayout.requestLayout(); + } + } + + @Override + public void onUpOrCancelMotionEvent(MotionEvent ev) { + mScrolled = false; + adjustToolbar(mLastScrollState); + } + }; + + public Scrollable getCurrentScrollable() { + Fragment fragment = getCurrentFragment(); + if (fragment == null) { + return null; + } + View view = fragment.getView(); + if (view == null) { + return null; + } + return (Scrollable) view.findViewById(R.id.scroll); + } + + private void adjustToolbar(ScrollState scrollState) { + int toolbarHeight = mToolbarView.getHeight(); + final Scrollable scrollable = getCurrentScrollable(); + if (scrollable == null) { + return; + } + int scrollY = scrollable.getCurrentScrollY(); + if (scrollState == ScrollState.DOWN) { + showToolbar(); + } else if (scrollState == ScrollState.UP) { + if (toolbarHeight <= scrollY) { + hideToolbar(); + } else { + showToolbar(); + } + } else if (!toolbarIsShown() && !toolbarIsHidden()) { + // Toolbar is moving but doesn't know which to move: + // you can change this to hideToolbar() + showToolbar(); + } + } + + private Fragment getCurrentFragment() { + return mPagerAdapter.getItemAt(mPager.getCurrentItem()); + } + + private boolean toolbarIsShown() { + return ViewHelper.getTranslationY(mInterceptionLayout) == 0; + } + + private boolean toolbarIsHidden() { + return ViewHelper.getTranslationY(mInterceptionLayout) == -mToolbarView.getHeight(); + } + + private void showToolbar() { + animateToolbar(0); + } + + private void hideToolbar() { + animateToolbar(-mToolbarView.getHeight()); + } + + private void animateToolbar(final float toY) { + float layoutTranslationY = ViewHelper.getTranslationY(mInterceptionLayout); + if (layoutTranslationY != toY) { + ValueAnimator animator = ValueAnimator.ofFloat(ViewHelper.getTranslationY(mInterceptionLayout), toY).setDuration(200); + animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { + @Override + public void onAnimationUpdate(ValueAnimator animation) { + float translationY = (float) animation.getAnimatedValue(); + ViewHelper.setTranslationY(mInterceptionLayout, translationY); + if (translationY < 0) { + FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) mInterceptionLayout.getLayoutParams(); + lp.height = (int) (-translationY + getScreenHeight()); + mInterceptionLayout.requestLayout(); + } + } + }); + animator.start(); + } + } + + private int getActionBarSize() { + TypedValue typedValue = new TypedValue(); + int[] textSizeAttr = new int[]{R.attr.actionBarSize}; + int indexOfAttrTextSize = 0; + TypedArray a = obtainStyledAttributes(typedValue.data, textSizeAttr); + int actionBarSize = a.getDimensionPixelSize(indexOfAttrTextSize, -1); + a.recycle(); + return actionBarSize; + } + + private int getScreenHeight() { + return findViewById(android.R.id.content).getHeight(); + } + + /** + * This adapter provides two types of fragments as an example. + * {@linkplain #createItem(int)} should be modified if you use this example for your app. + */ + private static class NavigationAdapter extends CacheFragmentStatePagerAdapter { + + private static final String[] TITLES = new String[]{"Applepie", "Butter Cookie", "Cupcake", "Donut", "Eclair", "Froyo", "Gingerbread", "Honeycomb", "Ice Cream Sandwich", "Jelly Bean", "KitKat", "Lollipop"}; + + public NavigationAdapter(FragmentManager fm) { + super(fm); + } + + @Override + protected Fragment createItem(int position) { + Fragment f; + final int pattern = position % 5; + switch (pattern) { + case 0: + f = new ViewPagerTab2ScrollViewFragment(); + break; + case 1: + f = new ViewPagerTab2ListViewFragment(); + break; + case 2: + f = new ViewPagerTab2RecyclerViewFragment(); + break; + case 3: + f = new ViewPagerTab2GridViewFragment(); + break; + case 4: + default: + f = new ViewPagerTab2WebViewFragment(); + break; + } + return f; + } + + @Override + public int getCount() { + return TITLES.length; + } + + @Override + public CharSequence getPageTitle(int position) { + return TITLES[position]; + } + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2ActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2ActivityTest.java new file mode 100755 index 0000000000..e1dc35a63b --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2ActivityTest.java @@ -0,0 +1,53 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.test.ActivityInstrumentationTestCase2; +import android.view.View; + +public class ViewPagerTab2ActivityTest extends ActivityInstrumentationTestCase2 { + + private ViewPagerTab2Activity activity; + + public ViewPagerTab2ActivityTest() { + super(ViewPagerTab2Activity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + } + + public void testScroll() throws Throwable { + for (int i = 0; i < 5; i++) { + UiTestUtils.swipeHorizontally(this, activity.findViewById(R.id.pager), UiTestUtils.Direction.LEFT); + getInstrumentation().waitForIdleSync(); + scroll(); + } + for (int i = 0; i < 5; i++) { + UiTestUtils.swipeHorizontally(this, activity.findViewById(R.id.pager), UiTestUtils.Direction.RIGHT); + getInstrumentation().waitForIdleSync(); + scroll(); + } + } + + public void scroll() throws Throwable { + View scrollable = ((View) activity.getCurrentScrollable()).findViewById(R.id.scroll); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + } + + public void testSaveAndRestoreInstanceState() throws Throwable { + for (int i = 0; i < 5; i++) { + UiTestUtils.saveAndRestoreInstanceState(this, activity); + scroll(); + + UiTestUtils.swipeHorizontally(this, activity.findViewById(R.id.pager), UiTestUtils.Direction.LEFT); + getInstrumentation().waitForIdleSync(); + } + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2GridViewFragment.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2GridViewFragment.java new file mode 100755 index 0000000000..401752a985 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2GridViewFragment.java @@ -0,0 +1,44 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import com.github.ksoichiro.android.observablescrollview.ObservableGridView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; + +public class ViewPagerTab2GridViewFragment extends Fragment { + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.fragment_gridview, container, false); + + Activity parentActivity = getActivity(); + final ObservableGridView gridView = (ObservableGridView) view.findViewById(R.id.scroll); + UiTestUtils.setDummyData(getActivity(), gridView); + gridView.setTouchInterceptionViewGroup((ViewGroup) parentActivity.findViewById(R.id.container)); + + if (parentActivity instanceof ObservableScrollViewCallbacks) { + gridView.setScrollViewCallbacks((ObservableScrollViewCallbacks) parentActivity); + } + return view; + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2ListViewFragment.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2ListViewFragment.java new file mode 100755 index 0000000000..33daf0c8e9 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2ListViewFragment.java @@ -0,0 +1,44 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import com.github.ksoichiro.android.observablescrollview.ObservableListView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; + +public class ViewPagerTab2ListViewFragment extends Fragment { + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.fragment_listview, container, false); + + Activity parentActivity = getActivity(); + final ObservableListView listView = (ObservableListView) view.findViewById(R.id.scroll); + UiTestUtils.setDummyData(getActivity(), listView); + listView.setTouchInterceptionViewGroup((ViewGroup) parentActivity.findViewById(R.id.container)); + + if (parentActivity instanceof ObservableScrollViewCallbacks) { + listView.setScrollViewCallbacks((ObservableScrollViewCallbacks) parentActivity); + } + return view; + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2RecyclerViewFragment.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2RecyclerViewFragment.java new file mode 100755 index 0000000000..1e20ed93b0 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2RecyclerViewFragment.java @@ -0,0 +1,47 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.support.v7.widget.LinearLayoutManager; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import com.github.ksoichiro.android.observablescrollview.ObservableRecyclerView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; + +public class ViewPagerTab2RecyclerViewFragment extends Fragment { + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.fragment_recyclerview, container, false); + + Activity parentActivity = getActivity(); + final ObservableRecyclerView recyclerView = (ObservableRecyclerView) view.findViewById(R.id.scroll); + recyclerView.setLayoutManager(new LinearLayoutManager(parentActivity)); + recyclerView.setHasFixedSize(false); + UiTestUtils.setDummyData(getActivity(), recyclerView); + recyclerView.setTouchInterceptionViewGroup((ViewGroup) parentActivity.findViewById(R.id.container)); + + if (parentActivity instanceof ObservableScrollViewCallbacks) { + recyclerView.setScrollViewCallbacks((ObservableScrollViewCallbacks) parentActivity); + } + return view; + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2ScrollViewFragment.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2ScrollViewFragment.java new file mode 100755 index 0000000000..286e96e5ae --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2ScrollViewFragment.java @@ -0,0 +1,42 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import com.github.ksoichiro.android.observablescrollview.ObservableScrollView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; + +public class ViewPagerTab2ScrollViewFragment extends Fragment { + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.fragment_scrollview_noheader, container, false); + + final ObservableScrollView scrollView = (ObservableScrollView) view.findViewById(R.id.scroll); + Activity parentActivity = getActivity(); + scrollView.setTouchInterceptionViewGroup((ViewGroup) parentActivity.findViewById(R.id.container)); + if (parentActivity instanceof ObservableScrollViewCallbacks) { + scrollView.setScrollViewCallbacks((ObservableScrollViewCallbacks) parentActivity); + } + return view; + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2WebViewFragment.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2WebViewFragment.java new file mode 100755 index 0000000000..582873f306 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTab2WebViewFragment.java @@ -0,0 +1,43 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ObservableWebView; + +public class ViewPagerTab2WebViewFragment extends Fragment { + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.fragment_webview, container, false); + + final ObservableWebView webView = (ObservableWebView) view.findViewById(R.id.scroll); + webView.loadUrl("file:///android_asset/lipsum.html"); + Activity parentActivity = getActivity(); + webView.setTouchInterceptionViewGroup((ViewGroup) parentActivity.findViewById(R.id.container)); + if (parentActivity instanceof ObservableScrollViewCallbacks) { + webView.setScrollViewCallbacks((ObservableScrollViewCallbacks) parentActivity); + } + return view; + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabActivity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabActivity.java new file mode 100755 index 0000000000..3915379038 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabActivity.java @@ -0,0 +1,288 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.support.v4.app.FragmentManager; +import android.support.v4.view.ViewPager; +import android.support.v7.app.ActionBarActivity; +import android.support.v7.widget.Toolbar; +import android.view.View; + +import com.github.ksoichiro.android.observablescrollview.CacheFragmentStatePagerAdapter; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollState; +import com.github.ksoichiro.android.observablescrollview.ScrollUtils; +import com.github.ksoichiro.android.observablescrollview.Scrollable; +import com.google.samples.apps.iosched.ui.widget.SlidingTabLayout; +import com.nineoldandroids.view.ViewHelper; +import com.nineoldandroids.view.ViewPropertyAnimator; + +public class ViewPagerTabActivity extends ActionBarActivity implements ObservableScrollViewCallbacks { + + private View mHeaderView; + private View mToolbarView; + private int mBaseTranslationY; + private ViewPager mPager; + private NavigationAdapter mPagerAdapter; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_viewpagertab); + + setSupportActionBar((Toolbar) findViewById(R.id.toolbar)); + + mHeaderView = findViewById(R.id.header); + mToolbarView = findViewById(R.id.toolbar); + mPagerAdapter = new NavigationAdapter(getSupportFragmentManager()); + mPager = (ViewPager) findViewById(R.id.pager); + mPager.setAdapter(mPagerAdapter); + + SlidingTabLayout slidingTabLayout = (SlidingTabLayout) findViewById(R.id.sliding_tabs); + slidingTabLayout.setCustomTabView(R.layout.tab_indicator, android.R.id.text1); + slidingTabLayout.setSelectedIndicatorColors(getResources().getColor(R.color.accent)); + slidingTabLayout.setDistributeEvenly(true); + slidingTabLayout.setViewPager(mPager); + + // When the page is selected, other fragments' scrollY should be adjusted + // according to the toolbar status(shown/hidden) + slidingTabLayout.setOnPageChangeListener(new ViewPager.OnPageChangeListener() { + @Override + public void onPageScrolled(int i, float v, int i2) { + } + + @Override + public void onPageSelected(int i) { + propagateToolbarState(toolbarIsShown()); + } + + @Override + public void onPageScrollStateChanged(int i) { + } + }); + + propagateToolbarState(toolbarIsShown()); + } + @Override + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { + if (dragging) { + int toolbarHeight = mToolbarView.getHeight(); + float currentHeaderTranslationY = ViewHelper.getTranslationY(mHeaderView); + if (firstScroll) { + if (-toolbarHeight < currentHeaderTranslationY) { + mBaseTranslationY = scrollY; + } + } + float headerTranslationY = ScrollUtils.getFloat(-(scrollY - mBaseTranslationY), -toolbarHeight, 0); + ViewPropertyAnimator.animate(mHeaderView).cancel(); + ViewHelper.setTranslationY(mHeaderView, headerTranslationY); + } + } + + @Override + public void onDownMotionEvent() { + } + + @Override + public void onUpOrCancelMotionEvent(ScrollState scrollState) { + mBaseTranslationY = 0; + + Fragment fragment = getCurrentFragment(); + if (fragment == null) { + return; + } + View view = fragment.getView(); + if (view == null) { + return; + } + + // ObservableXxxViews have same API + // but currently they don't have any common interfaces. + adjustToolbar(scrollState, view); + } + + public Scrollable getCurrentScrollable() { + Fragment fragment = getCurrentFragment(); + if (fragment == null) { + return null; + } + View view = fragment.getView(); + if (view == null) { + return null; + } + return (Scrollable) view.findViewById(R.id.scroll); + } + + private void adjustToolbar(ScrollState scrollState, View view) { + int toolbarHeight = mToolbarView.getHeight(); + final Scrollable scrollView = (Scrollable) view.findViewById(R.id.scroll); + if (scrollView == null) { + return; + } + int scrollY = scrollView.getCurrentScrollY(); + if (scrollState == ScrollState.DOWN) { + showToolbar(); + } else if (scrollState == ScrollState.UP) { + if (toolbarHeight <= scrollY) { + hideToolbar(); + } else { + showToolbar(); + } + } else { + // Even if onScrollChanged occurs without scrollY changing, toolbar should be adjusted + if (toolbarIsShown() || toolbarIsHidden()) { + // Toolbar is completely moved, so just keep its state + // and propagate it to other pages + propagateToolbarState(toolbarIsShown()); + } else { + // Toolbar is moving but doesn't know which to move: + // you can change this to hideToolbar() + showToolbar(); + } + } + } + + public Fragment getCurrentFragment() { + return mPagerAdapter.getItemAt(mPager.getCurrentItem()); + } + + private void propagateToolbarState(boolean isShown) { + int toolbarHeight = mToolbarView.getHeight(); + + // Set scrollY for the fragments that are not created yet + mPagerAdapter.setScrollY(isShown ? 0 : toolbarHeight); + + // Set scrollY for the active fragments + for (int i = 0; i < mPagerAdapter.getCount(); i++) { + // Skip current item + if (i == mPager.getCurrentItem()) { + continue; + } + + // Skip destroyed or not created item + Fragment f = mPagerAdapter.getItemAt(i); + if (f == null) { + continue; + } + + View view = f.getView(); + if (view == null) { + continue; + } + propagateToolbarState(isShown, view, toolbarHeight); + } + } + + private void propagateToolbarState(boolean isShown, View view, int toolbarHeight) { + Scrollable scrollView = (Scrollable) view.findViewById(R.id.scroll); + if (scrollView == null) { + return; + } + if (isShown) { + // Scroll up + if (0 < scrollView.getCurrentScrollY()) { + scrollView.scrollVerticallyTo(0); + } + } else { + // Scroll down (to hide padding) + if (scrollView.getCurrentScrollY() < toolbarHeight) { + scrollView.scrollVerticallyTo(toolbarHeight); + } + } + } + + private boolean toolbarIsShown() { + return ViewHelper.getTranslationY(mHeaderView) == 0; + } + + private boolean toolbarIsHidden() { + return ViewHelper.getTranslationY(mHeaderView) == -mToolbarView.getHeight(); + } + + private void showToolbar() { + float headerTranslationY = ViewHelper.getTranslationY(mHeaderView); + if (headerTranslationY != 0) { + ViewPropertyAnimator.animate(mHeaderView).cancel(); + ViewPropertyAnimator.animate(mHeaderView).translationY(0).setDuration(200).start(); + } + propagateToolbarState(true); + } + + private void hideToolbar() { + float headerTranslationY = ViewHelper.getTranslationY(mHeaderView); + int toolbarHeight = mToolbarView.getHeight(); + if (headerTranslationY != -toolbarHeight) { + ViewPropertyAnimator.animate(mHeaderView).cancel(); + ViewPropertyAnimator.animate(mHeaderView).translationY(-toolbarHeight).setDuration(200).start(); + } + propagateToolbarState(false); + } + + /** + * This adapter provides two types of fragments as an example. + * {@linkplain #createItem(int)} should be modified if you use this example for your app. + */ + private static class NavigationAdapter extends CacheFragmentStatePagerAdapter { + + private static final String[] TITLES = new String[]{"Applepie", "Butter Cookie", "Cupcake", "Donut", "Eclair", "Froyo", "Gingerbread", "Honeycomb", "Ice Cream Sandwich", "Jelly Bean", "KitKat", "Lollipop"}; + + private int mScrollY; + + public NavigationAdapter(FragmentManager fm) { + super(fm); + } + + public void setScrollY(int scrollY) { + mScrollY = scrollY; + } + + @Override + protected Fragment createItem(int position) { + // Initialize fragments. + // Please be sure to pass scroll position to each fragments using setArguments. + Fragment f; + final int pattern = position % 3; + switch (pattern) { + case 0: { + f = new ViewPagerTabScrollViewFragment(); + if (0 <= mScrollY) { + Bundle args = new Bundle(); + args.putInt(ViewPagerTabScrollViewFragment.ARG_SCROLL_Y, mScrollY); + f.setArguments(args); + } + break; + } + case 1: { + f = new ViewPagerTabListViewFragment(); + if (0 < mScrollY) { + Bundle args = new Bundle(); + args.putInt(ViewPagerTabListViewFragment.ARG_INITIAL_POSITION, 1); + f.setArguments(args); + } + break; + } + case 2: + default: { + f = new ViewPagerTabRecyclerViewFragment(); + if (0 < mScrollY) { + Bundle args = new Bundle(); + args.putInt(ViewPagerTabRecyclerViewFragment.ARG_INITIAL_POSITION, 1); + f.setArguments(args); + } + break; + } + } + return f; + } + + @Override + public int getCount() { + return TITLES.length; + } + + @Override + public CharSequence getPageTitle(int position) { + return TITLES[position]; + } + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabActivityTest.java new file mode 100755 index 0000000000..6125d6ff26 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabActivityTest.java @@ -0,0 +1,53 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.test.ActivityInstrumentationTestCase2; +import android.view.View; + +public class ViewPagerTabActivityTest extends ActivityInstrumentationTestCase2 { + + private ViewPagerTabActivity activity; + + public ViewPagerTabActivityTest() { + super(ViewPagerTabActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + } + + public void testScroll() throws Throwable { + for (int i = 0; i < 3; i++) { + UiTestUtils.swipeHorizontally(this, activity.findViewById(R.id.pager), UiTestUtils.Direction.LEFT); + getInstrumentation().waitForIdleSync(); + scroll(); + } + for (int i = 0; i < 3; i++) { + UiTestUtils.swipeHorizontally(this, activity.findViewById(R.id.pager), UiTestUtils.Direction.RIGHT); + getInstrumentation().waitForIdleSync(); + scroll(); + } + } + + public void scroll() throws Throwable { + View scrollable = ((View) activity.getCurrentScrollable()).findViewById(R.id.scroll); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + } + + public void testSaveAndRestoreInstanceState() throws Throwable { + for (int i = 0; i < 3; i++) { + UiTestUtils.saveAndRestoreInstanceState(this, activity); + scroll(); + + UiTestUtils.swipeHorizontally(this, activity.findViewById(R.id.pager), UiTestUtils.Direction.LEFT); + getInstrumentation().waitForIdleSync(); + } + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabListViewFragment.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabListViewFragment.java new file mode 100755 index 0000000000..447e54b2d4 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabListViewFragment.java @@ -0,0 +1,59 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import com.github.ksoichiro.android.observablescrollview.ObservableListView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollUtils; + +public class ViewPagerTabListViewFragment extends Fragment { + + public static final String ARG_INITIAL_POSITION = "ARG_INITIAL_POSITION"; + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.fragment_listview, container, false); + + Activity parentActivity = getActivity(); + final ObservableListView listView = (ObservableListView) view.findViewById(R.id.scroll); + UiTestUtils.setDummyDataWithHeader(getActivity(), listView, inflater.inflate(R.layout.padding, null)); + + if (parentActivity instanceof ObservableScrollViewCallbacks) { + // Scroll to the specified position after layout + Bundle args = getArguments(); + if (args != null && args.containsKey(ARG_INITIAL_POSITION)) { + final int initialPosition = args.getInt(ARG_INITIAL_POSITION, 0); + ScrollUtils.addOnGlobalLayoutListener(listView, new Runnable() { + @Override + public void run() { + // scrollTo() doesn't work, should use setSelection() + listView.setSelection(initialPosition); + } + }); + } + listView.setScrollViewCallbacks((ObservableScrollViewCallbacks) parentActivity); + } + return view; + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabRecyclerViewFragment.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabRecyclerViewFragment.java new file mode 100755 index 0000000000..f91988e8a7 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabRecyclerViewFragment.java @@ -0,0 +1,62 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.support.v7.widget.LinearLayoutManager; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import com.github.ksoichiro.android.observablescrollview.ObservableRecyclerView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollUtils; + +public class ViewPagerTabRecyclerViewFragment extends Fragment { + + public static final String ARG_INITIAL_POSITION = "ARG_INITIAL_POSITION"; + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.fragment_recyclerview, container, false); + + Activity parentActivity = getActivity(); + final ObservableRecyclerView recyclerView = (ObservableRecyclerView) view.findViewById(R.id.scroll); + recyclerView.setLayoutManager(new LinearLayoutManager(parentActivity)); + recyclerView.setHasFixedSize(false); + View headerView = LayoutInflater.from(parentActivity).inflate(R.layout.padding, null); + UiTestUtils.setDummyDataWithHeader(getActivity(), recyclerView, headerView); + + if (parentActivity instanceof ObservableScrollViewCallbacks) { + // Scroll to the specified offset after layout + Bundle args = getArguments(); + if (args != null && args.containsKey(ARG_INITIAL_POSITION)) { + final int initialPosition = args.getInt(ARG_INITIAL_POSITION, 0); + ScrollUtils.addOnGlobalLayoutListener(recyclerView, new Runnable() { + @Override + public void run() { + recyclerView.scrollVerticallyToPosition(initialPosition); + } + }); + } + recyclerView.setScrollViewCallbacks((ObservableScrollViewCallbacks) parentActivity); + } + return view; + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabScrollViewFragment.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabScrollViewFragment.java new file mode 100755 index 0000000000..16c6265836 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/ViewPagerTabScrollViewFragment.java @@ -0,0 +1,56 @@ +/* + * Copyright 2014 Soichiro Kashima + * + * 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. + */ + +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import com.github.ksoichiro.android.observablescrollview.ObservableScrollView; +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ScrollUtils; + +public class ViewPagerTabScrollViewFragment extends Fragment { + + public static final String ARG_SCROLL_Y = "ARG_SCROLL_Y"; + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View view = inflater.inflate(R.layout.fragment_scrollview, container, false); + + final ObservableScrollView scrollView = (ObservableScrollView) view.findViewById(R.id.scroll); + Activity parentActivity = getActivity(); + if (parentActivity instanceof ObservableScrollViewCallbacks) { + // Scroll to the specified offset after layout + Bundle args = getArguments(); + if (args != null && args.containsKey(ARG_SCROLL_Y)) { + final int scrollY = args.getInt(ARG_SCROLL_Y, 0); + ScrollUtils.addOnGlobalLayoutListener(scrollView, new Runnable() { + @Override + public void run() { + scrollView.scrollTo(0, scrollY); + } + }); + } + scrollView.setScrollViewCallbacks((ObservableScrollViewCallbacks) parentActivity); + } + return view; + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/WebViewActivity.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/WebViewActivity.java new file mode 100755 index 0000000000..dd13963a80 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/WebViewActivity.java @@ -0,0 +1,33 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.os.Bundle; + +import com.github.ksoichiro.android.observablescrollview.ObservableScrollViewCallbacks; +import com.github.ksoichiro.android.observablescrollview.ObservableWebView; +import com.github.ksoichiro.android.observablescrollview.ScrollState; +import com.github.ksoichiro.android.observablescrollview.Scrollable; + +public class WebViewActivity extends Activity implements ObservableScrollViewCallbacks { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_webview); + ObservableWebView scrollable = (ObservableWebView) findViewById(R.id.scrollable); + scrollable.setScrollViewCallbacks(this); + scrollable.loadUrl("file:///android_asset/lipsum.html"); + } + + @Override + public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { + } + + @Override + public void onDownMotionEvent() { + } + + @Override + public void onUpOrCancelMotionEvent(ScrollState scrollState) { + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/WebViewActivityTest.java b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/WebViewActivityTest.java new file mode 100755 index 0000000000..d6cc295eba --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/github/ksoichiro/android/observablescrollview/test/WebViewActivityTest.java @@ -0,0 +1,58 @@ +package com.github.ksoichiro.android.observablescrollview.test; + +import android.app.Activity; +import android.test.ActivityInstrumentationTestCase2; +import android.util.DisplayMetrics; +import android.util.TypedValue; + +import com.github.ksoichiro.android.observablescrollview.ObservableWebView; + +public class WebViewActivityTest extends ActivityInstrumentationTestCase2 { + + private Activity activity; + private ObservableWebView scrollable; + + public WebViewActivityTest() { + super(WebViewActivity.class); + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + setActivityInitialTouchMode(true); + activity = getActivity(); + scrollable = (ObservableWebView) activity.findViewById(R.id.scrollable); + } + + public void testScroll() throws Throwable { + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.UP); + getInstrumentation().waitForIdleSync(); + + UiTestUtils.swipeVertically(this, scrollable, UiTestUtils.Direction.DOWN); + getInstrumentation().waitForIdleSync(); + } + + public void testSaveAndRestoreInstanceState() throws Throwable { + UiTestUtils.saveAndRestoreInstanceState(this, activity); + testScroll(); + } + + public void testScrollVerticallyTo() throws Throwable { + final DisplayMetrics metrics = activity.getResources().getDisplayMetrics(); + runTestOnUiThread(new Runnable() { + @Override + public void run() { + scrollable.scrollVerticallyTo((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 48, metrics)); + } + }); + getInstrumentation().waitForIdleSync(); + + runTestOnUiThread(new Runnable() { + @Override + public void run() { + scrollable.scrollVerticallyTo(0); + } + }); + getInstrumentation().waitForIdleSync(); + } +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/google/samples/apps/iosched/ui/widget/SlidingTabLayout.java b/eclipse-compile/observable/java2/androidTest/java/com/google/samples/apps/iosched/ui/widget/SlidingTabLayout.java new file mode 100755 index 0000000000..06f60f7afc --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/google/samples/apps/iosched/ui/widget/SlidingTabLayout.java @@ -0,0 +1,321 @@ +/* + * Copyright 2014 Google Inc. All rights reserved. + * + * 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. + */ + +package com.google.samples.apps.iosched.ui.widget; + +import android.content.Context; +import android.graphics.Typeface; +import android.support.v4.view.PagerAdapter; +import android.support.v4.view.ViewPager; +import android.util.AttributeSet; +import android.util.SparseArray; +import android.util.TypedValue; +import android.view.Gravity; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.HorizontalScrollView; +import android.widget.LinearLayout; +import android.widget.TextView; + +/** + * To be used with ViewPager to provide a tab indicator component which give constant feedback as to + * the user's scroll progress. + *

+ * To use the component, simply add it to your view hierarchy. Then in your + * {@link android.app.Activity} or {@link android.support.v4.app.Fragment} call + * {@link #setViewPager(android.support.v4.view.ViewPager)} providing it the ViewPager this layout is being used for. + *

+ * The colors can be customized in two ways. The first and simplest is to provide an array of colors + * via {@link #setSelectedIndicatorColors(int...)}. The + * alternative is via the {@link com.google.samples.apps.iosched.ui.widget.SlidingTabLayout.TabColorizer} interface which provides you complete control over + * which color is used for any individual position. + *

+ * The views used as tabs can be customized by calling {@link #setCustomTabView(int, int)}, + * providing the layout ID of your custom layout. + */ +public class SlidingTabLayout extends HorizontalScrollView { + /** + * Allows complete control over the colors drawn in the tab layout. Set with + * {@link #setCustomTabColorizer(com.google.samples.apps.iosched.ui.widget.SlidingTabLayout.TabColorizer)}. + */ + public interface TabColorizer { + + /** + * @return return the color of the indicator used when {@code position} is selected. + */ + int getIndicatorColor(int position); + + } + + private static final int TITLE_OFFSET_DIPS = 24; + private static final int TAB_VIEW_PADDING_DIPS = 16; + private static final int TAB_VIEW_TEXT_SIZE_SP = 12; + + private int mTitleOffset; + + private int mTabViewLayoutId; + private int mTabViewTextViewId; + private boolean mDistributeEvenly; + + private ViewPager mViewPager; + private SparseArray mContentDescriptions = new SparseArray(); + private ViewPager.OnPageChangeListener mViewPagerPageChangeListener; + + private final SlidingTabStrip mTabStrip; + + public SlidingTabLayout(Context context) { + this(context, null); + } + + public SlidingTabLayout(Context context, AttributeSet attrs) { + this(context, attrs, 0); + } + + public SlidingTabLayout(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + + // Disable the Scroll Bar + setHorizontalScrollBarEnabled(false); + // Make sure that the Tab Strips fills this View + setFillViewport(true); + + mTitleOffset = (int) (TITLE_OFFSET_DIPS * getResources().getDisplayMetrics().density); + + mTabStrip = new SlidingTabStrip(context); + addView(mTabStrip, LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); + } + + /** + * Set the custom {@link com.google.samples.apps.iosched.ui.widget.SlidingTabLayout.TabColorizer} to be used. + * + * If you only require simple custmisation then you can use + * {@link #setSelectedIndicatorColors(int...)} to achieve + * similar effects. + */ + public void setCustomTabColorizer(TabColorizer tabColorizer) { + mTabStrip.setCustomTabColorizer(tabColorizer); + } + + public void setDistributeEvenly(boolean distributeEvenly) { + mDistributeEvenly = distributeEvenly; + } + + /** + * Sets the colors to be used for indicating the selected tab. These colors are treated as a + * circular array. Providing one color will mean that all tabs are indicated with the same color. + */ + public void setSelectedIndicatorColors(int... colors) { + mTabStrip.setSelectedIndicatorColors(colors); + } + + /** + * Set the {@link android.support.v4.view.ViewPager.OnPageChangeListener}. When using {@link SlidingTabLayout} you are + * required to set any {@link android.support.v4.view.ViewPager.OnPageChangeListener} through this method. This is so + * that the layout can update it's scroll position correctly. + * + * @see android.support.v4.view.ViewPager#setOnPageChangeListener(android.support.v4.view.ViewPager.OnPageChangeListener) + */ + public void setOnPageChangeListener(ViewPager.OnPageChangeListener listener) { + mViewPagerPageChangeListener = listener; + } + + /** + * Set the custom layout to be inflated for the tab views. + * + * @param layoutResId Layout id to be inflated + * @param textViewId id of the {@link android.widget.TextView} in the inflated view + */ + public void setCustomTabView(int layoutResId, int textViewId) { + mTabViewLayoutId = layoutResId; + mTabViewTextViewId = textViewId; + } + + /** + * Sets the associated view pager. Note that the assumption here is that the pager content + * (number of tabs and tab titles) does not change after this call has been made. + */ + public void setViewPager(ViewPager viewPager) { + mTabStrip.removeAllViews(); + + mViewPager = viewPager; + if (viewPager != null) { + viewPager.setOnPageChangeListener(new InternalViewPagerListener()); + populateTabStrip(); + } + } + + /** + * Create a default view to be used for tabs. This is called if a custom tab view is not set via + * {@link #setCustomTabView(int, int)}. + */ + protected TextView createDefaultTabView(Context context) { + TextView textView = new TextView(context); + textView.setGravity(Gravity.CENTER); + textView.setTextSize(TypedValue.COMPLEX_UNIT_SP, TAB_VIEW_TEXT_SIZE_SP); + textView.setTypeface(Typeface.DEFAULT_BOLD); + textView.setLayoutParams(new LinearLayout.LayoutParams( + ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); + + TypedValue outValue = new TypedValue(); + getContext().getTheme().resolveAttribute(android.R.attr.selectableItemBackground, + outValue, true); + textView.setBackgroundResource(outValue.resourceId); + textView.setAllCaps(true); + + int padding = (int) (TAB_VIEW_PADDING_DIPS * getResources().getDisplayMetrics().density); + textView.setPadding(padding, padding, padding, padding); + + return textView; + } + + private void populateTabStrip() { + final PagerAdapter adapter = mViewPager.getAdapter(); + final OnClickListener tabClickListener = new TabClickListener(); + + for (int i = 0; i < adapter.getCount(); i++) { + View tabView = null; + TextView tabTitleView = null; + + if (mTabViewLayoutId != 0) { + // If there is a custom tab view layout id set, try and inflate it + tabView = LayoutInflater.from(getContext()).inflate(mTabViewLayoutId, mTabStrip, + false); + tabTitleView = (TextView) tabView.findViewById(mTabViewTextViewId); + } + + if (tabView == null) { + tabView = createDefaultTabView(getContext()); + } + + if (tabTitleView == null && TextView.class.isInstance(tabView)) { + tabTitleView = (TextView) tabView; + } + + if (mDistributeEvenly) { + LinearLayout.LayoutParams lp = (LinearLayout.LayoutParams) tabView.getLayoutParams(); + lp.width = 0; + lp.weight = 1; + } + + tabTitleView.setText(adapter.getPageTitle(i)); + tabView.setOnClickListener(tabClickListener); + String desc = mContentDescriptions.get(i, null); + if (desc != null) { + tabView.setContentDescription(desc); + } + + mTabStrip.addView(tabView); + if (i == mViewPager.getCurrentItem()) { + tabView.setSelected(true); + } + } + } + + public void setContentDescription(int i, String desc) { + mContentDescriptions.put(i, desc); + } + + @Override + protected void onAttachedToWindow() { + super.onAttachedToWindow(); + + if (mViewPager != null) { + scrollToTab(mViewPager.getCurrentItem(), 0); + } + } + + private void scrollToTab(int tabIndex, int positionOffset) { + final int tabStripChildCount = mTabStrip.getChildCount(); + if (tabStripChildCount == 0 || tabIndex < 0 || tabIndex >= tabStripChildCount) { + return; + } + + View selectedChild = mTabStrip.getChildAt(tabIndex); + if (selectedChild != null) { + int targetScrollX = selectedChild.getLeft() + positionOffset; + + if (tabIndex > 0 || positionOffset > 0) { + // If we're not at the first child and are mid-scroll, make sure we obey the offset + targetScrollX -= mTitleOffset; + } + + scrollTo(targetScrollX, 0); + } + } + + private class InternalViewPagerListener implements ViewPager.OnPageChangeListener { + private int mScrollState; + + @Override + public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { + int tabStripChildCount = mTabStrip.getChildCount(); + if ((tabStripChildCount == 0) || (position < 0) || (position >= tabStripChildCount)) { + return; + } + + mTabStrip.onViewPagerPageChanged(position, positionOffset); + + View selectedTitle = mTabStrip.getChildAt(position); + int extraOffset = (selectedTitle != null) + ? (int) (positionOffset * selectedTitle.getWidth()) + : 0; + scrollToTab(position, extraOffset); + + if (mViewPagerPageChangeListener != null) { + mViewPagerPageChangeListener.onPageScrolled(position, positionOffset, + positionOffsetPixels); + } + } + + @Override + public void onPageScrollStateChanged(int state) { + mScrollState = state; + + if (mViewPagerPageChangeListener != null) { + mViewPagerPageChangeListener.onPageScrollStateChanged(state); + } + } + + @Override + public void onPageSelected(int position) { + if (mScrollState == ViewPager.SCROLL_STATE_IDLE) { + mTabStrip.onViewPagerPageChanged(position, 0f); + scrollToTab(position, 0); + } + for (int i = 0; i < mTabStrip.getChildCount(); i++) { + mTabStrip.getChildAt(i).setSelected(position == i); + } + if (mViewPagerPageChangeListener != null) { + mViewPagerPageChangeListener.onPageSelected(position); + } + } + + } + + private class TabClickListener implements OnClickListener { + @Override + public void onClick(View v) { + for (int i = 0; i < mTabStrip.getChildCount(); i++) { + if (v == mTabStrip.getChildAt(i)) { + mViewPager.setCurrentItem(i); + return; + } + } + } + } + +} diff --git a/eclipse-compile/observable/java2/androidTest/java/com/google/samples/apps/iosched/ui/widget/SlidingTabStrip.java b/eclipse-compile/observable/java2/androidTest/java/com/google/samples/apps/iosched/ui/widget/SlidingTabStrip.java new file mode 100755 index 0000000000..803c4fb41d --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/java/com/google/samples/apps/iosched/ui/widget/SlidingTabStrip.java @@ -0,0 +1,168 @@ +/* + * Copyright 2014 Google Inc. All rights reserved. + * + * 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. + */ + +package com.google.samples.apps.iosched.ui.widget; + +import android.R; +import android.content.Context; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.Paint; +import android.util.AttributeSet; +import android.util.TypedValue; +import android.view.View; +import android.widget.LinearLayout; + +class SlidingTabStrip extends LinearLayout { + + private static final int DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS = 0; + private static final byte DEFAULT_BOTTOM_BORDER_COLOR_ALPHA = 0x26; + private static final int SELECTED_INDICATOR_THICKNESS_DIPS = 3; + private static final int DEFAULT_SELECTED_INDICATOR_COLOR = 0xFF33B5E5; + + private final int mBottomBorderThickness; + private final Paint mBottomBorderPaint; + + private final int mSelectedIndicatorThickness; + private final Paint mSelectedIndicatorPaint; + + private final int mDefaultBottomBorderColor; + + private int mSelectedPosition; + private float mSelectionOffset; + + private SlidingTabLayout.TabColorizer mCustomTabColorizer; + private final SimpleTabColorizer mDefaultTabColorizer; + + SlidingTabStrip(Context context) { + this(context, null); + } + + SlidingTabStrip(Context context, AttributeSet attrs) { + super(context, attrs); + setWillNotDraw(false); + + final float density = getResources().getDisplayMetrics().density; + + TypedValue outValue = new TypedValue(); + context.getTheme().resolveAttribute(R.attr.colorForeground, outValue, true); + final int themeForegroundColor = outValue.data; + + mDefaultBottomBorderColor = setColorAlpha(themeForegroundColor, + DEFAULT_BOTTOM_BORDER_COLOR_ALPHA); + + mDefaultTabColorizer = new SimpleTabColorizer(); + mDefaultTabColorizer.setIndicatorColors(DEFAULT_SELECTED_INDICATOR_COLOR); + + mBottomBorderThickness = (int) (DEFAULT_BOTTOM_BORDER_THICKNESS_DIPS * density); + mBottomBorderPaint = new Paint(); + mBottomBorderPaint.setColor(mDefaultBottomBorderColor); + + mSelectedIndicatorThickness = (int) (SELECTED_INDICATOR_THICKNESS_DIPS * density); + mSelectedIndicatorPaint = new Paint(); + } + + void setCustomTabColorizer(SlidingTabLayout.TabColorizer customTabColorizer) { + mCustomTabColorizer = customTabColorizer; + invalidate(); + } + + void setSelectedIndicatorColors(int... colors) { + // Make sure that the custom colorizer is removed + mCustomTabColorizer = null; + mDefaultTabColorizer.setIndicatorColors(colors); + invalidate(); + } + + void onViewPagerPageChanged(int position, float positionOffset) { + mSelectedPosition = position; + mSelectionOffset = positionOffset; + invalidate(); + } + + @Override + protected void onDraw(Canvas canvas) { + final int height = getHeight(); + final int childCount = getChildCount(); + final SlidingTabLayout.TabColorizer tabColorizer = mCustomTabColorizer != null + ? mCustomTabColorizer + : mDefaultTabColorizer; + + // Thick colored underline below the current selection + if (childCount > 0) { + View selectedTitle = getChildAt(mSelectedPosition); + int left = selectedTitle.getLeft(); + int right = selectedTitle.getRight(); + int color = tabColorizer.getIndicatorColor(mSelectedPosition); + + if (mSelectionOffset > 0f && mSelectedPosition < (getChildCount() - 1)) { + int nextColor = tabColorizer.getIndicatorColor(mSelectedPosition + 1); + if (color != nextColor) { + color = blendColors(nextColor, color, mSelectionOffset); + } + + // Draw the selection partway between the tabs + View nextTitle = getChildAt(mSelectedPosition + 1); + left = (int) (mSelectionOffset * nextTitle.getLeft() + + (1.0f - mSelectionOffset) * left); + right = (int) (mSelectionOffset * nextTitle.getRight() + + (1.0f - mSelectionOffset) * right); + } + + mSelectedIndicatorPaint.setColor(color); + + canvas.drawRect(left, height - mSelectedIndicatorThickness, right, + height, mSelectedIndicatorPaint); + } + + // Thin underline along the entire bottom edge + canvas.drawRect(0, height - mBottomBorderThickness, getWidth(), height, mBottomBorderPaint); + } + + /** + * Set the alpha value of the {@code color} to be the given {@code alpha} value. + */ + private static int setColorAlpha(int color, byte alpha) { + return Color.argb(alpha, Color.red(color), Color.green(color), Color.blue(color)); + } + + /** + * Blend {@code color1} and {@code color2} using the given ratio. + * + * @param ratio of which to blend. 1.0 will return {@code color1}, 0.5 will give an even blend, + * 0.0 will return {@code color2}. + */ + private static int blendColors(int color1, int color2, float ratio) { + final float inverseRation = 1f - ratio; + float r = (Color.red(color1) * ratio) + (Color.red(color2) * inverseRation); + float g = (Color.green(color1) * ratio) + (Color.green(color2) * inverseRation); + float b = (Color.blue(color1) * ratio) + (Color.blue(color2) * inverseRation); + return Color.rgb((int) r, (int) g, (int) b); + } + + private static class SimpleTabColorizer implements SlidingTabLayout.TabColorizer { + private int[] mIndicatorColors; + + @Override + public final int getIndicatorColor(int position) { + return mIndicatorColors[position % mIndicatorColors.length]; + } + + void setIndicatorColors(int... colors) { + mIndicatorColors = colors; + } + } +} diff --git a/eclipse-compile/observable/java2/androidTest/res/color/tab_text_color.xml b/eclipse-compile/observable/java2/androidTest/res/color/tab_text_color.xml new file mode 100755 index 0000000000..48f21f866b --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/color/tab_text_color.xml @@ -0,0 +1,21 @@ + + + + + + + \ No newline at end of file diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/activity_gridview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/activity_gridview.xml new file mode 100755 index 0000000000..d5ddb31dda --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/activity_gridview.xml @@ -0,0 +1,20 @@ + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/activity_listview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/activity_listview.xml new file mode 100755 index 0000000000..18dd210b48 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/activity_listview.xml @@ -0,0 +1,19 @@ + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/activity_recyclerview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/activity_recyclerview.xml new file mode 100755 index 0000000000..dce42c4710 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/activity_recyclerview.xml @@ -0,0 +1,19 @@ + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/activity_scrollview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/activity_scrollview.xml new file mode 100755 index 0000000000..972537fe60 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/activity_scrollview.xml @@ -0,0 +1,27 @@ + + + + + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_gridview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_gridview.xml new file mode 100755 index 0000000000..043e6175c6 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_gridview.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_listview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_listview.xml new file mode 100755 index 0000000000..05c8e29976 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_listview.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_recyclerview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_recyclerview.xml new file mode 100755 index 0000000000..c236b3d15a --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_recyclerview.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_scrollview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_scrollview.xml new file mode 100755 index 0000000000..de7cf631c7 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_scrollview.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_webview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_webview.xml new file mode 100755 index 0000000000..8e834969ed --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/activity_touchinterception_webview.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/activity_viewpagertab.xml b/eclipse-compile/observable/java2/androidTest/res/layout/activity_viewpagertab.xml new file mode 100755 index 0000000000..c55804bd5f --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/activity_viewpagertab.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/activity_viewpagertab2.xml b/eclipse-compile/observable/java2/androidTest/res/layout/activity_viewpagertab2.xml new file mode 100755 index 0000000000..510ed95cbe --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/activity_viewpagertab2.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/activity_webview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/activity_webview.xml new file mode 100755 index 0000000000..75d62617cf --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/activity_webview.xml @@ -0,0 +1,19 @@ + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/fragment_gridview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/fragment_gridview.xml new file mode 100755 index 0000000000..65241a4d05 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/fragment_gridview.xml @@ -0,0 +1,20 @@ + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/fragment_listview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/fragment_listview.xml new file mode 100755 index 0000000000..08d5d41b8f --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/fragment_listview.xml @@ -0,0 +1,19 @@ + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/fragment_recyclerview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/fragment_recyclerview.xml new file mode 100755 index 0000000000..49f0959042 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/fragment_recyclerview.xml @@ -0,0 +1,20 @@ + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/fragment_scrollview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/fragment_scrollview.xml new file mode 100755 index 0000000000..0be95c8542 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/fragment_scrollview.xml @@ -0,0 +1,37 @@ + + + + + + + + + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/fragment_scrollview_noheader.xml b/eclipse-compile/observable/java2/androidTest/res/layout/fragment_scrollview_noheader.xml new file mode 100755 index 0000000000..2ac408dd4b --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/fragment_scrollview_noheader.xml @@ -0,0 +1,35 @@ + + + + + + + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/fragment_webview.xml b/eclipse-compile/observable/java2/androidTest/res/layout/fragment_webview.xml new file mode 100755 index 0000000000..b02d9ec387 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/fragment_webview.xml @@ -0,0 +1,19 @@ + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/padding.xml b/eclipse-compile/observable/java2/androidTest/res/layout/padding.xml new file mode 100755 index 0000000000..b3550e378e --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/padding.xml @@ -0,0 +1,19 @@ + + diff --git a/eclipse-compile/observable/java2/androidTest/res/layout/tab_indicator.xml b/eclipse-compile/observable/java2/androidTest/res/layout/tab_indicator.xml new file mode 100755 index 0000000000..3bf50059c8 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/layout/tab_indicator.xml @@ -0,0 +1,25 @@ + + \ No newline at end of file diff --git a/eclipse-compile/observable/java2/androidTest/res/values/colors.xml b/eclipse-compile/observable/java2/androidTest/res/values/colors.xml new file mode 100755 index 0000000000..221c75c779 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/values/colors.xml @@ -0,0 +1,22 @@ + + + + #009688 + #00796b + #eeff41 + + diff --git a/eclipse-compile/observable/java2/androidTest/res/values/dimens.xml b/eclipse-compile/observable/java2/androidTest/res/values/dimens.xml new file mode 100755 index 0000000000..286c5be17f --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/values/dimens.xml @@ -0,0 +1,21 @@ + + + 48dp + 72dp + 56dp + 16dp + diff --git a/eclipse-compile/observable/java2/androidTest/res/values/strings.xml b/eclipse-compile/observable/java2/androidTest/res/values/strings.xml new file mode 100755 index 0000000000..6f8f606284 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/values/strings.xml @@ -0,0 +1,23 @@ + + + + Lorem ipsum dolor sit amet, ut duis lorem provident sed felis blandit, condimentum donec lectus ipsum et mauris, morbi porttitor interdum feugiat nulla donec sodales, vestibulum nisl primis a molestie vestibulum quam, sapien mauris metus risus suspendisse magnis. Augue viverra nulla faucibus egestas eu, a etiam id congue rutrum ante, arcu tincidunt donec quam felis at ornare, iaculis ligula sodales venenatis commodo volutpat neque, suspendisse elit praesent tellus felis mi amet. Inceptos amet tempor lectus lorem est non, ac donec ac libero neque mauris, tellus ante metus eget leo consequat. Scelerisque dolor curabitur pretium blandit ut feugiat, amet lacus pulvinar justo convallis ut, sed natoque ipsum urna posuere nibh eu. Sed at sed vulputate sit orci, facilisis a aliquam tellus quam aliquam, eu aliquam donec at molestie ante, pellentesque mauris lorem ultrices libero faucibus porta, imperdiet adipiscing sit hac diam ut nulla. Lacus enim elit pulvinar donec vehicula dapibus, accumsan purus officia cursus dolor sapien, eu amet dis mauris mi nulla ut. Non accusamus etiam pede non urna tempus, vestibulum aliquam tortor eget pharetra sodales, in vestibulum ut justo orci nulla, lobortis purus sem semper consectetuer magni purus. Dolor a leo vestibulum amet ut sit, arcu ut eaque urna fusce aliquet turpis, sed fermentum sed vestibulum nisl pede, tristique enim lorem posuere in laborum ut. Vestibulum id id justo leo nulla, magna lobortis ullamcorper et dignissim pellentesque, duis suspendisse quis id lorem ante. Vivamus a nullam ante adipiscing amet, mi vel consectetuer nunc aenean pede quisque, eget rhoncus dis porttitor habitant nunc vivamus, duis cubilia blandit non donec justo dictumst, praesent vitae nulla nam pulvinar urna. Adipiscing adipiscing justo urna pulvinar imperdiet nullam, vitae fusce rhoncus proin nonummy suscipit, ullamcorper amet et non potenti platea ultrices, mauris nullam sapien nunc justo vel, eu semper pellentesque arcu fusce augue. Malesuada mauris nibh sit a a scelerisque, velit sem lectus tellus convallis consectetuer, ultricies auctor a ante eros amet sed.\n\n +Risus lacus duis leo platea wisi, felis maecenas rutrum in id in donec, non id a potenti libero eget, posuere elit ea sed pellentesque quis. Sunt lacus urna lorem elit duis, nibh donec purus quisque consectetuer dolor, neque vestibulum proin ornare eros nonummy phasellus. Iaculis cras eu at egestas dolor montes, viverra quisque malesuada consectetuer semper maecenas, a sed vitae donec tempor aliqua metus, ornare mollis suscipit et erat fusce, sit orci aut auctor elementum fames aliquam. Platea dui integer magnis non metus, minus dignissimos ante massa nostra et, rutrum sapien egestas quis sapien donec donec. Erat sit a eros aenean natoque, quam libero id lorem enim proin, lorem ipsum fermentum mattis metus et. Aliquam aliquet suscipit purus conubia at neque, platea vivamus vestibulum nulla quibusdam senectus, et morbi lectus malesuada gravida donec, elementum sit convallis pellentesque velit amet. Et eveniet viverra vehicula consectetuer justo, provident sed commodo non lacinia velit, tempor phasellus vel leo nisl cras, vivamus et arcu interdum dui eu amet. Volutpat wisi rhoncus vel turpis diam quibusdam, dapibus elit est quisque cubilia mauris, nulla elit magna tempor accumsan bibendum, lorem varius sed interdum eget mattis, scelerisque egestas feugiat donec dui molestie. Leo facilisis nisl sit montes ligula sed, enim commodo consectetuer nunc est et, ut sed vehicula dolor luctus elit. Fermentum cras donec eget nibh est vel, sed justo risus et pharetra diam, eu vivamus egestas ligula risus diam, sed justo eget hac ut mauris. Vestibulum diam nec vitae mi eget suspendisse, aenean arcu purus facilisis purus class in, id aliquam sit id scelerisque sapien etiam. Ut nullam sit sed at mauris lobortis, consequat dolor autem ipsum euismod nulla, elit quis proin eget conubia varius, erat arcu massa mus in mauris, scelerisque ut eu sollicitudin libero leo urna.\n\n +Consectetuer luctus tempor elit ut dolor ligula, quis dui per dui hendrerit ante sagittis, in quisque pretium in eleifend enim. Condimentum iaculis vitae feugiat dis tellus vel, lectus dolor nec dui nulla nascetur, et pellentesque curabitur lorem leo velit eget. Id nascetur arcu lobortis suspendisse imperdiet urna, natoque nascetur ante in porta a, interdum hendrerit mi bibendum platea tellus, urna in enim ornare vestibulum faucibus enim. Leo fusce egestas ante nec volutpat, in tempor vel facilisis potenti ut, pede at non lorem a commodo, nulla dolor orci interdum vestibulum nulla. Dui nulla vestibulum quisque a pharetra porta, integer nec ipsum nec sed dui pharetra, magna et dignissim ipsum sed dictum, litora eros vivamus scelerisque libero ipsum. Sed ac ac lorem molestie adipiscing morbi, pellentesque imperdiet nunc quis morbi amet ante, libero dui ligula nec risus neque et, velit nonummy phasellus et facilisi amet, ligula in elementum non sapien pulvinar faucibus. Eu leo ut posuere sed aliquet, tincidunt vel urna volutpat tempus sem, sit felis aliquet vestibulum condimentum sit, amet nibh vel tellus purus ullamcorper libero, nulla vestibulum pede ut vestibulum pretium. Eu nulla vestibulum a neque in metus, quisquam nam sed cursus eget luctus, pede ultrices nec sed dignissim pellentesque, sit class cursus metus nulla placerat mauris, consequat mollis neque vivamus amet pede. Mauris dolor nulla diam eros bibendum, quam ante vestibulum morbi non ligula vel, molestie curabitur rhoncus nulla euismod interdum non. Nulla fringilla lorem mollis ad massa, sit molestie nibh lorem arcu volutpat, accumsan commodo lectus eu et donec, sit tempor tempus rutrum in curabitur amet. Nec urna euismod a tincidunt commodo, eu pede turpis libero vitae viverra, ante vestibulum nam non habitasse potenti, mauris imperdiet in in nunc convallis. Et nostra wisi in est accumsan vehicula, quisque vitae felis mauris sed vulputate nec, ante imperdiet sollicitudin massa iaculis massa sit.\n\n +Quam libero nulla netus eu porta curae, ut nulla bibendum facilisis et urna sed, quis congue vestibulum aliquam interdum etiam. Nulla vel lobortis ullamcorper vitae excepturi, neque urna feugiat lectus vel lacinia, massa pretium orci eu metus neque vulputate. Imperdiet ac velit rhoncus nulla malesuada nullam, nec pulvinar justo gravida lorem rutrum magna, habitasse repudiandae mi eros vestibulum ante, nec euismod dui iaculis in turpis pretium, ac id metus egestas proin lacus lectus. Laoreet lorem nec vitae risus erat arcu, vitae quam ut in ante tristique, porta dolor pede quam et odio nam, arcu lacus sem congue ante cursus massa. Et mattis sagittis erat accumsan fusce quam, vehicula ligula beatae natoque fusce sodales conubia, habitasse metus cum magnis viverra nam cursus, egestas urna wisi primis blandit eu magna, eget libero elit lacus lorem dis aliquam. Ut mauris ante natoque lacus massa, justo a lectus sodales enim adipiscing id, accumsan ut ipsum vestibulum sed enim auctor, vitae congue tincidunt id phasellus lacinia scelerisque, tincidunt sapien nulla euismod volutpat iaculis. Platea sociis nec aliquet nec molestie, in mi et augue sapien in vivamus, integer fames proin vitae in ullamcorper et. Fringilla etiam sapiente rhoncus suspendisse nec id, lobortis cras eget egestas dui ac nec, justo lacus ut lorem bibendum quia eros, eget a gravida id donec nunc suscipit, porta sed in sodales non rutrum. Lectus vel dui elementum pellentesque magna aliquam, vitae non sit pede et fusce nibh, id id deserunt ornare dui sit condimentum, in adipiscing imperdiet turpis nam aliquet, facilisis metus magna lacus wisi facilisis tortor. Vulputate elit accumsan quam amet ligula, suspendisse lacus mi nonummy integer urna, libero nulla nunc varius in odio, laoreet nulla amet placerat amet nec. Consectetuer vel massa hendrerit vitae iaculis id, sed ut ut laudantium odio in, elit vestibulum duis ante maecenas interdum in, neque vehicula ultrices varius in quam, pede tellus pellentesque sed nullam quis. + + diff --git a/eclipse-compile/observable/java2/androidTest/res/values/styles.xml b/eclipse-compile/observable/java2/androidTest/res/values/styles.xml new file mode 100755 index 0000000000..4c1781a192 --- /dev/null +++ b/eclipse-compile/observable/java2/androidTest/res/values/styles.xml @@ -0,0 +1,36 @@ + + + + + + + + + + diff --git a/plugins/OsmAnd-AddressPlugin/project.properties b/eclipse-compile/observable/project.properties similarity index 50% rename from plugins/OsmAnd-AddressPlugin/project.properties rename to eclipse-compile/observable/project.properties index 4ab125693c..0a24296b13 100644 --- a/plugins/OsmAnd-AddressPlugin/project.properties +++ b/eclipse-compile/observable/project.properties @@ -3,12 +3,14 @@ # # This file must be checked in Version Control Systems. # -# To customize properties used by the Ant build system edit +# To customize properties used by the Ant build system use, # "ant.properties", and override values to adapt the script to your # project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt +# Indicates whether an apk should be generated for each density. +split.density=false # Project target. -target=android-19 +target=android-21 +dex.force.jumbo=true +android.library=true +android.library.reference.1=../appcompat diff --git a/eclipse-compile/observable/res/.gitkeep b/eclipse-compile/observable/res/.gitkeep new file mode 100755 index 0000000000..e69de29bb2 diff --git a/plugins/OsmAnd-AddressPlugin/.gitignore b/plugins/OsmAnd-AddressPlugin/.gitignore deleted file mode 100644 index 36986d81cf..0000000000 --- a/plugins/OsmAnd-AddressPlugin/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -bin -gen -raw -obj diff --git a/plugins/OsmAnd-AddressPlugin/AndroidManifest.xml b/plugins/OsmAnd-AddressPlugin/AndroidManifest.xml deleted file mode 100644 index 4fc7ea3f17..0000000000 --- a/plugins/OsmAnd-AddressPlugin/AndroidManifest.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/plugins/OsmAnd-AddressPlugin/build.gradle b/plugins/OsmAnd-AddressPlugin/build.gradle deleted file mode 100644 index 9d9cc05dd9..0000000000 --- a/plugins/OsmAnd-AddressPlugin/build.gradle +++ /dev/null @@ -1,67 +0,0 @@ -apply plugin: 'com.android.application' - -android { - compileSdkVersion 21 - buildToolsVersion "21.1.2" - - signingConfigs { - development { - storeFile file("../../keystores/debug.keystore") - storePassword "android" - keyAlias "androiddebugkey" - keyPassword "android" - } - - publishing { - storeFile file("../../osmand_key") - storePassword System.getenv("OSMAND_APK_PASSWORD") - keyAlias "androiddebugkey" - keyPassword System.getenv("OSMAND_APK_PASSWORD") - } - } - - defaultConfig { - minSdkVersion 9 - targetSdkVersion 21 - } - - lintOptions { - abortOnError false - } - - sourceSets { - main { - manifest.srcFile "AndroidManifest.xml" - jni.srcDirs = [] - jniLibs.srcDirs = [] - aidl.srcDirs = ["src"] - java.srcDirs = ["src"] - resources.srcDirs = ["src"] - renderscript.srcDirs = ["src"] - res.srcDirs = ["res"] - assets.srcDirs = ["assets"] - } - } - - buildTypes { - debug { - signingConfig signingConfigs.development - } - release { - signingConfig signingConfigs.publishing - } - } -} - -repositories { - ivy { - name = "OsmAndBinariesIvy" - url = "http://builder.osmand.net" - layout "pattern", { - artifact "ivy/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" - } - } -} - -dependencies { -} diff --git a/plugins/OsmAnd-AddressPlugin/proguard-project.txt b/plugins/OsmAnd-AddressPlugin/proguard-project.txt deleted file mode 100644 index f2fe1559a2..0000000000 --- a/plugins/OsmAnd-AddressPlugin/proguard-project.txt +++ /dev/null @@ -1,20 +0,0 @@ -# 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 *; -#} diff --git a/plugins/OsmAnd-AddressPlugin/res/drawable-hdpi/ic_launcher.png b/plugins/OsmAnd-AddressPlugin/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index 96a442e5b8..0000000000 Binary files a/plugins/OsmAnd-AddressPlugin/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/plugins/OsmAnd-AddressPlugin/res/drawable-hdpi/icon.png b/plugins/OsmAnd-AddressPlugin/res/drawable-hdpi/icon.png deleted file mode 100644 index 23bcb31f3a..0000000000 Binary files a/plugins/OsmAnd-AddressPlugin/res/drawable-hdpi/icon.png and /dev/null differ diff --git a/plugins/OsmAnd-AddressPlugin/res/drawable-ldpi/ic_launcher.png b/plugins/OsmAnd-AddressPlugin/res/drawable-ldpi/ic_launcher.png deleted file mode 100644 index 99238729d8..0000000000 Binary files a/plugins/OsmAnd-AddressPlugin/res/drawable-ldpi/ic_launcher.png and /dev/null differ diff --git a/plugins/OsmAnd-AddressPlugin/res/drawable-ldpi/icon.png b/plugins/OsmAnd-AddressPlugin/res/drawable-ldpi/icon.png deleted file mode 100644 index 4d16e761bf..0000000000 Binary files a/plugins/OsmAnd-AddressPlugin/res/drawable-ldpi/icon.png and /dev/null differ diff --git a/plugins/OsmAnd-AddressPlugin/res/drawable-mdpi/ic_launcher.png b/plugins/OsmAnd-AddressPlugin/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index 359047dfa4..0000000000 Binary files a/plugins/OsmAnd-AddressPlugin/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/plugins/OsmAnd-AddressPlugin/res/drawable-mdpi/icon.png b/plugins/OsmAnd-AddressPlugin/res/drawable-mdpi/icon.png deleted file mode 100644 index 60455f8c8f..0000000000 Binary files a/plugins/OsmAnd-AddressPlugin/res/drawable-mdpi/icon.png and /dev/null differ diff --git a/plugins/OsmAnd-AddressPlugin/res/drawable-xhdpi/ic_launcher.png b/plugins/OsmAnd-AddressPlugin/res/drawable-xhdpi/ic_launcher.png deleted file mode 100644 index 71c6d760f0..0000000000 Binary files a/plugins/OsmAnd-AddressPlugin/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/plugins/OsmAnd-AddressPlugin/res/drawable-xhdpi/icon.png b/plugins/OsmAnd-AddressPlugin/res/drawable-xhdpi/icon.png deleted file mode 100644 index 9f0621e681..0000000000 Binary files a/plugins/OsmAnd-AddressPlugin/res/drawable-xhdpi/icon.png and /dev/null differ diff --git a/plugins/OsmAnd-AddressPlugin/res/layout/main.xml b/plugins/OsmAnd-AddressPlugin/res/layout/main.xml deleted file mode 100644 index 35e8b132cc..0000000000 --- a/plugins/OsmAnd-AddressPlugin/res/layout/main.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/plugins/OsmAnd-AddressPlugin/res/values/strings.xml b/plugins/OsmAnd-AddressPlugin/res/values/strings.xml deleted file mode 100644 index 58c67bd539..0000000000 --- a/plugins/OsmAnd-AddressPlugin/res/values/strings.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - No - Yes - OsmAnd is not installed - OsmAnd Address Book Plugin - OsmAnd Address Book Plugin is installed. - diff --git a/plugins/OsmAnd-AddressPlugin/src/net/osmand/addressPlugin/AddressBookPluginActivity.java b/plugins/OsmAnd-AddressPlugin/src/net/osmand/addressPlugin/AddressBookPluginActivity.java deleted file mode 100644 index 5d3083dfea..0000000000 --- a/plugins/OsmAnd-AddressPlugin/src/net/osmand/addressPlugin/AddressBookPluginActivity.java +++ /dev/null @@ -1,60 +0,0 @@ -package net.osmand.addressPlugin; - -import android.app.Activity; -import android.app.AlertDialog; -import android.content.ActivityNotFoundException; -import android.content.ComponentName; -import android.content.DialogInterface; -import android.content.Intent; -import android.content.pm.PackageManager; -import android.content.pm.ResolveInfo; -import android.net.Uri; -import android.os.Bundle; - -public class AddressBookPluginActivity extends Activity { - private static final String OSMAND_COMPONENT = "net.osmand"; //$NON-NLS-1$ - private static final String OSMAND_COMPONENT_PLUS = "net.osmand.plus"; //$NON-NLS-1$ - private static final String OSMAND_ACTIVITY = "net.osmand.plus.activities.MainMenuActivity"; //$NON-NLS-1$ - - /** Called when the activity is first created. */ - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.main); - - Intent intentPlus = new Intent(); - intentPlus.setComponent(new ComponentName(OSMAND_COMPONENT_PLUS, OSMAND_ACTIVITY)); - intentPlus.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); - ResolveInfo resolved = getPackageManager().resolveActivity(intentPlus, PackageManager.MATCH_DEFAULT_ONLY); - if(resolved != null) { - stopService(intentPlus); - startActivity(intentPlus); - } else { - Intent intentNormal = new Intent(); - intentNormal.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); - intentNormal.setComponent(new ComponentName(OSMAND_COMPONENT, OSMAND_ACTIVITY)); - resolved = getPackageManager().resolveActivity(intentNormal, PackageManager.MATCH_DEFAULT_ONLY); - if (resolved != null) { - stopService(intentNormal); - startActivity(intentNormal); - } else { - AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.setMessage(getString(R.string.osmand_app_not_found)); - builder.setPositiveButton(getString(R.string.shared_string_yes), new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:" + OSMAND_COMPONENT_PLUS)); - try { - stopService(intent); - startActivity(intent); - } catch (ActivityNotFoundException e) { - } - } - }); - builder.setNegativeButton(getString(R.string.shared_string_no), null); - builder.show(); - } - } - } - -} \ No newline at end of file diff --git a/plugins/OsmAnd-AddressPlugin/src/net/osmand/addressPlugin/ContactAddressPluginActivity.java b/plugins/OsmAnd-AddressPlugin/src/net/osmand/addressPlugin/ContactAddressPluginActivity.java deleted file mode 100644 index 8619fd283d..0000000000 --- a/plugins/OsmAnd-AddressPlugin/src/net/osmand/addressPlugin/ContactAddressPluginActivity.java +++ /dev/null @@ -1,120 +0,0 @@ -package net.osmand.addressPlugin; - -import java.util.StringTokenizer; - -import android.app.Activity; -import android.app.AlertDialog; -import android.content.ActivityNotFoundException; -import android.content.ComponentName; -import android.content.DialogInterface; -import android.content.Intent; -import android.content.pm.PackageManager; -import android.content.pm.ResolveInfo; -import android.database.Cursor; -import android.net.Uri; -import android.os.Bundle; -import android.provider.ContactsContract; - -public class ContactAddressPluginActivity extends Activity { - private static final String OSMAND_COMPONENT = "net.osmand"; //$NON-NLS-1$ - private static final String OSMAND_COMPONENT_PLUS = "net.osmand.plus"; //$NON-NLS-1$ - private static final String OSMAND_ACTIVITY = "net.osmand.plus.activities.search.GeoIntentActivity"; //$NON-NLS-1$ - private static final int CONTACT_PICKER_RESULT = 1001; - //content://com.android.contacts/data/5 - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - final Intent intent = getIntent(); - if (intent != null) { - - Cursor cur=getContentResolver().query(intent.getData(),null,null,null,null); - if (cur.moveToFirst() == false) - { - //no rows empty cursor - return; - } - - final String street = cur.getString(cur.getColumnIndexOrThrow(ContactsContract.CommonDataKinds.StructuredPostal.FORMATTED_ADDRESS)); - StringTokenizer token=new StringTokenizer(street, ","); - boolean latlong=false; - String latitude=null; - String longitude=null; - if(token.countTokens()==2){ - String temp=token.nextToken(); - if(temp.startsWith("loc:")){ - temp=temp.substring(4); - } - if (temp.trim().matches("((-|\\+)?[0-9]+(\\.[0-9]+)?)+")) { - latitude=temp.trim(); - } - temp=token.nextToken(); - if(temp.trim().matches("((-|\\+)?[0-9]+(\\.[0-9]+)?)+")){ - longitude= temp.trim(); - } - if(latitude!=null && longitude!=null){ - latlong=true; - } - } - String data="geo:"; - if(latlong){ - data=data+latitude+","+longitude; - }else{ - data=data+"0,0?q="+street; - } - - //The cursor is already positioned at the begining of the cursor - //let's access a few columns - - //let's now see how we can loop through a cursor - startOSMAND(intent, data); - /*while(cur.moveToNext()) - { - //cursor moved successfully - //access fields - }*/ - - } - finish(); - } - - - public void startOSMAND(Intent original,String data){ - Intent intentPlus = new Intent(); - intentPlus.setComponent(new ComponentName(OSMAND_COMPONENT_PLUS, OSMAND_ACTIVITY)); - intentPlus.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); - intentPlus.setData(Uri.parse(data)); - intentPlus.setAction(original.getAction()); - ResolveInfo resolved = getPackageManager().resolveActivity(intentPlus, PackageManager.MATCH_DEFAULT_ONLY); - if(resolved != null) { - stopService(intentPlus); - startActivity(intentPlus); - } else { - Intent intentNormal = new Intent(); - intentNormal.setFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); - intentNormal.setData(original.getData()); - intentNormal.setComponent(new ComponentName(OSMAND_COMPONENT, OSMAND_ACTIVITY)); - resolved = getPackageManager().resolveActivity(intentNormal, PackageManager.MATCH_DEFAULT_ONLY); - if (resolved != null) { - stopService(intentNormal); - startActivity(intentNormal); - } else { - AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.setMessage(getString(R.string.osmand_app_not_found)); - builder.setPositiveButton(getString(R.string.shared_string_yes), new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pname:" + OSMAND_COMPONENT_PLUS)); - try { - stopService(intent); - startActivity(intent); - } catch (ActivityNotFoundException e) { - } - } - }); - builder.setNegativeButton(getString(R.string.shared_string_no), null); - builder.show(); - } - } - - } -} \ No newline at end of file