├── .gitignore ├── .idea ├── .name ├── compiler.xml ├── copyright │ ├── apache2_0_license.xml │ └── profiles_settings.xml ├── dictionaries │ └── pddstudio.xml ├── gradle.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── .travis.yml ├── README.md ├── app-debug.apk ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── pddstudio │ │ └── earthviewdemo │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── pddstudio │ │ │ └── earthviewdemo │ │ │ ├── EarthViewAdapter.java │ │ │ └── MainActivity.java │ └── res │ │ ├── layout │ │ ├── activity_main.xml │ │ ├── content_main.xml │ │ └── earth_view_item.xml │ │ ├── menu │ │ └── menu_main.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ └── values │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── pddstudio │ └── earthviewdemo │ └── ExampleUnitTest.java ├── build.gradle ├── earthview-android ├── .gitignore ├── build.gradle ├── gradle.properties ├── libs │ └── commons-io-2.4.jar ├── maven-push.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── pddstudio │ │ └── earthview │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── pddstudio │ │ │ └── earthview │ │ │ ├── EarthView.java │ │ │ ├── EarthViewCallback.java │ │ │ ├── EarthWallpaper.java │ │ │ ├── SingleEarthViewCallback.java │ │ │ ├── sync │ │ │ └── SynchronizedTask.java │ │ │ └── utils │ │ │ ├── ApiUtils.java │ │ │ ├── AsyncLoader.java │ │ │ ├── EarthViewUtils.java │ │ │ ├── IdUtils.java │ │ │ └── SingleLoader.java │ └── res │ │ └── values │ │ ├── info_strings.xml │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── pddstudio │ └── earthview │ └── ExampleUnitTest.java ├── gfx ├── hdpi │ └── ic_launcher.png ├── mdpi │ └── ic_launcher.png ├── playstore │ ├── earthviewer-min.png │ ├── ic_banner.png │ └── ic_launcher.png ├── xhdpi │ └── ic_launcher.png ├── xxhdpi │ └── ic_launcher.png └── xxxhdpi │ └── ic_launcher.png ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── preview ├── en-play-badge.png ├── ps │ ├── screener_20151213(21:52:46).png │ ├── screener_20151213(21:52:56).png │ ├── screener_20151213(21:53:28).png │ ├── screener_20151213(21:53:42).png │ └── screener_20151213(21:53:51).png └── screenshot.png ├── ps-app ├── build.gradle ├── fabric.properties ├── proguard-rules.pro ├── ps-app-release.apk └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── pddstudio │ │ └── wallpaperrecyclerdemo │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ └── fonts │ │ │ ├── OpenSans-Regular.ttf │ │ │ ├── Roboto-Regular.ttf │ │ │ ├── RobotoMono-Regular.ttf │ │ │ └── RobotoSlab-Regular.ttf │ ├── java │ │ └── com │ │ │ └── pddstudio │ │ │ └── earthviewer │ │ │ ├── AboutActivity.java │ │ │ ├── DemoActivity.java │ │ │ ├── EarthViewAdapter.java │ │ │ ├── FavoritesActivity.java │ │ │ ├── FavoritesActivityPre.java │ │ │ ├── SettingsActivity.java │ │ │ ├── SettingsActivityPre.java │ │ │ ├── WallpaperActivity.java │ │ │ ├── WallpaperActivityPre.java │ │ │ ├── muzei │ │ │ ├── EarthViewerSource.java │ │ │ ├── MuzeiPreferences.java │ │ │ └── MuzeiSettingsActivity.java │ │ │ ├── utils │ │ │ ├── DownloadHighResImage.java │ │ │ ├── DownloadWallpaperTask.java │ │ │ ├── Favorites.java │ │ │ ├── Preferences.java │ │ │ └── preferences │ │ │ │ ├── ClearCachePreference.java │ │ │ │ ├── ClearDirectoryPreference.java │ │ │ │ ├── InfoPreferenceItem.java │ │ │ │ └── SaveDirectoryPreference.java │ │ │ └── views │ │ │ ├── AboutDialog.java │ │ │ ├── BaseDialog.java │ │ │ ├── EarthViewScrollListener.java │ │ │ ├── SquaredImageView.java │ │ │ ├── about │ │ │ ├── AboutFragment.java │ │ │ ├── AboutFragmentCompat.java │ │ │ └── CustomLibs.java │ │ │ └── utils │ │ │ ├── CustomFabBehavior.java │ │ │ └── ScrollFabBehavior.java │ └── res │ │ ├── drawable-hdpi │ │ ├── ic_info_black_24dp.png │ │ ├── ic_notifications_black_24dp.png │ │ └── ic_sync_black_24dp.png │ │ ├── drawable-mdpi │ │ ├── ic_info_black_24dp.png │ │ ├── ic_notifications_black_24dp.png │ │ └── ic_sync_black_24dp.png │ │ ├── drawable-v21 │ │ ├── ic_info_black_24dp.xml │ │ ├── ic_notifications_black_24dp.xml │ │ └── ic_sync_black_24dp.xml │ │ ├── drawable-xhdpi │ │ ├── ic_info_black_24dp.png │ │ ├── ic_notifications_black_24dp.png │ │ └── ic_sync_black_24dp.png │ │ ├── drawable-xxhdpi │ │ ├── ic_info_black_24dp.png │ │ ├── ic_notifications_black_24dp.png │ │ └── ic_sync_black_24dp.png │ │ ├── drawable-xxxhdpi │ │ ├── ic_info_black_24dp.png │ │ ├── ic_notifications_black_24dp.png │ │ └── ic_sync_black_24dp.png │ │ ├── drawable │ │ ├── earthviewicon.png │ │ └── rounded_shape.xml │ │ ├── layout │ │ ├── activity_about.xml │ │ ├── activity_demo.xml │ │ ├── activity_demo_pre.xml │ │ ├── activity_favorites.xml │ │ ├── activity_favorites_activity_pre.xml │ │ ├── activity_muzei_settings.xml │ │ ├── activity_preferences.xml │ │ ├── activity_settings_activity_pre.xml │ │ ├── activity_wallpaper.xml │ │ ├── activity_wallpaper_activity_pre.xml │ │ ├── content_about.xml │ │ ├── content_demo.xml │ │ ├── content_demo_pre.xml │ │ ├── content_wallpaper.xml │ │ ├── drawer_header.xml │ │ ├── earthview_item.xml │ │ └── muzei_dialog_layout.xml │ │ ├── menu │ │ └── wall_prev_menu.xml │ │ ├── mipmap-hdpi │ │ ├── earthviewicon.png │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ ├── earthviewicon.png │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ ├── earthviewicon.png │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ ├── earthviewicon.png │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ ├── earthviewicon.png │ │ └── ic_launcher.png │ │ ├── transition │ │ ├── change_image_transform.xml │ │ └── fade_activity.xml │ │ ├── values-v21 │ │ └── styles.xml │ │ ├── values-w820dp │ │ └── dimens.xml │ │ ├── values │ │ ├── about.xml │ │ ├── arrays.xml │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── other_lib_strings.xml │ │ ├── strings.xml │ │ └── styles.xml │ │ └── xml │ │ ├── preferences.xml │ │ └── providers.xml │ └── test │ └── java │ └── com │ └── pddstudio │ └── wallpaperrecyclerdemo │ └── ExampleUnitTest.java ├── settings.gradle └── wheelview-test ├── build.gradle └── library-release.aar /.gitignore: -------------------------------------------------------------------------------- 1 | /ps-non-git 2 | *.iml 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | .navigation 9 | /build 10 | /captures 11 | /ps-app/*.apk 12 | /ps-app/build 13 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | EarthViewDemo -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/apache2_0_license.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/dictionaries/pddstudio.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 24 | 25 | 37 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 64 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: android 2 | android: 3 | components: 4 | - tools 5 | - platform-tools 6 | - build-tools-23.0.2 7 | - android-23 8 | - extra-android-support 9 | - extra-android-m2repository 10 | - extra-google-m2repository 11 | 12 | # Additional components 13 | #- extra-google-google_play_services 14 | #- addon-google_apis-google-19 15 | 16 | # Specify at least one system image, if you need to run emulator(s) during your tests 17 | #- sys-img-armeabi-v7a-android-19 18 | #- sys-img-x86-android-17 19 | script: 20 | - ./gradlew build 21 | licenses: 22 | - '.+' 23 | -------------------------------------------------------------------------------- /app-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PDDStudio/earthview-android/03c9a2458c070875c8541c229161f4b4b594f39e/app-debug.apk -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 - Patrick J - app 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | apply plugin: 'com.android.application' 18 | 19 | android { 20 | compileSdkVersion 23 21 | buildToolsVersion "23.0.2" 22 | 23 | defaultConfig { 24 | applicationId "com.pddstudio.earthviewdemo.simple" 25 | minSdkVersion 17 26 | targetSdkVersion 23 27 | versionCode 1 28 | versionName "1.0" 29 | } 30 | buildTypes { 31 | release { 32 | minifyEnabled false 33 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 34 | } 35 | } 36 | lintOptions { 37 | abortOnError false 38 | } 39 | } 40 | 41 | dependencies { 42 | compile fileTree(include: ['*.jar'], dir: 'libs') 43 | testCompile 'junit:junit:4.12' 44 | compile 'com.android.support:appcompat-v7:23.1.1' 45 | compile 'com.android.support:design:23.1.1' 46 | compile project(':earthview-android') 47 | //for showcasing the usage with picasso 48 | compile 'com.squareup.picasso:picasso:2.5.2' 49 | } 50 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/pddstudio/Android/Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/pddstudio/earthviewdemo/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.pddstudio.earthviewdemo; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 20 | 21 | 22 | 23 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/pddstudio/earthviewdemo/EarthViewAdapter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 - Patrick J - app 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.pddstudio.earthviewdemo; 18 | 19 | import android.content.Context; 20 | import android.support.annotation.Nullable; 21 | import android.support.v7.widget.RecyclerView; 22 | import android.util.Log; 23 | import android.view.LayoutInflater; 24 | import android.view.View; 25 | import android.view.ViewGroup; 26 | import android.widget.ImageView; 27 | import android.widget.TextView; 28 | 29 | import com.pddstudio.earthview.EarthWallpaper; 30 | import com.squareup.picasso.Picasso; 31 | 32 | import java.util.ArrayList; 33 | import java.util.Collection; 34 | import java.util.List; 35 | 36 | /** 37 | * This Class was created by Patrick J 38 | * on 10.12.15. For more Details and Licensing 39 | * have a look at the README.md 40 | */ 41 | public class EarthViewAdapter extends RecyclerView.Adapter { 42 | 43 | private List itemData; 44 | private final Context context; 45 | OnItemClickListener onItemClickListener = null; 46 | 47 | public interface OnItemClickListener { 48 | void onItemClick(View view, int position); 49 | } 50 | 51 | public EarthViewAdapter(@Nullable Collection data, Context context) { 52 | if(data == null) { 53 | this.itemData = new ArrayList<>(); 54 | } else { 55 | Log.d("EarthViewAdapter", "Adapter initialized with data count: " + data.size()); 56 | this.itemData = new ArrayList<>(data); 57 | } 58 | this.context = context; 59 | } 60 | 61 | @Override 62 | public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { 63 | View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.earth_view_item, parent, false); 64 | ViewHolder viewHolder = new ViewHolder(view, onItemClickListener); 65 | return viewHolder; 66 | } 67 | 68 | @Override 69 | public void onBindViewHolder(ViewHolder holder, int position) { 70 | EarthWallpaper earthWallpaper = itemData.get(position); 71 | holder.textView.setText(earthWallpaper.getFormattedWallpaperTitle()); 72 | 73 | Picasso.with(context).load(earthWallpaper.getWallThumbUrl()).into(holder.imageView); 74 | } 75 | 76 | public void addItem(EarthWallpaper wallpaper) { 77 | if(itemData != null) this.itemData.add(wallpaper); 78 | } 79 | 80 | public void setOnItemClickListener(OnItemClickListener onItemClickListener) { 81 | this.onItemClickListener = onItemClickListener; 82 | } 83 | 84 | public boolean hasOnItemClickListener() { 85 | return this.onItemClickListener != null; 86 | } 87 | 88 | public EarthWallpaper getItemAtPosition(int position) { 89 | if(position < 0 || position >= itemData.size()) { 90 | return null; 91 | } else { 92 | return itemData.get(position); 93 | } 94 | } 95 | 96 | @Override 97 | public int getItemCount() { 98 | return itemData.size(); 99 | } 100 | 101 | public static class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener { 102 | 103 | public ImageView imageView; 104 | public TextView textView; 105 | public OnItemClickListener onItemClickListener; 106 | 107 | public ViewHolder(View itemView, OnItemClickListener onItemClickListener) { 108 | super(itemView); 109 | itemView.setClickable(true); 110 | itemView.setOnClickListener(this); 111 | imageView = (ImageView) itemView.findViewById(R.id.wall); 112 | textView = (TextView) itemView.findViewById(R.id.name); 113 | this.onItemClickListener = onItemClickListener; 114 | } 115 | 116 | @Override 117 | public void onClick(View v) { 118 | if(onItemClickListener != null) onItemClickListener.onItemClick(v, getAdapterPosition()); 119 | } 120 | } 121 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 26 | 27 | 31 | 32 | 38 | 39 | 40 | 41 | 42 | 43 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 30 | 31 |