Skip to content

Commit

Permalink
增加签名文件
Browse files Browse the repository at this point in the history
  • Loading branch information
xin.li committed Jan 29, 2023
1 parent 4e3c202 commit 78b54a0
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 28 deletions.
31 changes: 27 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ android {
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
}

signingConfigs {
sign {
storeFile file("../hello_android.jks")
storePassword('android')
keyAlias('android')
keyPassword('android')
}
}
buildTypes {
debug {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
Expand All @@ -36,6 +43,7 @@ android {
ndk {
abiFilters 'armeabi-v7a'
}
signingConfig signingConfigs.sign
}
release {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
Expand All @@ -44,6 +52,7 @@ android {
ndk {
abiFilters 'armeabi-v7a'
}
signingConfig signingConfigs.sign
}
}

Expand All @@ -70,7 +79,22 @@ android {
// universalApk true //generate an additional APK that contains all the ABIs
// }
// }

applicationVariants.all { variant ->
def buildType = variant.buildType.name
def prefix = "TVBOX"
if (buildType == "release") {
variant.outputs.each {
def fromFile = it.outputFile
def intoFile = "D:/test/${prefix}/"
copy {
from fromFile
into intoFile
include('*release.apk')
rename('app-', "tvbox_v${android.defaultConfig.versionName}_")
}
}
}
}
}

dependencies {
Expand Down Expand Up @@ -113,8 +137,7 @@ dependencies {
}
implementation 'com.lzy.net:okgo:3.0.4'
implementation 'com.owen:tv-recyclerview:3.0.0'

implementation 'com.github.getActivity:XXPermissions:13.6'
implementation 'com.github.getActivity:XXPermissions:16.2'
implementation 'org.jsoup:jsoup:1.14.1'
implementation 'com.github.hedzr:android-file-chooser:v1.2.0-final'
implementation 'commons-io:commons-io:2.11.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@

import java.io.File;
import java.lang.reflect.Field;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import me.jessyan.autosize.utils.AutoSizeUtils;
Expand Down Expand Up @@ -191,9 +189,7 @@ public void onItemClick(TvRecyclerView parent, View itemView, int position) {
((GridFragment) baseLazyFragment).forceRefresh();
}
}
if (direction != View.FOCUS_DOWN) {
return false;
}
if (direction != View.FOCUS_DOWN) return false;
BaseLazyFragment baseLazyFragment = fragments.get(sortFocused);
if (!(baseLazyFragment instanceof GridFragment)) {
return false;
Expand Down Expand Up @@ -366,8 +362,7 @@ public void cancel() {
});
}
});
if (!dialog.isShowing())
dialog.show();
if (!dialog.isShowing()) dialog.show();
});
}
}, this);
Expand Down Expand Up @@ -468,8 +463,7 @@ public void run() {

@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if (topHide < 0)
return false;
if (topHide < 0) return false;
if (event.getAction() == KeyEvent.ACTION_DOWN) {
if (event.getKeyCode() == KeyEvent.KEYCODE_MENU) showSiteSwitch();
} else if (event.getAction() == KeyEvent.ACTION_UP) {
Expand Down Expand Up @@ -506,13 +500,7 @@ public void onAnimationRepeat(Animator animation) {
});
// Hide Top =======================================================
if (hide && topHide == 0) {
animatorSet.playTogether(ObjectAnimator.ofObject(viewObj, "marginTop", new IntEvaluator(),
AutoSizeUtils.mm2px(this.mContext, 20.0f),
AutoSizeUtils.mm2px(this.mContext, 0.0f)),
ObjectAnimator.ofObject(viewObj, "height", new IntEvaluator(),
AutoSizeUtils.mm2px(this.mContext, 50.0f),
AutoSizeUtils.mm2px(this.mContext, 1.0f)),
ObjectAnimator.ofFloat(this.topLayout, "alpha", 1.0f, 0.0f));
animatorSet.playTogether(ObjectAnimator.ofObject(viewObj, "marginTop", new IntEvaluator(), AutoSizeUtils.mm2px(this.mContext, 20.0f), AutoSizeUtils.mm2px(this.mContext, 0.0f)), ObjectAnimator.ofObject(viewObj, "height", new IntEvaluator(), AutoSizeUtils.mm2px(this.mContext, 50.0f), AutoSizeUtils.mm2px(this.mContext, 1.0f)), ObjectAnimator.ofFloat(this.topLayout, "alpha", 1.0f, 0.0f));
animatorSet.setDuration(250);
animatorSet.start();
tvName.setFocusable(false);
Expand All @@ -523,13 +511,7 @@ public void onAnimationRepeat(Animator animation) {
}
// Show Top =======================================================
if (!hide && topHide == 1) {
animatorSet.playTogether(ObjectAnimator.ofObject(viewObj, "marginTop", new IntEvaluator(),
AutoSizeUtils.mm2px(this.mContext, 0.0f),
AutoSizeUtils.mm2px(this.mContext, 20.0f)),
ObjectAnimator.ofObject(viewObj, "height", new IntEvaluator(),
AutoSizeUtils.mm2px(this.mContext, 1.0f),
AutoSizeUtils.mm2px(this.mContext, 50.0f)),
ObjectAnimator.ofFloat(this.topLayout, "alpha", 0.0f, 1.0f));
animatorSet.playTogether(ObjectAnimator.ofObject(viewObj, "marginTop", new IntEvaluator(), AutoSizeUtils.mm2px(this.mContext, 0.0f), AutoSizeUtils.mm2px(this.mContext, 20.0f)), ObjectAnimator.ofObject(viewObj, "height", new IntEvaluator(), AutoSizeUtils.mm2px(this.mContext, 1.0f), AutoSizeUtils.mm2px(this.mContext, 50.0f)), ObjectAnimator.ofFloat(this.topLayout, "alpha", 0.0f, 1.0f));
animatorSet.setDuration(250);
animatorSet.start();
tvName.setFocusable(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
Expand Down
Binary file added hello_android.jks
Binary file not shown.

0 comments on commit 78b54a0

Please sign in to comment.