Skip to content
Closed

V2 #19

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
457aeea
Revamp UI: Add bottom toolbar, update settings, modify main screen, r…
Dec 14, 2023
97bf7ed
About was migrated. App now updated with the latest About info
Dec 14, 2023
d8ec9fe
Merge pull request #17 from SidMalladi/v2_changes
trife Feb 6, 2024
156fb4f
bottom-nav-bar added to all screens
SidMalladi Feb 12, 2024
38a9d4a
updated bottom-nav-bar which was previously crashing. Also added a UX…
SidMalladi Feb 13, 2024
4f3dbe0
fixed the bug that was caused when pressing enter on the main page wh…
Feb 14, 2024
3e42c05
removed alertBox and embedded contains/match into the compareActivity…
Feb 15, 2024
e9d5849
Bugs:bottomnavbar jumps above the keyboard, removed dialog from compa…
Feb 16, 2024
337ba01
Bugs:bottomnavbar jumps above the keyboard, removed dialog from comp…
Feb 16, 2024
0dbf79b
dummy commit, in-progress but works
Feb 27, 2024
2c29fc9
Encapsulated ring notif, file export, homefrag refactor
SidMalladi Mar 1, 2024
a68f757
exportButton color, removed clearButton, last chosen mode, textlayout…
SidMalladi Mar 6, 2024
48b4167
last chosen mode is now persisted
SidMalladi Mar 6, 2024
50e987f
persisted mode fixed, bug with switching matches/contains fixed
SidMalladi Mar 7, 2024
cff3ae9
Refactored B_A_N into Verify
SidMalladi Mar 7, 2024
650d87d
compare now follows ui/logic (it was accidentally going to matches wh…
SidMalladi Mar 7, 2024
48e302c
introduced dataHelper(IdEntryRepository) which handles the db functions
SidMalladi Mar 11, 2024
8353b94
refreshData method; import functionality smoother running
SidMalladi Mar 11, 2024
cfef917
recyclerView completed (used model class and adapter instead of strin…
SidMalladi Mar 15, 2024
f9627cf
Fixes: coloring mode broken, back closes the app, export returns empt…
SidMalladi Apr 4, 2024
c7184c0
combined data in additional info recycler for smoother scroll
SidMalladi Apr 7, 2024
6a6c4ce
updates for sdk 36
trife Feb 27, 2026
9ee0162
replace png icons with xml drawables
trife Feb 27, 2026
9e40f2a
fix more icons and about fragment
trife Feb 27, 2026
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
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "disabled"
}
53 changes: 31 additions & 22 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ plugins {
}

android {
compileSdkVersion 34
buildToolsVersion '28.0.3'
compileSdkVersion 36
defaultConfig {
applicationId "org.phenoapps.verify"
minSdkVersion 16
targetSdkVersion 34
minSdkVersion 23
targetSdkVersion 36
versionCode 2
versionName "1.1"
versionName "2.0.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled = true
vectorDrawables.useSupportLibrary = true
Expand All @@ -21,44 +20,54 @@ android {
release {
shrinkResources false
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
resources {
excludes += ['META-INF/DEPENDENCIES.txt', 'META-INF/LICENSE.txt', 'META-INF/NOTICE.txt', 'META-INF/NOTICE', 'META-INF/LICENSE', 'META-INF/DEPENDENCIES', 'META-INF/notice.txt', 'META-INF/license.txt', 'META-INF/dependencies.txt', 'META-INF/LGPL2.1']
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding true
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.core:core-ktx:1.17.0'
implementation 'androidx.activity:activity-ktx:1.12.4'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'
implementation 'androidx.appcompat:appcompat:1.7.1'
implementation 'com.google.android.material:material:1.13.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'
implementation 'androidx.vectordrawable:vectordrawable:1.2.0'
implementation 'com.github.apl-devs:appintro:v4.2.0'
implementation "androidx.navigation:navigation-fragment-ktx:2.9.7"
implementation 'androidx.preference:preference-ktx:1.2.1'
implementation "androidx.navigation:navigation-ui-ktx:2.9.7"
testImplementation 'junit:junit:4.13.2'
implementation files('libs/poi-3.12-android-a.jar')
implementation("androidx.navigation:navigation-fragment-ktx:2.9.7")
implementation files('libs/poi-ooxml-schemas-3.12-20150511-a.jar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.10"
implementation 'com.google.android.material:material:1.13.0'
implementation 'com.github.daniel-stoneuk:material-about-library:3.1.2'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.10.0"
implementation 'com.google.android.material:material:1.13.0'
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
50 changes: 32 additions & 18 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,45 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<activity
android:name="org.phenoapps.verify.MainActivity"
android:configChanges="keyboardHidden|screenSize|keyboard"
android:windowSoftInputMode="adjustPan"
android:exported="true">
android:name=".AboutActivity"
android:exported="true"
android:theme="@style/AppThemeNoActionBar" />
<activity
android:name=".MainActivity"
android:configChanges="keyboardHidden|screenSize|keyboard|orientation"
android:exported="true"
android:theme="@style/AppThemeNoActionBar"
android:windowSoftInputMode="adjustNothing">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity android:name=".CompareActivity" android:exported="true"/>

<activity
android:name="org.phenoapps.verify.ScanActivity"
android:exported="true"/>

<activity android:name="org.phenoapps.verify.LoaderDBActivity" android:exported="true"
android:configChanges="orientation|keyboardHidden|screenSize|keyboard"/>

<activity android:name="org.phenoapps.verify.SettingsActivity" android:exported="true"/>

<activity android:name="org.phenoapps.verify.IntroActivity" android:exported="true"
android:theme = "@style/AppThemeNoActionBar"/>
android:name=".CompareActivity"
android:configChanges="keyboardHidden|screenSize|keyboard|orientation"
android:exported="true"
android:theme="@style/AppThemeNoActionBar"
android:windowSoftInputMode="adjustNothing" />
<activity
android:name=".ScanActivity"
android:exported="true"
android:theme="@style/AppThemeNoActionBar" />
<activity
android:name=".LoaderDBActivity"
android:configChanges="orientation|keyboardHidden|screenSize|keyboard"
android:exported="true"
android:theme="@style/AppThemeNoActionBar" />
<activity
android:name=".SettingsActivity"
android:exported="true" />
<activity
android:name=".IntroActivity"
android:exported="true"
android:theme="@style/AppThemeNoActionBar" />
</application>

</manifest>
</manifest>
54 changes: 54 additions & 0 deletions app/src/main/java/org/phenoapps/verify/AboutActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package org.phenoapps.verify;

import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import com.google.android.material.bottomnavigation.BottomNavigationView;

import org.phenoapps.verify.utilities.InsetHandler;

public class AboutActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
EdgeToEdge.enable(this);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);

Toolbar toolbar = findViewById(R.id.about_toolbar);
setSupportActionBar(toolbar);
if (getSupportActionBar() != null) {
getSupportActionBar().setTitle(getString(R.string.about));
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
}

BottomNavigationView bnv = findViewById(R.id.about_bnv);
// No item pre-selected in About
bnv.getMenu().setGroupCheckable(0, false, true);

View rootView = getWindow().getDecorView().findViewById(android.R.id.content);
InsetHandler.INSTANCE.setupInsetsWithBottomNav(rootView, toolbar, bnv);

bnv.setOnItemSelectedListener(item -> {
finish();
return true;
});
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == android.R.id.home) {
finish();
return true;
}
return super.onOptionsItemSelected(item);
}
}


136 changes: 136 additions & 0 deletions app/src/main/java/org/phenoapps/verify/AboutFragment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
package org.phenoapps.verify;

import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;

import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;

import com.danielstone.materialaboutlibrary.MaterialAboutFragment;
import com.danielstone.materialaboutlibrary.ConvenienceBuilder;
import com.danielstone.materialaboutlibrary.items.MaterialAboutActionItem;
import com.danielstone.materialaboutlibrary.items.MaterialAboutItemOnClickAction;
import com.danielstone.materialaboutlibrary.items.MaterialAboutTitleItem;
import com.danielstone.materialaboutlibrary.model.MaterialAboutCard;
import com.danielstone.materialaboutlibrary.model.MaterialAboutList;

public class AboutFragment extends MaterialAboutFragment {

@Override
@NonNull
public MaterialAboutList getMaterialAboutList(@NonNull Context c) {

// ── App card ─────────────────────────────────────────────────────────
MaterialAboutCard.Builder appCardBuilder = new MaterialAboutCard.Builder();

appCardBuilder.addItem(new MaterialAboutTitleItem.Builder()
.text(R.string.app_name)
.icon(R.mipmap.ic_launcher)
.build());

appCardBuilder.addItem(ConvenienceBuilder.createVersionActionItem(c,
ContextCompat.getDrawable(c, R.drawable.ic_about),
getString(R.string.about_version_title),
false));
appCardBuilder.addItem(ConvenienceBuilder.createRateActionItem(c,
getResources().getDrawable(R.drawable.star),
getString(R.string.about_rate),
null
));

// ── Project Lead card ─────────────────────────────────────────────────
MaterialAboutCard.Builder leadCardBuilder = new MaterialAboutCard.Builder();
leadCardBuilder.title(getString(R.string.about_project_lead_title));

leadCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text(getString(R.string.dev_trevor))
.subText(getString(R.string.clemson))
.icon(R.drawable.ic_person_profile)
.build());

leadCardBuilder.addItem(ConvenienceBuilder.createEmailItem(c,
ContextCompat.getDrawable(c, R.drawable.email),
getString(R.string.about_email_title),
true,
getString(R.string.dev_trevor_email),
"Verify Question"));

// ── Contributors card ─────────────────────────────────────────────────
MaterialAboutCard.Builder contributorsCardBuilder = new MaterialAboutCard.Builder();
contributorsCardBuilder.title(getString(R.string.about_contributors_developers_title));

contributorsCardBuilder.addItem(ConvenienceBuilder.createWebsiteActionItem(c,
ContextCompat.getDrawable(c, R.drawable.account_group),
getString(R.string.about_contributors_title),
false,
Uri.parse("https://github.com/PhenoApps/Verify#contributors")));

contributorsCardBuilder.addItem(ConvenienceBuilder.createWebsiteActionItem(c,
ContextCompat.getDrawable(c, R.drawable.currency_usd),
getString(R.string.about_contributors_funding_title),
false,
Uri.parse("https://github.com/PhenoApps/Verify#funding")));

// ── PhenoApps card ────────────────────────────────────────────────────
MaterialAboutCard.Builder otherAppsCardBuilder = new MaterialAboutCard.Builder();
otherAppsCardBuilder.title(getString(R.string.about_title_pheno_apps));

otherAppsCardBuilder.addItem(ConvenienceBuilder.createWebsiteActionItem(c,
ContextCompat.getDrawable(c, R.drawable.web),
"PhenoApps.org",
false,
Uri.parse("http://phenoapps.org/")));

otherAppsCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text("Field Book")
.icon(R.drawable.other_ic_field_book)
.setOnClickAction(openAppOrStore("com.fieldbook.tracker", c))
.build());

otherAppsCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text("Intercross")
.icon(R.drawable.other_ic_intercross)
.setOnClickAction(openAppOrStore("org.phenoapps.intercross", c))
.build());

otherAppsCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text("Coordinate")
.icon(R.drawable.other_ic_coordinate)
.setOnClickAction(openAppOrStore("org.wheatgenetics.coordinate", c))
.build());

// ── Technical card ────────────────────────────────────────────────────
MaterialAboutCard.Builder technicalCardBuilder = new MaterialAboutCard.Builder();
technicalCardBuilder.title(getString(R.string.about_technical_title));

technicalCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text(R.string.about_github_title)
.icon(R.drawable.github)
.setOnClickAction(ConvenienceBuilder.createWebsiteOnClickAction(c,
Uri.parse("https://github.com/PhenoApps/Verify")))
.build());

return new MaterialAboutList(
appCardBuilder.build(),
leadCardBuilder.build(),
contributorsCardBuilder.build(),
technicalCardBuilder.build(),
otherAppsCardBuilder.build());
}

private MaterialAboutItemOnClickAction openAppOrStore(final String packageName, Context c) {
PackageManager pm = c.getPackageManager();
try {
pm.getPackageInfo(packageName, 0);
return () -> {
Intent launchIntent = c.getPackageManager().getLaunchIntentForPackage(packageName);
if (launchIntent != null) startActivity(launchIntent);
};
} catch (PackageManager.NameNotFoundException e) {
return ConvenienceBuilder.createWebsiteOnClickAction(c,
Uri.parse("https://play.google.com/store/apps/details?id=" + packageName));
}
}
}
Loading