version:1.0.9
bugfixes: update:显示加密目录,优化静默更新
This commit is contained in:
@@ -18,8 +18,8 @@ android {
|
||||
//There are no CERT files because If the mini sdk version is 23+, the AGP will ignore the V1 scheme signature.
|
||||
minSdkVersion 23
|
||||
targetSdkVersion 29
|
||||
versionCode 8
|
||||
versionName "1.0.7"
|
||||
versionCode 10
|
||||
versionName "1.0.9"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
|
||||
@@ -54,6 +54,12 @@ public class CategoryAdapter extends RecyclerView.Adapter<CategoryAdapter.Holder
|
||||
holder.tv_app_name.setText(name);
|
||||
}
|
||||
|
||||
if (categoryInfo.getIs_free() == 0) {
|
||||
holder.iv_lock_icon.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
holder.iv_lock_icon.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
String uuid = categoryInfo.getUuid();
|
||||
String icon = categoryInfo.getIcon();
|
||||
GlideLoadUtils.getInstance().glideLoad(mContext, icon, holder.iv_icon, R.drawable.icon_category);
|
||||
@@ -85,7 +91,7 @@ public class CategoryAdapter extends RecyclerView.Adapter<CategoryAdapter.Holder
|
||||
|
||||
ConstraintLayout root;
|
||||
TextView tv_app_name;
|
||||
ImageView iv_icon;
|
||||
ImageView iv_icon, iv_lock_icon;
|
||||
|
||||
public Holder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
@@ -93,6 +99,7 @@ public class CategoryAdapter extends RecyclerView.Adapter<CategoryAdapter.Holder
|
||||
root = itemView.findViewById(R.id.root);
|
||||
tv_app_name = itemView.findViewById(R.id.tv_app_name);
|
||||
iv_icon = itemView.findViewById(R.id.iv_icon);
|
||||
iv_lock_icon = itemView.findViewById(R.id.iv_lock_icon);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ public class CategoryVideoAdapter extends RecyclerView.Adapter<CategoryVideoAdap
|
||||
String cover = categoryVideoInfo.getCover();
|
||||
GlideLoadUtils.getInstance().glideLoad(mContext, cover, holder.video_image);
|
||||
|
||||
holder.duration.setText(TimeUtils.TimeFormat(categoryVideoInfo.getDuration() * 1000));
|
||||
holder.duration.setText("视频时长: " + TimeUtils.TimeFormat(categoryVideoInfo.getDuration() * 1000));
|
||||
|
||||
holder.tv_download.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
|
||||
@@ -59,6 +59,12 @@ public class HomeCategoryAdapter extends RecyclerView.Adapter<HomeCategoryAdapte
|
||||
holder.tv_app_name.setText(name);
|
||||
}
|
||||
|
||||
if (categoryInfo.getIs_free() == 0) {
|
||||
holder.iv_lock_icon.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
holder.iv_lock_icon.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
String uuid = categoryInfo.getUuid();
|
||||
String icon = categoryInfo.getIcon();
|
||||
|
||||
@@ -120,7 +126,7 @@ public class HomeCategoryAdapter extends RecyclerView.Adapter<HomeCategoryAdapte
|
||||
|
||||
ConstraintLayout root;
|
||||
TextView tv_app_name;
|
||||
ImageView iv_icon;
|
||||
ImageView iv_icon, iv_lock_icon;
|
||||
|
||||
public Holder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
@@ -128,6 +134,7 @@ public class HomeCategoryAdapter extends RecyclerView.Adapter<HomeCategoryAdapte
|
||||
root = itemView.findViewById(R.id.root);
|
||||
tv_app_name = itemView.findViewById(R.id.tv_app_name);
|
||||
iv_icon = itemView.findViewById(R.id.iv_icon);
|
||||
iv_lock_icon = itemView.findViewById(R.id.iv_lock_icon);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,13 @@ public class CategoryInfo implements Serializable {
|
||||
this.uuid = uuid;
|
||||
}
|
||||
|
||||
public CategoryInfo(String category_name, String uuid, int is_free) {
|
||||
this.category_name = category_name;
|
||||
this.uuid = uuid;
|
||||
this.is_free = is_free;
|
||||
}
|
||||
|
||||
|
||||
public CategoryInfo(String category_name, String uuid, int is_free, String folder) {
|
||||
this.category_name = category_name;
|
||||
this.uuid = uuid;
|
||||
|
||||
@@ -58,8 +58,8 @@ public class CategoryFragment extends BaseMvvmFragment<CategoryViewModel, Fragme
|
||||
mViewModel.mCategoryInfoListData.observe(this, new Observer<List<CategoryInfo>>() {
|
||||
@Override
|
||||
public void onChanged(List<CategoryInfo> categoryInfos) {
|
||||
categoryInfos.add(new CategoryInfo("下载视频", HomeCategoryAdapter.DOWNLOAD_CENTER));
|
||||
categoryInfos.add(new CategoryInfo("用户中心", HomeCategoryAdapter.USER_CENTER));
|
||||
categoryInfos.add(new CategoryInfo("下载视频", HomeCategoryAdapter.DOWNLOAD_CENTER, 1));
|
||||
categoryInfos.add(new CategoryInfo("用户中心", HomeCategoryAdapter.USER_CENTER, 1));
|
||||
mCategoryAdapter.setCategoryInfos(categoryInfos);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -173,6 +173,10 @@ public class FileUtils {
|
||||
}
|
||||
|
||||
public static void ariaDownload(Context context, String url, AriaDownloadInfo ariaDownloadInfo) {
|
||||
File downloadFile = new File(getDownLoadPath(context));
|
||||
if (!downloadFile.exists()) {
|
||||
downloadFile.mkdirs();
|
||||
}
|
||||
Log.e(TAG, "ariaDownload: " + ariaDownloadInfo);
|
||||
String fileName = getFileNamefromURL(url);
|
||||
String app_md5 = ariaDownloadInfo.getAppMd5();
|
||||
|
||||
12
app/src/main/res/drawable/img_lock.xml
Normal file
12
app/src/main/res/drawable/img_lock.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="50dp"
|
||||
android:height="50dp"
|
||||
android:viewportWidth="1024"
|
||||
android:viewportHeight="1024">
|
||||
<path
|
||||
android:pathData="M512,595.9c-21.9,0 -39.7,17.8 -39.7,39.7v111.9c0,21.9 17.8,39.7 39.7,39.7s39.7,-17.8 39.7,-39.7V635.6c0,-21.9 -17.8,-39.7 -39.7,-39.7z"
|
||||
android:fillColor="#ffffff" />
|
||||
<path
|
||||
android:pathData="M750.1,377V238.1C750.1,106.8 643.3,0 512,0S273.9,106.8 273.9,238.1V377c-88.6,36.1 -151.3,123.2 -151.3,224.7v179.8c0,133.7 108.8,242.5 242.5,242.5h293.7c133.7,0 242.5,-108.8 242.5,-242.5V601.7c0.1,-101.5 -62.6,-188.6 -151.2,-224.7zM353.3,238.1c0,-87.5 71.2,-158.7 158.7,-158.7s158.7,71.2 158.7,158.7v121.4c-3.9,-0.2 -7.9,-0.3 -11.8,-0.3H365.1c-4,0 -7.9,0.1 -11.9,0.3V238.1zM822,781.5c0,90 -73.2,163.2 -163.2,163.2H365.1c-90,0 -163.2,-73.2 -163.2,-163.2V601.7c0,-90 73.2,-163.2 163.2,-163.2h293.7c90,0 163.2,73.2 163.2,163.2v179.8z"
|
||||
android:fillColor="#ffffff" />
|
||||
</vector>
|
||||
@@ -29,18 +29,47 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/icon_category" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_app_name"
|
||||
android:layout_width="wrap_content"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="4dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="8sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_icon"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_icon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_lock_icon"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/img_lock"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_app_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="4dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:singleLine="true"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="8sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_lock_icon"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -40,11 +40,12 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginVertical="8dp"
|
||||
android:maxLines="3"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="15sp"
|
||||
@@ -53,25 +54,35 @@
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/video_image"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_bias="0.15"
|
||||
tools:text="标题" />
|
||||
app:layout_constraintVertical_bias="0.15">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/duration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="00:00"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/video_image"
|
||||
app:layout_constraintEnd_toEndOf="@+id/video_image" />
|
||||
<TextView
|
||||
android:id="@+id/title_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLines="3"
|
||||
android:textColor="@color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
tools:text="标题" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/duration"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:text="00:00"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/video_image"
|
||||
app:layout_constraintEnd_toEndOf="@+id/video_image" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user