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

Commit

Permalink
2021-01-06 Version 1.0.4: Updated links (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
fartem authored Jan 6, 2021
1 parent 7cbb68d commit e14aa0f
Show file tree
Hide file tree
Showing 88 changed files with 335 additions and 244 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ This file contains all release notes from current project.

Based on [keep a changelog](https://keepachangelog.com/en/1.0.0).

## [1.0.1](https://github.com/fartem/hash-checker-lite/releases/tag/1.0.1) - 2020-08-31
## [1.0.1](https://github.com/hash-checker/hash-checker-lite/releases/tag/1.0.1) - 2020-08-31

### Closed issues

- #3 (Remove "requestLegacyExternalStorage" parameter from AndroidManifest.xml).

## [1.0.1](https://github.com/fartem/hash-checker-lite/releases/tag/1.0.1) - 2020-08-31
## [1.0.1](https://github.com/hash-checker/hash-checker-lite/releases/tag/1.0.1) - 2020-08-31

### Closed issues

- #1 (Replace old email link by actual);
- #2 (Replace all GitHub Hash Checker links by Hash Checker Lite links).

## [1.0.0](https://github.com/fartem/hash-checker-lite/releases/tag/1.0.0) - 2020-08-23
## [1.0.0](https://github.com/hash-checker/hash-checker-lite/releases/tag/1.0.0) - 2020-08-23

- First release.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Hash Checker Lite

<a href="https://github.com/fartem/hash-checker-lite/releases">
<a href="https://github.com/hash-checker/hash-checker-lite/releases">
<img src="media/banners/bn_github.png" height="75px" />
</a>
<a href="https://play.google.com/store/apps/details?id=com.smlnskgmail.jaman.hashcheckerlite">
Expand All @@ -15,18 +15,18 @@
<img src="media/banners/bn_android_file_host.png" height="75px" />
</a>

[![GitHubActions](https://github.com/fartem/hash-checker-lite/workflows/Build/badge.svg)](https://github.com/fartem/hash-checker-lite/actions?query=workflow%3ABuild)
[![Codebeat](https://codebeat.co/badges/82ba496d-c878-46c3-a013-8274e4836fad)](https://codebeat.co/projects/github-com-fartem-hash-checker-lite-master)
[![Codecov](https://codecov.io/gh/fartem/hash-checker-lite/branch/master/graph/badge.svg)](https://codecov.io/gh/fartem/hash-checker-lite)
[![GitHubActions](https://github.com/hash-checker/hash-checker-lite/workflows/Build/badge.svg)](https://github.com/hash-checker/hash-checker-lite/actions?query=workflow%3ABuild)
[![Codacy](https://api.codacy.com/project/badge/Grade/cf1f8beb6a5340e49ca32425ab44462d)](https://app.codacy.com/gh/hash-checker/hash-checker-lite?utm_source=github.com&utm_medium=referral&utm_content=hash-checker/hash-checker-lite&utm_campaign=Badge_Grade)
[![Codecov](https://codecov.io/gh/hash-checker/hash-checker-lite/branch/master/graph/badge.svg)](https://codecov.io/gh/hash-checker/hash-checker-lite)
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Hash%20Checker%20Lite-green.svg?style=flat)](https://android-arsenal.com/details/1/8155)

## About application

Fast and simple application for generating and comparison hashes from files or text. Lite version of [Hash Checker](https://github.com/fartem/hash-checker).
Fast and simple application for generating and comparison hashes from files or text. Lite version of [Hash Checker](https://github.com/hash-checker/hash-checker).

## Original app and lite version comparison

| Feature | [Hash Checker](https://github.com/fartem/hash-checker) | Hash Checker Lite |
| Feature | [Hash Checker](https://github.com/hash-checker/hash-checker) | Hash Checker Lite |
| --- | --- | --- |
| MD5 support | + | + |
| SHA-1 support | + | + |
Expand Down Expand Up @@ -77,7 +77,7 @@ You can help with translation on [OneSky](https://osbvnmv.oneskyapp.com/collabor

## Feedback

If you have any question or feature idea for app, you can open issue on [this page](https://github.com/fartem/hash-checker-lite/issues) or contact me by email jaman.smlnsk@gmail.com.
If you have any question or feature idea for app, you can open issue on [this page](https://github.com/hash-checker/hash-checker-lite/issues) or contact me by email jaman.smlnsk@gmail.com.

## How to build unsigned .apk from command line without IDE

Expand All @@ -92,7 +92,7 @@ Go to `app` -> `build` -> `outputs` -> `apk` -> `debug` and find `hash-checker-l

## How to contribute

Read [Commit Convention](https://github.com/fartem/repository-rules/blob/master/commit-convention/COMMIT_CONVENTION.md). Make sure your build is green before you contribute your pull request. Then:
Read [Commit Convention](https://github.com/hash-checker/repository-rules/blob/master/commit-convention/COMMIT_CONVENTION.md). Make sure your build is green before you contribute your pull request. Then:

```shell
$ ./gradlew clean
Expand Down
8 changes: 6 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId 'com.smlnskgmail.jaman.hashcheckerlite'
minSdkVersion 21
targetSdkVersion 29
versionCode 4
versionName '1.0.3'
versionCode 5
versionName '1.0.4'
vectorDrawables.useSupportLibrary = true

testInstrumentationRunner 'com.smlnskgmail.jaman.hashcheckerlite.runner.AndroidJacocoTestRunner'
Expand Down Expand Up @@ -82,6 +82,10 @@ dependencies {
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.preference:preference:1.1.1'

// Checkstyle
checkstyle 'com.github.fartem:checkstyle-checks-java:master'
checkstyle 'com.github.fartem:checkstyle-checks-android:master'

// Unit tests
testImplementation 'junit:junit:4.13'

Expand Down
17 changes: 13 additions & 4 deletions app/checkstyle.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
apply plugin: 'checkstyle'

checkstyle {
toolVersion '8.29'
toolVersion '8.38'
ignoreFailures false
showViolations true
}

task checkstyle(type: Checkstyle) {
group 'verification'

config project.resources.text.fromUri(
'https://raw.githubusercontent.com/fartem/repository-rules/master/rules/java/checkstyle/checkstyle.xml'
)
def checkstyleConfigPath = "$rootDir/checkstyle.xml"
def checkstyleConfig = new File(checkstyleConfigPath)
new URL(
"https://raw.githubusercontent.com/fartem/repository-rules/master/rules/java/android/checkstyle.xml"
).withInputStream {
i ->
checkstyleConfig.withOutputStream {
it << i
}
}

configFile file(checkstyleConfigPath)
source rootProject.file('app/src/main/java')
classpath = files()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@
ClipboardTest.class,
ScreenRunnerTest.class
})
public class AndroidTestSuite {}
public class AndroidTestSuite {
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public String getTestingText() {
}

@Override
public void checkFile() {}
public void checkFile() {
}

@Nullable
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ protected void textEquals(@NonNull String text, int textViewId) {
@SuppressWarnings("SameParameterValue")
protected void inRecyclerViewClickOnPosition(int recyclerId, int position) {
onView(withId(recyclerId)).perform(
RecyclerViewActions.actionOnItemAtPosition(
position,
click()
)
RecyclerViewActions.actionOnItemAtPosition(
position,
click()
)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ private void showFragmentInMenu(

private void clickOnSettingsItem(int settingsTitleResId) {
onView(withId(R.id.recycler_view)).perform(
RecyclerViewActions.actionOnItem(
hasDescendant(withText(settingsTitleResId)),
click()
)
RecyclerViewActions.actionOnItem(
hasDescendant(withText(settingsTitleResId)),
click()
)
);
delayAndBack();
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

<uses-permission android:name="android.permission.VIBRATE" />

<application android:name="com.smlnskgmail.jaman.hashcheckerlite.App"
<application
android:name="com.smlnskgmail.jaman.hashcheckerlite.App"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ private void setLocale(@NonNull Context context) {
Language language = null;
if (!SettingsHelper.languageIsInitialized(context)) {
String deviceLocale = Locale.getDefault().toString();
for (Language lang: Language.values()) {
for (Language lang : Language.values()) {
if (deviceLocale.equals(lang.code())) {
language = lang;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ private Bundle getBundleForShortcutAction(
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
hideKeyboard();
switch (item.getItemId()) {
case R.id.menu_main_section_settings:
Expand Down Expand Up @@ -155,7 +155,7 @@ public void onBackPressed() {
if (fragment instanceof AppBackClickTarget) {
((AppBackClickTarget) fragment).appBackClick();
}
for (Fragment fragmentInApp: getSupportFragmentManager().getFragments()) {
for (Fragment fragmentInApp : getSupportFragmentManager().getFragments()) {
if (fragmentInApp instanceof AppResumeTarget) {
((AppResumeTarget) fragmentInApp).appResume();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.smlnskgmail.jaman.hashcheckerlite.logic.settings.SettingsHelper;
Expand All @@ -11,7 +12,7 @@
public abstract class BaseActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
protected void onCreate(@Nullable Bundle savedInstanceState) {
LangUtils.setLocale(
this,
SettingsHelper.getLanguage(this)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ public void appResume() {

@Override
public void onCreateOptionsMenu(
Menu menu,
MenuInflater inflater
@NonNull Menu menu,
@NonNull MenuInflater inflater
) {
menu.clear();
inflater.inflate(getMenuResId(), menu);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public void onViewCreated(
bottomSheetItems.setAdapter(getItemsAdapter());
}

@NonNull
protected abstract BaseListAdapter<T> getItemsAdapter();

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ public interface ListItem {

int DEFAULT_ICON_VALUE = -1;

@NonNull
String getTitle(@NonNull Context context);

int getPrimaryIconResId();

int getAdditionalIconResId();

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ public BaseListHolder<T> onCreateViewHolder(
int viewType
) {
return getItemsHolder(
getBottomSheet().getContext(),
LayoutInflater.from(parent.getContext()).inflate(
R.layout.item_list,
parent,
false
),
getBottomSheet().getContext()
)
);
}

Expand All @@ -53,9 +53,10 @@ public void onBindViewHolder(
holder.bind(items.get(position));
}

@NonNull
protected abstract BaseListHolder<T> getItemsHolder(
@NonNull View view,
@NonNull Context themeContext
@NonNull Context themeContext,
@NonNull View view
);

@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public abstract class BaseListHolder<T extends ListItem> extends RecyclerView.Vi
private final Context context;

protected BaseListHolder(
@NonNull View itemView,
@NonNull Context themeContext
@NonNull Context themeContext,
@NonNull View itemView
) {
super(itemView);

Expand Down Expand Up @@ -87,10 +87,12 @@ protected void callItemClick() {

}

@NonNull
protected ImageView getIvItemAdditionalIcon() {
return ivItemAdditionalIcon;
}

@NonNull
protected Context getContext() {
return context;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.widget.FrameLayout;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.smlnskgmail.jaman.hashcheckerlite.R;

Expand All @@ -18,7 +19,7 @@ protected BaseDialog(@NonNull Context context) {
}

@Override
protected void onCreate(Bundle savedInstanceState) {
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(getLayoutResId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ public void show() {
)
);

TextView snackbarText = snackbar.getView().findViewById(
TextView tvSnackbarText = snackbar.getView().findViewById(
R.id.snackbar_text
);
snackbarText.setTextColor(
tvSnackbarText.setTextColor(
UIUtils.getCommonTextColor(
context
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public Feedback(
this.model = model;
}

@NonNull
public String getAppInfo() {
return String.format(
"%s (%s)",
Expand All @@ -33,13 +34,14 @@ public String getAppInfo() {
);
}

@NonNull
public String getConfiguredMessage(@NonNull String feedback) {
return String.format(
"%s" +
"\n\n\n%s (%s)" +
"\nAndroid %s" +
"\n%s" +
"\n%s",
"\n\n\n%s (%s)" +
"\nAndroid %s" +
"\n%s" +
"\n%s",
feedback,
appVersionName,
appVersionCode,
Expand Down
Loading

0 comments on commit e14aa0f

Please sign in to comment.