Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

Commit

Permalink
3.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
WangDaYeeeeee committed Dec 8, 2018
1 parent 73d3ad3 commit 1534016
Show file tree
Hide file tree
Showing 60 changed files with 540 additions and 892 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.wangdaye.mysplash"
minSdkVersion 19
targetSdkVersion 28
versionCode 343
versionName "3.4.3"
versionCode 344
versionName "3.4.4"
}
sourceSets {
main {
Expand Down
2 changes: 1 addition & 1 deletion app/release/output.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":343,"versionName":"3.4.3","enabled":true,"outputFile":"Mysplash 3.4.3.apk","fullName":"release","baseName":"release"},"path":"Mysplash 3.4.3.apk","properties":{}}]
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":344,"versionName":"3.4.4","enabled":true,"outputFile":"Mysplash 3.4.4.apk","fullName":"release","baseName":"release"},"path":"Mysplash 3.4.4.apk","properties":{}}]
6 changes: 6 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
android:screenOrientation="user"
android:label="@string/app_name" />

<activity
android:name=".photo3.view.activity.PhotoActivity3"
android:theme="@style/MysplashTheme.Translucent.TranslucentNavigation.Photo2"
android:screenOrientation="user"
android:label="@string/app_name" />

<activity
android:name=".common.ui.activity.PreviewActivity"
android:theme="@style/MysplashTheme.Translucent.TranslucentNavigation"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/wangdaye/mysplash/Mysplash.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import com.wangdaye.mysplash.common.utils.manager.SettingsOptionManager;
import com.wangdaye.mysplash.common.utils.manager.ThemeManager;
import com.wangdaye.mysplash.main.view.activity.MainActivity;
import com.wangdaye.mysplash.photo2.view.activity.PhotoActivity2;
import com.wangdaye.mysplash.photo3.view.activity.PhotoActivity3;

import java.lang.reflect.ParameterizedType;
import java.util.ArrayList;
Expand Down Expand Up @@ -237,7 +237,7 @@ public void setPhoto(Photo photo) {
this.photo = photo;
}

public List<Photo> loadMorePhotos(PhotoActivity2 activity,
public List<Photo> loadMorePhotos(PhotoActivity3 activity,
List<Photo> list, int headIndex, boolean headDirection,
Bundle bundle) {
int index = activityList.indexOf(activity) - 1;
Expand All @@ -259,7 +259,7 @@ public List<Photo> loadMorePhotos(PhotoActivity2 activity,
return new ArrayList<>();
}

public void dispatchPhotoUpdate(PhotoActivity2 activity, Photo p) {
public void dispatchPhotoUpdate(PhotoActivity3 activity, Photo p) {
int index = activityList.indexOf(activity) - 1;
if (index > -1) {
Activity a = activityList.get(index);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.wangdaye.mysplash.common.data.entity.unsplash.Photo;
import com.wangdaye.mysplash.common.data.service.network.PhotoService;
import com.wangdaye.mysplash.common.ui.adapter.PhotoInfoAdapter2;
import com.wangdaye.mysplash.common.ui.adapter.PhotoInfoAdapter3;

/**
* Photo info model.
Expand All @@ -11,10 +11,10 @@
*
* */

public interface PhotoInfoModel2 {
public interface PhotoInfoModel3 {

PhotoService getPhotoService();
PhotoInfoAdapter2 getAdapter();
PhotoInfoAdapter3 getAdapter();

Photo getPhoto();
void setPhoto(Photo p, boolean init);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import android.support.annotation.Nullable;

import com.wangdaye.mysplash.common.data.entity.unsplash.Photo;
import com.wangdaye.mysplash.common.ui.adapter.PhotoInfoAdapter2;
import com.wangdaye.mysplash.common.ui.adapter.PhotoInfoAdapter3;

/**
* Photo info presenter.
Expand All @@ -13,7 +13,7 @@
*
* */

public interface PhotoInfoPresenter2 {
public interface PhotoInfoPresenter3 {

void requestPhoto(Context context);
void setLikeForAPhoto(Context context);
Expand All @@ -25,7 +25,7 @@ public interface PhotoInfoPresenter2 {
Photo getPhoto();
void setPhoto(Photo photo, boolean init);

PhotoInfoAdapter2 getAdapter();
PhotoInfoAdapter3 getAdapter();

boolean isFailed();
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import com.wangdaye.mysplash.common.data.service.network.CollectionService;
import com.wangdaye.mysplash.common.data.service.network.PhotoService;
import com.wangdaye.mysplash.common.utils.manager.MuzeiOptionManager;
import com.wangdaye.mysplash.photo2.view.activity.PhotoActivity2;
import com.wangdaye.mysplash.photo3.view.activity.PhotoActivity3;

import java.util.ArrayList;
import java.util.List;
Expand All @@ -42,7 +42,7 @@ public MuzeiSourceService() {
}

@Override
protected void onTryUpdate(int reason) throws RetryException {
protected void onTryUpdate(int reason) {
MuzeiOptionManager manager = MuzeiOptionManager.getInstance(this);
if (manager.isUpdateOnlyInWifi() && !isWifi()) {
return;
Expand Down Expand Up @@ -128,8 +128,8 @@ private List<Photo> requestCollectionsPhotos(Collection collection) {

private void exportPhoto(@Nullable Photo photo) {
if (photo != null) {
Intent intent = new Intent(this, PhotoActivity2.class);
intent.putExtra(PhotoActivity2.KEY_PHOTO_ACTIVITY_2_ID, photo.id);
Intent intent = new Intent(this, PhotoActivity3.class);
intent.putExtra(PhotoActivity3.KEY_PHOTO_ACTIVITY_2_ID, photo.id);

publishArtwork(
new Artwork.Builder()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.wangdaye.mysplash.common.ui.adapter;

import android.os.Build;
import android.support.annotation.NonNull;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
Expand Down Expand Up @@ -32,27 +33,27 @@
*
* */

public class MoreHorizontalAdapter2 extends RecyclerView.Adapter<MoreHorizontalAdapter2.ViewHolder> {
public class MoreHorizontalAdapter3 extends RecyclerView.Adapter<MoreHorizontalAdapter3.ViewHolder> {

private MysplashActivity a;
private List<Collection> itemList;

class ViewHolder extends RecyclerView.ViewHolder
implements ImageHelper.OnLoadImageListener<Photo> {

@BindView(R.id.item_photo_2_more_page_horizontal)
@BindView(R.id.item_photo_3_more_page_horizontal)
CardView card;

@BindView(R.id.item_photo_2_more_page_horizontal_cover)
@BindView(R.id.item_photo_3_more_page_horizontal_cover)
FreedomImageView image;

@BindView(R.id.item_photo_2_more_page_horizontal_title)
@BindView(R.id.item_photo_3_more_page_horizontal_title)
TextView title;

@BindView(R.id.item_photo_2_more_page_horizontal_subtitle)
@BindView(R.id.item_photo_3_more_page_horizontal_subtitle)
TextView subtitle;

@BindView(R.id.item_photo_2_more_page_horizontal_avatar)
@BindView(R.id.item_photo_3_more_page_horizontal_avatar)
CircleImageView avatar;

private Collection collection;
Expand Down Expand Up @@ -94,15 +95,15 @@ public void onRecycled() {

// interface.

@OnClick(R.id.item_photo_2_more_page_horizontal) void clickItem() {
@OnClick(R.id.item_photo_3_more_page_horizontal) void clickItem() {
IntentHelper.startCollectionActivity(
a,
avatar,
card,
collection);
}

@OnClick(R.id.item_photo_2_more_page_horizontal_avatar) void checkAuthor() {
@OnClick(R.id.item_photo_3_more_page_horizontal_avatar) void checkAuthor() {
IntentHelper.startUserActivity(
a,
avatar,
Expand Down Expand Up @@ -134,20 +135,21 @@ public void onLoadImageFailed(Photo originalT, int index) {
}
}

public MoreHorizontalAdapter2(MysplashActivity a, List<Collection> list) {
public MoreHorizontalAdapter3(MysplashActivity a, List<Collection> list) {
this.a = a;
this.itemList = list;
}

@NonNull
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int position) {
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int position) {
View v = LayoutInflater.from(parent.getContext())
.inflate(R.layout.item_photo_2_more_page_horizontal, parent, false);
.inflate(R.layout.item_photo_3_more_page_horizontal, parent, false);
return new ViewHolder(v);
}

@Override
public void onBindViewHolder(ViewHolder holder, int position) {
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
holder.onBindView(itemList.get(position));
}

Expand All @@ -157,7 +159,7 @@ public int getItemCount() {
}

@Override
public void onViewRecycled(ViewHolder holder) {
public void onViewRecycled(@NonNull ViewHolder holder) {
super.onViewRecycled(holder);
holder.onRecycled();
}
Expand Down
Loading

0 comments on commit 1534016

Please sign in to comment.