Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
REBOOTERS committed Jul 28, 2018
1 parent 62ee714 commit c42e733
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private void updateApplyButton() {
mOriginalLayout.setVisibility(View.VISIBLE);
updateOriginalState();
} else {
mOriginalLayout.setVisibility(View.INVISIBLE);
mOriginalLayout.setVisibility(View.GONE);
}
}

Expand Down Expand Up @@ -295,6 +295,12 @@ protected void updateSize(Item item) {
} else {
mSize.setVisibility(View.GONE);
}

if (item.isVideo()) {
mOriginalLayout.setVisibility(View.GONE);
} else if (mSpec.originalable) {
mOriginalLayout.setVisibility(View.VISIBLE);
}
}

protected void sendBackResult(boolean apply) {
Expand Down
2 changes: 1 addition & 1 deletion matisse/src/main/res/layout/activity_media_preview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<LinearLayout
android:padding="16dp"
android:id="@+id/originalLayout"
android:visibility="visible"
android:visibility="gone"
android:orientation="horizontal"
android:layout_gravity="center"
android:layout_width="wrap_content"
Expand Down
2 changes: 2 additions & 0 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ ext.supportLibVersion = '27.1.1'

dependencies {
implementation project(':matisse')

// implementation 'com.zhihu.android:matisse:0.5.1-beta1'
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation "com.android.support:appcompat-v7:${supportLibVersion}"
Expand Down
4 changes: 3 additions & 1 deletion sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<activity android:name="com.zhihu.matisse.sample.SampleActivity">
<activity
android:name="com.zhihu.matisse.sample.SampleActivity"
android:configChanges="orientation|screenSize|keyboardHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import com.tbruyelle.rxpermissions2.RxPermissions;
import com.zhihu.matisse.Matisse;
import com.zhihu.matisse.MimeType;
import com.zhihu.matisse.engine.impl.GlideEngine;
import com.zhihu.matisse.engine.impl.PicassoEngine;
import com.zhihu.matisse.filter.Filter;
import com.zhihu.matisse.internal.entity.CaptureStrategy;
Expand Down Expand Up @@ -91,10 +90,8 @@ public void onNext(Boolean aBoolean) {
getResources().getDimensionPixelSize(R.dimen.grid_expected_size))
.restrictOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT)
.thumbnailScale(0.85f)
// for glide-V3
// .imageEngine(new GlideEngine())
// for glide-V4
.imageEngine(new Glide4Engine())
// .imageEngine(new GlideEngine()) // for glide-V3
.imageEngine(new Glide4Engine()) // for glide-V4
.setOnSelectedListener(new OnSelectedListener() {
@Override
public void onSelected(
Expand Down

0 comments on commit c42e733

Please sign in to comment.