编译错误修改。
登录成功先清除sp缓存,防止数据错乱 处理人脸识别错误
This commit is contained in:
@@ -25,11 +25,12 @@ android {
|
||||
enabled = true
|
||||
}
|
||||
|
||||
compileSdkVersion 31
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion '29.0.2'
|
||||
aaptOptions.cruncherEnabled = false
|
||||
aaptOptions.useNewCruncher = false
|
||||
defaultConfig {
|
||||
|
||||
// multiDexEnabled true
|
||||
javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }
|
||||
// multiDexEnabled true
|
||||
@@ -51,6 +52,7 @@ android {
|
||||
JPUSH_APPKEY : "4b6e03f9cc9466efbc0b2528", //JPush 上注册的包名对应的 Appkey.
|
||||
JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
|
||||
]
|
||||
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
@@ -75,14 +77,13 @@ android {
|
||||
jniLibs.srcDirs = ['libs']
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.android.support:multidex:1.0.1'
|
||||
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||
exclude group: 'com.android.support', module: 'support-annotations'
|
||||
})
|
||||
testImplementation 'junit:junit:4.12'
|
||||
implementation 'com.zhy:percent-support-extends:1.0.1'
|
||||
implementation 'com.arialyy.aria:Aria:3.1.1'
|
||||
implementation 'com.jcodecraeer:xrecyclerview:1.3.2'
|
||||
@@ -110,6 +111,7 @@ android {
|
||||
implementation 'com.nineoldandroids:library:2.4.0'
|
||||
|
||||
implementation 'fm.jiecao:jiecaovideoplayer:4.6.3'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
//noinspection GradleCompatible
|
||||
implementation 'com.android.support:appcompat-v7:28.0.0'
|
||||
implementation 'com.nhaarman.listviewanimations:lib-core:3.1.0@aar'
|
||||
@@ -159,9 +161,13 @@ android {
|
||||
api 'io.reactivex.rxjava2:rxjava:2.1.5'
|
||||
implementation 'me.jessyan:autosize:1.1.2'
|
||||
|
||||
implementation 'androidx.camera:camera-view:1.0.0-alpha30'
|
||||
// implementation 'androidx.camera:camera-view:1.0.0-alpha30'
|
||||
// implementation 'io.github.lucksiege:pictureselector:v2.7.3-rc05'//视频图片选择器
|
||||
implementation 'io.github.lucksiege:pictureselector:v2.7.3-rc10'
|
||||
implementation 'io.github.lucksiege:pictureselector:v2.7.3-rc05'
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
|
||||
<application
|
||||
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:name="com.sl.house_property.MyApplication"
|
||||
android:allowBackup="true"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
@@ -129,6 +129,7 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.sl.house_property.AliPayTestActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
>
|
||||
<!--<intent-filter>-->
|
||||
@@ -139,47 +140,57 @@
|
||||
<activity
|
||||
android:name="com.sl.house_property.MakeErrorActivity"
|
||||
android:theme="@style/myErrorDialogTheme"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity
|
||||
android:name="com.sl.house_property.WebActivitytwo"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
android:theme="@style/TAppTheme"
|
||||
/>
|
||||
<activity
|
||||
android:name="com.sl.house_property.MainTabActivity"
|
||||
android:launchMode="standard"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/TAppTheme" />
|
||||
<activity
|
||||
android:name="com.sl.house_property.LogoActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
|
||||
<activity
|
||||
android:name="utils.SelectPicDanimicActivity"
|
||||
android:theme="@style/myDialogThememakephoto"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
android:windowBackground="@color/transparent" />
|
||||
<activity
|
||||
android:name="com.sl.house_property.NewsDetailActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
android:theme="@style/MyThemeactonbar" />
|
||||
<activity
|
||||
android:name="com.sl.house_property.RegisterAgreementActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
android:theme="@style/MyThemeactonbar" />
|
||||
<activity
|
||||
android:name="com.sl.house_property.ScrollingActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
android:label="@string/title_activity_scrolling"
|
||||
android:theme="@style/AppTheme.NoActionBar" />
|
||||
<activity
|
||||
android:name="com.sl.house_property.user.MyUserMessage"
|
||||
android:theme="@style/MyThemeactonbar"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity
|
||||
android:name="com.sl.house_property.user.MyWalletActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
|
||||
<activity android:name="com.sl.house_property.user.MyMarketShopActivity" />
|
||||
@@ -187,221 +198,286 @@
|
||||
<activity
|
||||
android:name="com.sl.house_property.user.MyBillHistory"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity
|
||||
android:name="com.sl.house_property.f3.MyFeeBillHistory"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity android:name="com.sl.house_property.user.MyServiceHistory"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.user.MyGuaranteeHistory"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity android:name="com.sl.house_property.user.MyAuthorizedFamilyHistory"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.user.MyAuthorizedFamilyHistoryt" />
|
||||
<activity android:name="com.sl.house_property.user.MyAuthorizedFamilyHistoryt"
|
||||
android:exported="false"/>
|
||||
<activity android:name="com.sl.house_property.user.MyPropertyActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.user.MyKeyManagement"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.user.MyChargeActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.user.MyPayActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity
|
||||
android:name="com.sl.house_property.user.MyshopEditAcitivity"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity
|
||||
android:name="com.sl.house_property.user.MyshopModifyAcitivity"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.user.MyBillDetailActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity
|
||||
android:name="com.sl.house_property.f3.HousekeepingActivity"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity
|
||||
android:name="com.sl.house_property.CommodityActivity"
|
||||
android:exported="false"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.QRcodeActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.EntranceguardActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.CarGarageActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.EntranceguardControl1Activity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.EntranceguardControl2Activity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.NewsActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.NewlistActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.f2.FeeActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity
|
||||
android:name="com.sl.house_property.f2.ElectricChargeActivity"
|
||||
android:exported="false"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.f2.PropertyFeeActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.f2.ParkingFeeActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.f2.GasFeeActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
|
||||
<activity
|
||||
android:name="com.sl.house_property.f1.AddcararageIttemActivity"
|
||||
android:exported="false"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity
|
||||
android:name="com.sl.house_property.f1.AddAcarActivity"
|
||||
android:windowSoftInputMode="adjustPan"
|
||||
android:exported="false"
|
||||
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.f1.CarragelistActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.f1.UserdlistActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity
|
||||
android:name="com.sl.house_property.user.MyServiceDetailActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
android:label="@string/title_activity_my_service_detail" />
|
||||
<activity
|
||||
android:name="com.sl.house_property.user.AddAnewGranteeActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity android:name="com.sl.house_property.user.AddAnewFamilyNumberPermissionActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.SettingActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.AboutusActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity
|
||||
android:name="com.sl.house_property.AdeviseActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity android:name="com.sl.house_property.LoginActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.RegisterActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity
|
||||
android:name="com.sl.house_property.ForgetPwdActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity
|
||||
android:name="com.sl.house_property.ModifyPswdActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
<activity android:name="com.sl.house_property.f1.MyCaragradetailActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.user.MyGranteeDetailActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name="com.sl.house_property.f1.MyCarUsedHistoryDetailActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
|
||||
|
||||
<activity
|
||||
android:name="imageselector.ImageSelectorActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
|
||||
<activity
|
||||
android:name="imageselector.PreviewActivity"
|
||||
android:exported="false"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
|
||||
<activity
|
||||
android:name="imageselector.ClipImageActivity"
|
||||
android:exported="false"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar" />
|
||||
<activity
|
||||
android:name="imageselector.FullScreenPreviewActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/PictureTheme.Main"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
<activity
|
||||
android:name="imageselector.FullScreenOnlinePreviewActivity"
|
||||
android:theme="@style/PictureTheme.Main"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
/>
|
||||
|
||||
<activity
|
||||
android:name="com.alipay.sdk.app.H5PayActivity"
|
||||
android:configChanges="orientation|keyboardHidden|navigation"
|
||||
android:exported="false"
|
||||
android:configChanges="orientation|keyboardHidden|navigation"
|
||||
|
||||
android:screenOrientation="behind"></activity>
|
||||
<activity
|
||||
android:name="com.alipay.sdk.auth.AuthActivity"
|
||||
|
||||
android:configChanges="orientation|keyboardHidden|navigation"
|
||||
android:exported="false"
|
||||
android:screenOrientation="behind"></activity>
|
||||
<activity android:name=".discovery.ImageViewerAndDeleteActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name=".discovery.AddDiscoveryActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
<activity android:name=".cart.AddressListActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity android:name=".cart.AddAddressActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity android:name=".order.OrderActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity android:name=".order.OrderDetailActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity android:name=".order.SettleActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity android:name=".order.PayActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity android:name=".discovery.HistoryRecordActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity android:name=".discovery.HistoryRecordActivitytwo"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity android:name=".discovery.ShareCodeActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name=".discovery.PropertyActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/TAppTheme" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".CodeActivity" android:screenOrientation="portrait"/>
|
||||
<activity android:name=".CodeActivity" android:screenOrientation="portrait"
|
||||
android:exported="false"
|
||||
/>
|
||||
|
||||
<activity
|
||||
android:name=".wxapi.WXPayEntryActivity"
|
||||
@@ -412,7 +488,7 @@
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/wxPayTheme"
|
||||
android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />
|
||||
<activity android:name=".discovery.LikeActivity" />
|
||||
<activity android:name=".discovery.LikeActivity" android:exported="false"/>
|
||||
<!-- 如果您项目中的所有页面都只需要以高或宽中的一个作为基准进行适配的话, 那就只需要填写高或宽中的一个设计图尺寸即可 -->
|
||||
<meta-data
|
||||
android:name="design_width_in_dp"
|
||||
|
||||
@@ -8,6 +8,6 @@ public class DoConfig {
|
||||
*/
|
||||
public static String FANGCHAN_DATA = "0";//0代表没有数据 1代表有数据
|
||||
|
||||
public static String MY_HOUST_ADDRESS = "";
|
||||
public static String MY_HOUST_ADDRESS = "house";
|
||||
// public static String MY_HOUST_WYID = "";
|
||||
}
|
||||
|
||||
@@ -212,6 +212,7 @@ public class LoginActivity extends BaseActivity<ActivityLoginBinding> implements
|
||||
}
|
||||
if (resultcode.status == 0) {
|
||||
if (requstecode == 0) {
|
||||
SPUtils.cleanAllSP(LoginActivity.this);
|
||||
Gson gs = new Gson();
|
||||
ArrayList<LinkedTreeMap> adta = (ArrayList<LinkedTreeMap>) resultcode.data;
|
||||
String s = gs.toJson(adta);
|
||||
|
||||
@@ -4,9 +4,10 @@ import android.app.Activity;
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.os.StrictMode;
|
||||
import androidx.multidex.MultiDex;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.multidex.MultiDex;
|
||||
|
||||
import com.lzy.ninegrid.NineGridView;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.cache.CacheEntity;
|
||||
|
||||
@@ -147,8 +147,11 @@ public class DiscoveryFragment extends BaseFragment<FragmentDiscoveryBinding> im
|
||||
|
||||
}
|
||||
});
|
||||
mDataBinding.v.setOnClickListener(v -> {
|
||||
checkAlbumPermission(191, 1);
|
||||
mDataBinding.v.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
checkAlbumPermission(191, 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -82,14 +82,17 @@ public class ImageViewerAndDeleteActivity extends BaseActivity<ActivityImagePrev
|
||||
MediaController mMediaController = new MediaController(this);
|
||||
mDataBinding. pLVideoView.setMediaController(mMediaController);
|
||||
mDataBinding. pLVideoView.start();
|
||||
mDataBinding.tvDelete.setOnClickListener(v -> {
|
||||
mDataBinding.tvDelete.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
||||
mList.remove(index);
|
||||
Intent intent = new Intent();
|
||||
intent.putStringArrayListExtra("images", mList);
|
||||
setResult(111, intent);
|
||||
finish();
|
||||
ImageViewerAndDeleteActivity.this.setResult(111, intent);
|
||||
ImageViewerAndDeleteActivity.this.finish();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -106,49 +106,51 @@ public class GlideEngine implements ImageEngine {
|
||||
}
|
||||
});
|
||||
}
|
||||
//
|
||||
// /**
|
||||
// * 加载网络图片适配长图方案
|
||||
// * # 注意:此方法只有加载网络图片才会回调
|
||||
// *
|
||||
// * @param context
|
||||
// * @param url
|
||||
// * @param imageView
|
||||
// * @param longImageView
|
||||
// * @ 已废弃
|
||||
// */
|
||||
// @Override
|
||||
// public void loadImage(@NonNull Context context, @NonNull String url,
|
||||
// @NonNull final ImageView imageView,
|
||||
// final SubsamplingScaleImageView longImageView) {
|
||||
// Glide.with(context)
|
||||
// .asBitmap()
|
||||
// .load(url)
|
||||
// .into(new ImageViewTarget<Bitmap>(imageView) {
|
||||
// @Override
|
||||
// protected void setResource(@Nullable Bitmap resource) {
|
||||
// if (resource != null) {
|
||||
// boolean eqLongImage = MediaUtils.isLongImg(resource.getWidth(),
|
||||
// resource.getHeight());
|
||||
// longImageView.setVisibility(eqLongImage ? View.VISIBLE : View.GONE);
|
||||
// imageView.setVisibility(eqLongImage ? View.GONE : View.VISIBLE);
|
||||
// if (eqLongImage) {
|
||||
// // 加载长图
|
||||
// longImageView.setQuickScaleEnabled(true);
|
||||
// longImageView.setZoomEnabled(true);
|
||||
// longImageView.setDoubleTapZoomDuration(100);
|
||||
// longImageView.setMinimumScaleType(SubsamplingScaleImageView.SCALE_TYPE_CENTER_CROP);
|
||||
// longImageView.setDoubleTapZoomDpi(SubsamplingScaleImageView.ZOOM_FOCUS_CENTER);
|
||||
// longImageView.setImage(ImageSource.cachedBitmap(resource),
|
||||
// new ImageViewState(0, new PointF(0, 0), 0));
|
||||
// } else {
|
||||
// // 普通图片
|
||||
// imageView.setImageBitmap(resource);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 加载网络图片适配长图方案
|
||||
* # 注意:此方法只有加载网络图片才会回调
|
||||
*
|
||||
* @param context
|
||||
* @param url
|
||||
* @param imageView
|
||||
* @param longImageView
|
||||
* @ 已废弃
|
||||
*/
|
||||
@Override
|
||||
public void loadImage(@NonNull Context context, @NonNull String url,
|
||||
@NonNull final ImageView imageView,
|
||||
final SubsamplingScaleImageView longImageView) {
|
||||
Glide.with(context)
|
||||
.asBitmap()
|
||||
.load(url)
|
||||
.into(new ImageViewTarget<Bitmap>(imageView) {
|
||||
@Override
|
||||
protected void setResource(@Nullable Bitmap resource) {
|
||||
if (resource != null) {
|
||||
boolean eqLongImage = MediaUtils.isLongImg(resource.getWidth(),
|
||||
resource.getHeight());
|
||||
longImageView.setVisibility(eqLongImage ? View.VISIBLE : View.GONE);
|
||||
imageView.setVisibility(eqLongImage ? View.GONE : View.VISIBLE);
|
||||
if (eqLongImage) {
|
||||
// 加载长图
|
||||
longImageView.setQuickScaleEnabled(true);
|
||||
longImageView.setZoomEnabled(true);
|
||||
longImageView.setDoubleTapZoomDuration(100);
|
||||
longImageView.setMinimumScaleType(SubsamplingScaleImageView.SCALE_TYPE_CENTER_CROP);
|
||||
longImageView.setDoubleTapZoomDpi(SubsamplingScaleImageView.ZOOM_FOCUS_CENTER);
|
||||
longImageView.setImage(ImageSource.cachedBitmap(resource),
|
||||
new ImageViewState(0, new PointF(0, 0), 0));
|
||||
} else {
|
||||
// 普通图片
|
||||
imageView.setImageBitmap(resource);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 加载相册目录
|
||||
|
||||
Reference in New Issue
Block a user