Skip to content

Commit

Permalink
Merge pull request #17 from SidMalladi/v2_changes
Browse files Browse the repository at this point in the history
V2 changes
  • Loading branch information
trife authored Feb 6, 2024
2 parents 9809ab9 + 97bf7ed commit d8ec9fe
Show file tree
Hide file tree
Showing 29 changed files with 430 additions and 291 deletions.
5 changes: 4 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ android {
minSdkVersion 16
targetSdkVersion 34
versionCode 2
versionName "1.1"
versionName "2"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled = true
vectorDrawables.useSupportLibrary = true
Expand Down Expand Up @@ -58,7 +58,10 @@ dependencies {
implementation files('libs/poi-3.12-android-a.jar')
implementation files('libs/poi-ooxml-schemas-3.12-20150511-a.jar')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.github.daniel-stoneuk:material-about-library:3.1.2'
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
43 changes: 25 additions & 18 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,38 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<activity
android:name="org.phenoapps.verify.MainActivity"
android:name=".AboutActivity"
android:theme="@style/AppTheme.MaterialAboutActivity"
android:exported="true" />
<activity
android:name=".MainActivity"
android:configChanges="keyboardHidden|screenSize|keyboard"
android:windowSoftInputMode="adjustPan"
android:exported="true">
android:exported="true"
android:windowSoftInputMode="adjustPan">
<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:exported="true" />
<activity
android:name=".ScanActivity"
android:exported="true" />
<activity
android:name=".LoaderDBActivity"
android:configChanges="orientation|keyboardHidden|screenSize|keyboard"
android:exported="true" />
<activity
android:name=".SettingsActivity"
android:exported="true" />
<activity
android:name=".IntroActivity"
android:exported="true"
android:theme="@style/AppThemeNoActionBar" />
</application>

</manifest>
</manifest>
83 changes: 83 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,83 @@
package org.phenoapps.verify;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.swiperefreshlayout.widget.CircularProgressDrawable;

import android.content.Context;
import android.net.Uri;
import android.os.Bundle;

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

public class AboutActivity extends MaterialAboutActivity {


private CircularProgressDrawable progress;
private MaterialAboutActionItem updateCheckItem;




@NonNull
@Override
protected MaterialAboutList getMaterialAboutList(@NonNull Context context) {

MaterialAboutCard.Builder appCardBuilder = new MaterialAboutCard.Builder();

appCardBuilder.addItem(new MaterialAboutTitleItem.Builder().text("CheckList").icon(R.mipmap.ic_launcher).build());

appCardBuilder.addItem(ConvenienceBuilder.createVersionActionItem(this,
getResources().getDrawable(R.drawable.ic_about),
"Version",
false));

MaterialAboutCard.Builder authorCardBuilder = new MaterialAboutCard.Builder();
authorCardBuilder.title("Developers");

authorCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text(getString(R.string.dev_chaney))
.subText("\t\t"+getString(R.string.ksu))
.icon(R.drawable.ic_person_profile)
.build());
authorCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text(getString(R.string.dev_trevor))
.subText("\t\t"+getString(R.string.ksu)+"\n\t\t"+getString(R.string.dev_trevor_email))
.icon(R.drawable.ic_person_profile)
.build());
authorCardBuilder.addItem(new MaterialAboutActionItem.Builder()
.text(getString(R.string.dev_jesse))
.subText("\t\t"+getString(R.string.ksu)+"\n\t\t"+getString(R.string.dev_jesse_email)+
"\n\t\t"+"http://wheatgenetics.org")
.icon(R.drawable.ic_person_profile)
.build());

MaterialAboutCard.Builder descriptionCard = new MaterialAboutCard.Builder();
descriptionCard.title("Description");
descriptionCard.addItem(new MaterialAboutActionItem.Builder()
.text("Verify is an Android application that imports a list of entries, scans barcodes, and " +
"identifies whether it exists in the list of entries along with audio/visual notifications.").build());

return new MaterialAboutList(appCardBuilder.build(),authorCardBuilder.build(), descriptionCard.build());
}

@Nullable
@Override
protected CharSequence getActivityTitle() {
return "About";
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
progress = new CircularProgressDrawable(this);
progress.setStyle(CircularProgressDrawable.DEFAULT);
progress.start();
}
}
Loading

0 comments on commit d8ec9fe

Please sign in to comment.