Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4 release #27

Merged
merged 91 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
92c3f89
fix onBackPressed crash when adapter is null
SlaVcE14 Oct 17, 2023
aa77dc2
Merge pull request #8 from SlaVcE14/onBack-crash
SlaVcE14 Oct 17, 2023
d557ff8
fix path bug
SlaVcE14 Oct 17, 2023
fd05c64
Update codeql.yml
SlaVcE14 Oct 19, 2023
be41c0f
Merge pull request #9 from SlaVcE14/path-bug
SlaVcE14 Oct 21, 2023
f234be5
update SJ Dialog
SlaVcE14 Oct 21, 2023
71e24c3
update Gson
SlaVcE14 Oct 21, 2023
c822caf
update About page
SlaVcE14 Oct 23, 2023
814d487
add themed icon
SlaVcE14 Oct 23, 2023
87f89b7
Merge pull request #11 from SlaVcE14/themed-icon
SlaVcE14 Oct 23, 2023
dd87026
Merge pull request #10 from SlaVcE14/about-page-update
SlaVcE14 Oct 23, 2023
f2c0ce5
Update build.gradle
SlaVcE14 Oct 23, 2023
ec26d6f
Fix Uncontrolled data used
SlaVcE14 Oct 23, 2023
434ef6f
Update FileSystem.java
SlaVcE14 Oct 23, 2023
b80e57a
Update FileSystem.java
SlaVcE14 Oct 23, 2023
198e586
Merge pull request #13 from SlaVcE14/Uncontrolled-data
SlaVcE14 Oct 23, 2023
9b3e4ff
move Java methodes to a separate package
SlaVcE14 Oct 24, 2023
c6f4e07
replace onBackPressed to OnBackPressedDispatcher
SlaVcE14 Oct 25, 2023
5d595e5
rename method
SlaVcE14 Oct 25, 2023
abc230d
change reading and displaying strings
SlaVcE14 Oct 27, 2023
619efe0
add toString in ListItem
SlaVcE14 Oct 27, 2023
97fbda9
fix window leak
SlaVcE14 Oct 27, 2023
66e2efb
update titleTxt
SlaVcE14 Oct 28, 2023
f795072
Update JsonData.java
SlaVcE14 Oct 28, 2023
343ef77
Update MainActivity.java
SlaVcE14 Oct 28, 2023
f116a8c
fix visibility on emptyListTxt
SlaVcE14 Oct 28, 2023
22fa9fa
Merge pull request #14 from SlaVcE14/refactor-code
SlaVcE14 Oct 28, 2023
626a7d9
add unit tests
SlaVcE14 Oct 28, 2023
98bf9e2
Merge pull request #15 from SlaVcE14/unit-tests
SlaVcE14 Oct 28, 2023
366ea0a
Add splash screen
SlaVcE14 Oct 30, 2023
c225e2c
Merge pull request #16 from SlaVcE14/splash-screen
SlaVcE14 Oct 30, 2023
4551f2f
add Json Array support for array of arraya
SlaVcE14 Oct 31, 2023
cdd4a0d
add tests
SlaVcE14 Oct 31, 2023
bfb19e0
remove isArrayOfObjects, use isArray instead
SlaVcE14 Nov 1, 2023
233e45a
update Json Array
SlaVcE14 Nov 1, 2023
b461c17
update tests
SlaVcE14 Nov 1, 2023
05cffd6
refactor
SlaVcE14 Nov 1, 2023
8829c04
Merge pull request #17 from SlaVcE14/fix-array
SlaVcE14 Nov 1, 2023
0599bc2
show path
SlaVcE14 Nov 4, 2023
d6590d6
update exceptions
SlaVcE14 Nov 5, 2023
b8e1c48
Merge pull request #18 from SlaVcE14/fix-exception
SlaVcE14 Nov 5, 2023
c10c5bd
remove ExceptionCallback
SlaVcE14 Nov 6, 2023
ff73b5f
update Threads
SlaVcE14 Nov 6, 2023
27a12c6
replace with lambda
SlaVcE14 Nov 7, 2023
1c8c5e3
Merge pull request #19 from SlaVcE14/thread
SlaVcE14 Nov 7, 2023
8a7810d
Snackbar update
SlaVcE14 Nov 7, 2023
977e71a
update file reading
SlaVcE14 Nov 8, 2023
458cb63
Update loading animation
SlaVcE14 Nov 9, 2023
d26c47d
Update MainActivity.java
SlaVcE14 Nov 9, 2023
eb1ff35
loading animation update
SlaVcE14 Dec 19, 2023
c2d160d
Update FileSystem.java
SlaVcE14 Dec 19, 2023
8b663ef
loading animation update
SlaVcE14 Dec 20, 2023
88ce83b
add start screen animation
SlaVcE14 Dec 20, 2023
238076a
Merge pull request #20 from SlaVcE14/UI-update
SlaVcE14 Dec 20, 2023
bfcc917
Update activity_about.xml
SlaVcE14 Jan 2, 2024
e3ac4be
Merge pull request #21 from SlaVcE14/update-about
SlaVcE14 Jan 2, 2024
2e5a5dd
Added Drag and Drop feature
SlaVcE14 Jan 27, 2024
4660190
Update build.gradle
SlaVcE14 Jan 27, 2024
b22e3d9
Change from ListView to RecyclerView
SlaVcE14 Jan 27, 2024
0fd7709
save previous position
SlaVcE14 Jan 28, 2024
725be11
Update build.gradle
SlaVcE14 Jan 28, 2024
f071afe
change smoothScrollToPosition
SlaVcE14 Jan 28, 2024
8bb0022
Merge pull request #22 from SlaVcE14/save-last-position
SlaVcE14 Jan 28, 2024
f0871d0
Limit dropped files to one
SlaVcE14 Jan 28, 2024
fd433ca
Update build.gradle
SlaVcE14 Jan 30, 2024
0ce91e8
Add Crash log
SlaVcE14 Jan 31, 2024
17b2058
add warning dialog before sharing logs
SlaVcE14 Feb 1, 2024
6f5bcc0
Merge pull request #23 from SlaVcE14/crash-log
SlaVcE14 Feb 1, 2024
039575b
fix MIME types
SlaVcE14 Feb 2, 2024
6537ee5
Merge pull request #24 from SlaVcE14/dev
SlaVcE14 Feb 2, 2024
0cf7b19
Update material library to 1.12.0-alpha03
SlaVcE14 Feb 2, 2024
f8b10af
move shortcuts.xml to xml-v25
SlaVcE14 Feb 2, 2024
bfaef29
Update build.gradle
SlaVcE14 Feb 2, 2024
b3b6a23
Update buttons
SlaVcE14 Feb 2, 2024
50a60d3
Fix some visual bugs
SlaVcE14 Feb 2, 2024
68e9c80
Merge pull request #25 from SlaVcE14/UI-update
SlaVcE14 Feb 2, 2024
663e73b
Update build.gradle
SlaVcE14 Feb 2, 2024
5efb029
Added Split view
SlaVcE14 Feb 3, 2024
9d32c70
Merge pull request #26 from SlaVcE14/split-screen
SlaVcE14 Feb 3, 2024
a564363
refactor code
SlaVcE14 Feb 3, 2024
843051a
Update space_layout.xml
SlaVcE14 Feb 4, 2024
e0550ea
add DeviceInfo in logs
SlaVcE14 Feb 4, 2024
ecec677
clearPreviousPos
SlaVcE14 Feb 10, 2024
65e4a82
Update README.md
SlaVcE14 Feb 10, 2024
8081f30
Update README.md
SlaVcE14 Feb 10, 2024
c0a76a2
Update README.md
SlaVcE14 Feb 10, 2024
cd7db9a
fix nav and status bar colors
SlaVcE14 Feb 10, 2024
21be63b
Merge branch 'dev' of https://github.com/SlaVcE14/JsonList into dev
SlaVcE14 Feb 10, 2024
2b2dc1f
upload images
SlaVcE14 Feb 10, 2024
3a1e28f
upload image
SlaVcE14 Feb 10, 2024
e291420
Update jsonlist_material_colots.gif
SlaVcE14 Feb 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ "master" ]
branches: [ "master", "dev" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
branches: [ "master", "dev" ]
schedule:
- cron: '26 5 * * 0'

Expand Down
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
![repo preview](https://repository-images.githubusercontent.com/507594462/8b9d54af-1231-43e3-a84a-5d19da2e5e38)
# JsonList
Android app for previewing JSON files in list form
Introducing a Material You Android application for previewing JSON files in a user-friendly list format.

![JsonList](images/jsonlist_main.jpg)

Use the convenient split view feature that allows simultaneous display of the raw JSON string alongside the list representation.

![JsonList split view](images/jsonlist_splitview.jpg)

![JsonList split view landscape](images/jsonlist_splitview_landscape.jpg)

Enjoy the flexibility of dynamic color support, adapting to your Material Design preferences.

![JsonList dynamic colors](images/jsonlist_material_colots.gif)
19 changes: 10 additions & 9 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ plugins {
}

android {
compileSdk 31
compileSdk 34

defaultConfig {
applicationId "com.sjapps.jsonlist"
minSdk 23
targetSdk 31
versionCode 5
versionName "1.3"
targetSdk 34
versionCode 10
versionName "1.4"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand All @@ -22,7 +22,7 @@ android {
}
debug {
applicationIdSuffix '.debug'
versionNameSuffix ' debug'
versionNameSuffix ' dev'
}
}
compileOptions {
Expand All @@ -33,14 +33,15 @@ android {

dependencies {

implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.12.0-alpha03'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.github.slavce14:SJ-Library:1.4'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.github.slavce14:sj-dialog:1.6.1'
implementation "androidx.core:core-splashscreen:1.0.1"
}
20 changes: 19 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sjapps.jsonlist">

<queries>
<package android:name="com.sjapps.sjstore"/>
</queries>

<application
android:allowBackup="true"
android:name=".App"
Expand All @@ -12,14 +16,18 @@
android:largeHeap="true"
android:theme="@style/Theme.JsonList">
<activity android:name="com.sjapps.about.AboutActivity"/>
<activity
android:name="com.sjapps.logs.LogActivity"
android:exported="false" />
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout"
android:exported="true">
<meta-data android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.OPEN_DOCUMENT"/>

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Expand All @@ -38,6 +46,16 @@
<data android:scheme="content" />
</intent-filter>
</activity>

<provider
android:authorities="${applicationId}.logs.provider"
android:name="androidx.core.content.FileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_path"/>
</provider>
</application>

</manifest>
Binary file removed app/src/main/ic_open_file-playstore.png
Binary file not shown.
46 changes: 42 additions & 4 deletions app/src/main/java/com/sjapps/about/AboutActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.animation.Animation;
Expand All @@ -12,23 +15,29 @@

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.core.widget.NestedScrollView;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.sjapps.jsonlist.R;
import com.sjapps.library.customdialog.ImageListItem;
import com.sjapps.library.customdialog.ListDialog;

import java.util.ArrayList;

public class AboutActivity extends AppCompatActivity {

private static final String GITHUB_REPOSITORY_RELEASES = "https://github.com/SlaVcE14/JsonList/releases";
final String STORE_PACKAGE_NAME = "com.sjapps.sjstore";

ImageView logo;
NestedScrollView nestedScrollView;
RecyclerView ListRV,LibListRV;
ArrayList<AboutListItem> appInfoItems = new ArrayList<>();
ArrayList<AboutListItem> libsItems;
boolean isStoreInstalled;
Drawable storeIcon;

@Override
protected void onCreate(Bundle savedInstanceState) {
Expand Down Expand Up @@ -69,24 +78,53 @@ void initialize(){
ListRV = findViewById(R.id.aboutList);
LibListRV = findViewById(R.id.LibrariesList);
nestedScrollView = findViewById(R.id.nestedList);

findViewById(R.id.updateBtn).setVisibility(View.VISIBLE);
if (CheckStoreIsInstalled()){
findViewById(R.id.updateBtn).setVisibility(View.VISIBLE);
isStoreInstalled = true;
}
}

public void CheckForUpdate(View view) {
if (!isStoreInstalled) {
openGitHub();
return;
}

ListDialog dialog = new ListDialog();

ArrayList<ImageListItem> items = new ArrayList<>();
items.add(new ImageListItem("GitHub", AppCompatResources.getDrawable(this,R.drawable.github_logo), (ImageItemClick) this::openGitHub));
items.add(new ImageListItem("SJ Store", storeIcon, (ImageItemClick) this::openStore));

dialog.Builder(this,true)
.setTitle("Open...")
.setImageItems(items, (position, obj) -> {
if (obj.getData() == null)
return;
((ImageItemClick) obj.getData()).onClick();
dialog.dismiss();
})
.show();
}

private void openGitHub(){
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(GITHUB_REPOSITORY_RELEASES));
startActivity(intent);
}

private void openStore(){
Intent intent = new Intent();
intent.setComponent(new ComponentName(STORE_PACKAGE_NAME,STORE_PACKAGE_NAME + ".AppActivity"));
intent.putExtra("packageName", getPackageName());
intent.putExtra("isInstalled",true);
startActivity(intent);
}

public boolean CheckStoreIsInstalled(){
private boolean CheckStoreIsInstalled(){
PackageManager packageManager = getPackageManager();
try {
packageManager.getPackageInfo(STORE_PACKAGE_NAME,0);
PackageInfo packageInfo = packageManager.getPackageInfo(STORE_PACKAGE_NAME,0);
storeIcon = packageInfo.applicationInfo.loadIcon(packageManager);
return true;
} catch (PackageManager.NameNotFoundException e) {
return false;
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/com/sjapps/about/ImageItemClick.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.sjapps.about;

public interface ImageItemClick {
void onClick();
}
8 changes: 6 additions & 2 deletions app/src/main/java/com/sjapps/about/LibraryList.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
package com.sjapps.about;

import com.google.gson.internal.GsonBuildConfig;
import com.sjapps.library.BuildConfig;

public class LibraryList extends ListGenerator{
@Override
public void init() {
addItem("SJ Library","1.4", "https://github.com/SlaVcE14/SJ-Library");
addItem("gson","2.8.9", "https://github.com/google/gson");
addItem("SJ Dialog", BuildConfig.VERSION_NAME, "https://github.com/SlaVcE14/SJ-Dialog");
addItem("gson", GsonBuildConfig.VERSION, "https://github.com/google/gson");
addItem("core-splashscreen","1.0.1","https://developer.android.com/develop/ui/views/launch/splash-screen");
}
}

Loading
Loading