From 457aeeabf39a6e4c8a80c917b8101fd5658a41a7 Mon Sep 17 00:00:00 2001 From: Siddharth Malladi Date: Thu, 14 Dec 2023 10:02:54 -0800 Subject: [PATCH 1/2] Revamp UI: Add bottom toolbar, update settings, modify main screen, rename app --- .../org/phenoapps/verify/MainActivity.java | 344 ++++++------------ .../phenoapps/verify/SettingsActivity.java | 4 + .../phenoapps/verify/SettingsFragment.java | 91 +++++ .../java/org/phenoapps/verify/UriHandler.java | 2 +- app/src/main/res/drawable-anydpi/ic_home.xml | 16 + app/src/main/res/drawable-hdpi/ic_home.png | Bin 0 -> 355 bytes .../res/drawable-hdpi/ic_import_white.png | Bin 0 -> 4427 bytes .../main/res/drawable-hdpi/ic_settings.png | Bin 561 -> 4511 bytes app/src/main/res/drawable-mdpi/ic_home.png | Bin 0 -> 253 bytes .../res/drawable-mdpi/ic_import_white.png | Bin 0 -> 4427 bytes .../main/res/drawable-mdpi/ic_settings.png | Bin 383 -> 4511 bytes app/src/main/res/drawable-xhdpi/ic_home.png | Bin 0 -> 432 bytes .../res/drawable-xhdpi/ic_import_white.png | Bin 0 -> 4427 bytes .../main/res/drawable-xhdpi/ic_settings.png | Bin 677 -> 4511 bytes app/src/main/res/drawable-xxhdpi/ic_home.png | Bin 0 -> 627 bytes .../res/drawable-xxhdpi/ic_import_white.png | Bin 0 -> 4427 bytes .../main/res/drawable-xxhdpi/ic_settings.png | Bin 1031 -> 4511 bytes .../main/res/layout-land/activity_main.xml | 26 +- .../main/res/layout-xlarge/activity_main.xml | 26 +- app/src/main/res/layout/activity_main.xml | 62 ++-- .../res/menu/activity_main_bottom_toolbar.xml | 23 ++ .../main/res/menu/activity_main_toolbar.xml | 14 +- app/src/main/res/xml/preferences.xml | 9 + 23 files changed, 345 insertions(+), 272 deletions(-) create mode 100644 app/src/main/res/drawable-anydpi/ic_home.xml create mode 100644 app/src/main/res/drawable-hdpi/ic_home.png create mode 100644 app/src/main/res/drawable-hdpi/ic_import_white.png create mode 100644 app/src/main/res/drawable-mdpi/ic_home.png create mode 100644 app/src/main/res/drawable-mdpi/ic_import_white.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_home.png create mode 100644 app/src/main/res/drawable-xhdpi/ic_import_white.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_home.png create mode 100644 app/src/main/res/drawable-xxhdpi/ic_import_white.png create mode 100644 app/src/main/res/menu/activity_main_bottom_toolbar.xml diff --git a/app/src/main/java/org/phenoapps/verify/MainActivity.java b/app/src/main/java/org/phenoapps/verify/MainActivity.java index c9d424b..f98a6e9 100644 --- a/app/src/main/java/org/phenoapps/verify/MainActivity.java +++ b/app/src/main/java/org/phenoapps/verify/MainActivity.java @@ -19,6 +19,9 @@ import androidx.annotation.NonNull; import com.google.android.material.navigation.NavigationView; + +import androidx.appcompat.widget.ActionMenuView; +import androidx.appcompat.widget.Toolbar; import androidx.core.app.ActivityCompat; import androidx.core.view.GravityCompat; import androidx.drawerlayout.widget.DrawerLayout; @@ -34,6 +37,7 @@ import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; +import android.view.ViewGroup; import android.view.inputmethod.InputMethodManager; import android.widget.AbsListView; import android.widget.AdapterView; @@ -72,9 +76,6 @@ public class MainActivity extends AppCompatActivity { private SparseArray mIds; - //Verify UI variables - private ActionBarDrawerToggle mDrawerToggle; - //global variable to track matching order private int mMatchingOrder; @@ -86,6 +87,8 @@ public class MainActivity extends AppCompatActivity { private String mFileName = ""; + private Toolbar navigationToolBar; + @Override protected void onCreate(Bundle savedInstanceState) { @@ -97,29 +100,29 @@ protected void onCreate(Bundle savedInstanceState) { SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); - final View auxInfo = findViewById(R.id.auxScrollView); - final View auxValue = findViewById(R.id.auxValueView); +final View auxInfo = findViewById(R.id.auxScrollView); +final View auxValue = findViewById(R.id.auxValueView); if (sharedPref.getBoolean(SettingsActivity.AUX_INFO, false)) { - auxInfo.setVisibility(View.VISIBLE); - auxValue.setVisibility(View.VISIBLE); +auxInfo.setVisibility(View.VISIBLE); +auxValue.setVisibility(View.VISIBLE); } else { - auxInfo.setVisibility(View.GONE); - auxValue.setVisibility(View.GONE); - } +auxInfo.setVisibility(View.GONE); +auxValue.setVisibility(View.GONE); +} mPrefListener = new SharedPreferences.OnSharedPreferenceChangeListener() { @Override public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String s) { - if (sharedPreferences.getBoolean(SettingsActivity.AUX_INFO, false)) { - auxInfo.setVisibility(View.VISIBLE); - auxValue.setVisibility(View.VISIBLE); - } else { - auxInfo.setVisibility(View.GONE); - auxValue.setVisibility(View.GONE); - } +if (sharedPreferences.getBoolean(SettingsActivity.AUX_INFO, false)) { +auxInfo.setVisibility(View.VISIBLE); +auxValue.setVisibility(View.VISIBLE); +} else { +auxInfo.setVisibility(View.GONE); +auxValue.setVisibility(View.GONE); +} } }; @@ -208,18 +211,11 @@ private void prepareStatements() { private void initializeUIVariables() { if (getSupportActionBar() != null){ - getSupportActionBar().setTitle(null); + getSupportActionBar().setTitle("CheckList"); getSupportActionBar().getThemedContext(); - getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setHomeButtonEnabled(true); } - final NavigationView nvDrawer = (NavigationView) findViewById(R.id.nvView); - - // Setup drawer view - setupDrawerContent(nvDrawer); - setupDrawer(); - final EditText scannerTextView = ((EditText) findViewById(R.id.scannerTextView)); scannerTextView.setSelectAllOnFocus(true); scannerTextView.setOnKeyListener(new View.OnKeyListener() { @@ -237,25 +233,25 @@ public boolean onKey(View v, int keyCode, KeyEvent event) { ListView idTable = ((ListView) findViewById(R.id.idTable)); idTable.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE); - idTable.setOnItemClickListener(new AdapterView.OnItemClickListener() { +idTable.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView parent, View view, int position, long id) { - scannerTextView.setText(((TextView) view).getText().toString()); +scannerTextView.setText(((TextView) view).getText().toString()); scannerTextView.setSelection(scannerTextView.getText().length()); scannerTextView.requestFocus(); scannerTextView.selectAll(); checkScannedItem(); - } + } }); - idTable.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { - @Override - public boolean onItemLongClick(AdapterView parent, View view, int position, long id) { - //get app settings - insertNoteIntoDb(((TextView) view).getText().toString()); - return true; - } +idTable.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { +@Override +public boolean onItemLongClick(AdapterView parent, View view, int position, long id) { +//get app settings +insertNoteIntoDb(((TextView) view).getText().toString()); +return true; +} }); TextView valueView = (TextView) findViewById(R.id.valueView); @@ -273,7 +269,7 @@ private synchronized void checkScannedItem() { SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(MainActivity.this); int scanMode = Integer.valueOf(sharedPref.getString(SettingsActivity.SCAN_MODE_LIST, "-1")); - boolean displayAux = sharedPref.getBoolean(SettingsActivity.AUX_INFO, true); +boolean displayAux = sharedPref.getBoolean(SettingsActivity.AUX_INFO, true); String scannedId = ((EditText) findViewById(org.phenoapps.verify.R.id.scannerTextView)) .getText().toString(); @@ -318,10 +314,10 @@ private synchronized void checkScannedItem() { } } } - cursor.close(); - ((TextView) findViewById(org.phenoapps.verify.R.id.valueView)).setText(values.toString()); - ((TextView) findViewById(R.id.auxValueView)).setText(auxValues.toString()); - ((EditText) findViewById(R.id.scannerTextView)).setText(""); + cursor.close(); +((TextView) findViewById(org.phenoapps.verify.R.id.valueView)).setText(values.toString()); +((TextView) findViewById(R.id.auxValueView)).setText(auxValues.toString()); +((EditText) findViewById(R.id.scannerTextView)).setText(""); } else { if (scanMode != 2) { ringNotification(false); @@ -808,6 +804,19 @@ final public boolean onCreateOptionsMenu(Menu m) { final MenuInflater inflater = getMenuInflater(); inflater.inflate(org.phenoapps.verify.R.menu.activity_main_toolbar, m); + + ActionMenuView bottomToolBar = (ActionMenuView) findViewById(R.id.bottom_toolbar); + Menu bottomMenu = bottomToolBar.getMenu(); + inflater.inflate(R.menu.activity_main_bottom_toolbar, bottomMenu); + + for (int i = 0; i < bottomMenu.size(); i++) { + bottomMenu.getItem(i).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() { + @Override + public boolean onMenuItemClick(MenuItem item) { + return onOptionsItemSelected(item); + } + }); + } return true; } @@ -815,25 +824,81 @@ final public boolean onCreateOptionsMenu(Menu m) { final public boolean onOptionsItemSelected(MenuItem item) { DrawerLayout dl = (DrawerLayout) findViewById(R.id.drawer_layout); int actionCamera = R.id.action_camera; - int actionCompare = R.id.action_compare; - if (mDrawerToggle.onOptionsItemSelected(item)) { - return true; - } + int actionImport = R.id.action_import; + int actionHome = R.id.Home; + int actionCompare = R.id.Compare; + int actionSettings = R.id.Settings; + + if (item.getItemId() == actionImport){ + final SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(MainActivity.this); + final int scanMode = Integer.valueOf(sharedPref.getString(SettingsActivity.SCAN_MODE_LIST, "-1")); + final Intent i; + File verifyDirectory = new File(getExternalFilesDir(null), "/Verify"); + + File[] files = verifyDirectory.listFiles(); + + + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setTitle("Select files from?"); + builder.setPositiveButton("Storage", + new DialogInterface.OnClickListener() + { + public void onClick(DialogInterface dialog, int id) + { + Intent i; + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) { + i = new Intent(Intent.ACTION_OPEN_DOCUMENT); + }else{ + i = new Intent(Intent.ACTION_GET_CONTENT); + } + i.setType("*/*"); + startActivityForResult(Intent.createChooser(i, "Choose file to import."), VerifyConstants.DEFAULT_CONTENT_REQ); + } + }); + + builder.setNegativeButton("Verify Directory", + new DialogInterface.OnClickListener() + { + public void onClick(DialogInterface dialog, int id) + { + + AlertDialog.Builder fileBuilder = new AlertDialog.Builder(MainActivity.this); + fileBuilder.setTitle("Select the sample file"); + final int[] checkedItem = {-1}; + String[] listItems = verifyDirectory.list(); + fileBuilder.setSingleChoiceItems(listItems, checkedItem[0],(fileDialog, which) -> { + checkedItem[0] = which; + + Intent i = new Intent(MainActivity.this, LoaderDBActivity.class); + i.setData(Uri.fromFile(files[which])); + startActivityForResult(i, VerifyConstants.LOADER_INTENT_REQ); + fileDialog.dismiss(); + }); + + fileBuilder.show(); - if (item.getItemId() == android.R.id.home){ + } + }); + builder.show(); + } else if (item.getItemId() == android.R.id.home){ dl.openDrawer(GravityCompat.START); } - else if(item.getItemId() == actionCamera){ - final Intent cameraIntent = new Intent(this, ScanActivity.class); - startActivityForResult(cameraIntent, VerifyConstants.CAMERA_INTENT_REQ); + else if (item.getItemId() == actionHome){ + } - else if(item.getItemId() == actionCompare){ + else if ( item.getItemId() == actionCompare) { final Intent compareIntent = new Intent(MainActivity.this, CompareActivity.class); runOnUiThread(new Runnable() { @Override public void run() { startActivity(compareIntent); } }); + } else if (item.getItemId() == actionSettings) { + final Intent settingsIntent = new Intent(this, SettingsActivity.class); + startActivityForResult(settingsIntent, VerifyConstants.SETTINGS_INTENT_REQ); + } else if(item.getItemId() == actionCamera){ + final Intent cameraIntent = new Intent(this, ScanActivity.class); + startActivityForResult(cameraIntent, VerifyConstants.CAMERA_INTENT_REQ); } else{ return super.onOptionsItemSelected(item); @@ -912,131 +977,23 @@ final protected void onActivityResult(int requestCode, int resultCode, Intent in private void buildListView() { ListView idTable = (ListView) findViewById(org.phenoapps.verify.R.id.idTable); - ArrayAdapter idAdapter = - new ArrayAdapter<>(this, org.phenoapps.verify.R.layout.row); +ArrayAdapter idAdapter = +new ArrayAdapter<>(this, org.phenoapps.verify.R.layout.row); int size = mIds.size(); for (int i = 0; i < size; i++) { - idAdapter.add(this.mIds.get(this.mIds.keyAt(i))); +idAdapter.add(this.mIds.get(this.mIds.keyAt(i))); } - idTable.setAdapter(idAdapter); +idTable.setAdapter(idAdapter); } private void clearListView() { ListView idTable = (ListView) findViewById(org.phenoapps.verify.R.id.idTable); - final ArrayAdapter adapter = - new ArrayAdapter<>(this, org.phenoapps.verify.R.layout.row); +final ArrayAdapter adapter = +new ArrayAdapter<>(this, org.phenoapps.verify.R.layout.row); idTable.setAdapter(adapter); - adapter.notifyDataSetChanged(); - } - - private void setupDrawer() { - - DrawerLayout dl = (DrawerLayout) findViewById(org.phenoapps.verify.R.id.drawer_layout); - mDrawerToggle = new ActionBarDrawerToggle(this, dl, - org.phenoapps.verify.R.string.drawer_open, org.phenoapps.verify.R.string.drawer_close) { - - public void onDrawerOpened(View drawerView) { - View view = MainActivity.this.getCurrentFocus(); - if (view != null) { - InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); - imm.hideSoftInputFromWindow(view.getWindowToken(), 0); - } - } - - public void onDrawerClosed(View view) { - } - - }; - - mDrawerToggle.setDrawerIndicatorEnabled(true); - dl.addDrawerListener(mDrawerToggle); - } - - private void setupDrawerContent(NavigationView navigationView) { - navigationView.setNavigationItemSelectedListener( - new NavigationView.OnNavigationItemSelectedListener() { - @Override - public boolean onNavigationItemSelected(@NonNull MenuItem menuItem) { - selectDrawerItem(menuItem); - return true; - } - }); - } - - private void selectDrawerItem(MenuItem menuItem) { - int itemId = menuItem.getItemId(); - // constants like id in R class are no longer final, thus can't use switch here - - if (itemId == R.id.nav_import){ - final SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(MainActivity.this); - final int scanMode = Integer.valueOf(sharedPref.getString(SettingsActivity.SCAN_MODE_LIST, "-1")); - final Intent i; - File verifyDirectory = new File(getExternalFilesDir(null), "/Verify"); - - File[] files = verifyDirectory.listFiles(); - - - AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.setTitle("Select files from?"); - builder.setPositiveButton("Storage", - new DialogInterface.OnClickListener() - { - public void onClick(DialogInterface dialog, int id) - { - Intent i; - if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) { - i = new Intent(Intent.ACTION_OPEN_DOCUMENT); - }else{ - i = new Intent(Intent.ACTION_GET_CONTENT); - } - i.setType("*/*"); - startActivityForResult(Intent.createChooser(i, "Choose file to import."), VerifyConstants.DEFAULT_CONTENT_REQ); - } - }); - - builder.setNegativeButton("Verify Directory", - new DialogInterface.OnClickListener() - { - public void onClick(DialogInterface dialog, int id) - { - - AlertDialog.Builder fileBuilder = new AlertDialog.Builder(MainActivity.this); - fileBuilder.setTitle("Select the sample file"); - final int[] checkedItem = {-1}; - String[] listItems = verifyDirectory.list(); - fileBuilder.setSingleChoiceItems(listItems, checkedItem[0],(fileDialog, which) -> { - checkedItem[0] = which; - - Intent i = new Intent(MainActivity.this, LoaderDBActivity.class); - i.setData(Uri.fromFile(files[which])); - startActivityForResult(i, VerifyConstants.LOADER_INTENT_REQ); - fileDialog.dismiss(); - }); - - fileBuilder.show(); - - } - }); - builder.show(); - } else if (itemId == R.id.nav_settings) { - final Intent settingsIntent = new Intent(this, SettingsActivity.class); - startActivityForResult(settingsIntent, VerifyConstants.SETTINGS_INTENT_REQ); - } else if (itemId == R.id.nav_export) { - askUserExportFileName(); - } else if (itemId == R.id.nav_about) { - showAboutDialog(); - } else if (itemId == R.id.nav_intro) { - final Intent intro_intent = new Intent(MainActivity.this, IntroActivity.class); - runOnUiThread(new Runnable() { - @Override public void run() { - startActivity(intro_intent); - } - }); - } - DrawerLayout dl = (DrawerLayout) findViewById(org.phenoapps.verify.R.id.drawer_layout); - dl.closeDrawers(); +adapter.notifyDataSetChanged(); } private void showPairDialog() { @@ -1065,73 +1022,14 @@ public void onClick(DialogInterface dialogInterface, int i) { builder.show(); } - private void showAboutDialog() - { - android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(this); - { - android.view.View personView = this.getLayoutInflater().inflate( - org.phenoapps.verify.R.layout.about, new android.widget.LinearLayout(this), - false); - - { - assert personView != null; - android.widget.TextView versionTextView = (android.widget.TextView) - personView.findViewById(org.phenoapps.verify.R.id.tvVersion); - try - { - android.content.pm.PackageInfo packageInfo = - this.getPackageManager().getPackageInfo(this.getPackageName(), 0); - assert packageInfo != null; - assert versionTextView != null; - versionTextView.setText(this.getResources().getString( - org.phenoapps.verify.R.string.versiontitle) + - ' ' + packageInfo.versionName); - } - catch (android.content.pm.PackageManager.NameNotFoundException e) - { e.printStackTrace(); } - versionTextView.setOnClickListener(new android.view.View.OnClickListener() - { - @java.lang.Override - public void onClick(android.view.View v) - { MainActivity.this.showChangeLog(); } - }); - } - - builder.setCancelable(true); - builder.setTitle (this.getResources().getString( - org.phenoapps.verify.R.string.about)); - builder.setView(personView); - } - - builder.setNegativeButton( - this.getResources().getString(org.phenoapps.verify.R.string.ok), - new android.content.DialogInterface.OnClickListener() - { - @java.lang.Override - public void onClick(android.content.DialogInterface dialog, int which) - { - assert dialog != null; - dialog.dismiss(); - } - }); - - builder.show(); - } - - private void showChangeLog() { - - } - @Override final protected void onPostCreate(Bundle savedInstanceState) { super.onPostCreate(savedInstanceState); - mDrawerToggle.syncState(); } @Override final public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); - mDrawerToggle.onConfigurationChanged(newConfig); } private void launchIntro() { diff --git a/app/src/main/java/org/phenoapps/verify/SettingsActivity.java b/app/src/main/java/org/phenoapps/verify/SettingsActivity.java index fb5a18f..f12ff6e 100644 --- a/app/src/main/java/org/phenoapps/verify/SettingsActivity.java +++ b/app/src/main/java/org/phenoapps/verify/SettingsActivity.java @@ -8,6 +8,10 @@ public class SettingsActivity extends AppCompatActivity { public static String FILE_NAME = "org.phenoapps.verify.FILE_NAME"; + public static String INTRO_BUTTON = "org.phenoapps.verify.INTRO"; + + public static String ABOUT_BUTTON = "org.phenoapps.verify.ABOUT"; + public static String SCAN_MODE_LIST = "org.phenoapps.verify.SCAN_MODE"; public static String AUDIO_ENABLED = "org.phenoapps.verify.AUDIO_ENABLED"; public static String TUTORIAL_MODE = "org.phenoapps.verify.TUTORIAL_MODE"; diff --git a/app/src/main/java/org/phenoapps/verify/SettingsFragment.java b/app/src/main/java/org/phenoapps/verify/SettingsFragment.java index 577aa32..89c8970 100644 --- a/app/src/main/java/org/phenoapps/verify/SettingsFragment.java +++ b/app/src/main/java/org/phenoapps/verify/SettingsFragment.java @@ -1,14 +1,78 @@ package org.phenoapps.verify; +import android.content.Context; +import android.content.Intent; import android.content.SharedPreferences; +import android.os.Build; import android.os.Bundle; import android.preference.ListPreference; import android.preference.Preference; import android.preference.PreferenceFragment; import android.widget.Toast; +import java.util.prefs.Preferences; + public class SettingsFragment extends PreferenceFragment { + + private void showChangeLog() { + + } + private void showAboutDialog(Context ctx) + { + android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(ctx); + { + android.view.View personView = null; + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { + personView = getLayoutInflater().inflate( + R.layout.about, new android.widget.LinearLayout(ctx), + false); + } + { + assert personView != null; + android.widget.TextView versionTextView = (android.widget.TextView) + personView.findViewById(org.phenoapps.verify.R.id.tvVersion); + try + { + android.content.pm.PackageInfo packageInfo = + ctx.getPackageManager().getPackageInfo(ctx.getPackageName(), 0); + assert packageInfo != null; + assert versionTextView != null; + versionTextView.setText(this.getResources().getString( + org.phenoapps.verify.R.string.versiontitle) + + ' ' + packageInfo.versionName); + } + catch (android.content.pm.PackageManager.NameNotFoundException e) + { e.printStackTrace(); } + versionTextView.setOnClickListener(new android.view.View.OnClickListener() + { + @java.lang.Override + public void onClick(android.view.View v) + { showChangeLog(); } + }); + } + + builder.setCancelable(true); + builder.setTitle (this.getResources().getString( + org.phenoapps.verify.R.string.about)); + builder.setView(personView); + } + + builder.setNegativeButton( + this.getResources().getString(org.phenoapps.verify.R.string.ok), + new android.content.DialogInterface.OnClickListener() + { + @java.lang.Override + public void onClick(android.content.DialogInterface dialog, int which) + { + assert dialog != null; + dialog.dismiss(); + } + }); + + builder.show(); + } + @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -17,7 +81,34 @@ public void onCreate(Bundle savedInstanceState) { final SharedPreferences sharedPrefs = super.getPreferenceManager().getSharedPreferences(); ListPreference mode = (ListPreference) findPreference(SettingsActivity.SCAN_MODE_LIST); + Preference introButton = (Preference) findPreference(SettingsActivity.INTRO_BUTTON); + Preference aboutButton = (Preference) findPreference(SettingsActivity.ABOUT_BUTTON); + aboutButton.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { + @Override + public boolean onPreferenceClick(Preference preference) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + showAboutDialog(getContext()); + } + return true; + } + }); + + introButton.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { + @Override + public boolean onPreferenceClick(Preference preference) { + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) { + final Intent intro_intent = new Intent(getContext(), IntroActivity.class); + getActivity().runOnUiThread(new Runnable() { + @Override + public void run() { + startActivity(intro_intent); + } + }); + } + return true; + } + }); mode.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() { //check if Pair mode is chosen, if it's disabled then show a message and switch //back to default mode. diff --git a/app/src/main/java/org/phenoapps/verify/UriHandler.java b/app/src/main/java/org/phenoapps/verify/UriHandler.java index 51c7d5f..851c11c 100644 --- a/app/src/main/java/org/phenoapps/verify/UriHandler.java +++ b/app/src/main/java/org/phenoapps/verify/UriHandler.java @@ -55,7 +55,7 @@ public static String getFileName(@NonNull Context context, Uri uri) { return fileName; } -//test + /** * Returns the effective file name from the provided Uri. * @param fileName diff --git a/app/src/main/res/drawable-anydpi/ic_home.xml b/app/src/main/res/drawable-anydpi/ic_home.xml new file mode 100644 index 0000000..3eb8fe0 --- /dev/null +++ b/app/src/main/res/drawable-anydpi/ic_home.xml @@ -0,0 +1,16 @@ + + + + + diff --git a/app/src/main/res/drawable-hdpi/ic_home.png b/app/src/main/res/drawable-hdpi/ic_home.png new file mode 100644 index 0000000000000000000000000000000000000000..bfbbd81b83105cbc3ef8be432f545087686b4e34 GIT binary patch literal 355 zcmV-p0i6DcP)~RN!c(+cMusjGQdde8!8@6=z$jdlIgy6X-<4C~)@3ba_ zy^9h|#(TkqkO5eV@J+nh9rg(#7@vT(2=$SHQ}$~l7@mP#gjL1vUa;>@g3$*Hi zk1_k#5)7_{aZ{$8Q%P976K0{f=e(`L!hF?^_>6!002ovPDHLkV1g_o Bq#6JK literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/ic_import_white.png b/app/src/main/res/drawable-hdpi/ic_import_white.png new file mode 100644 index 0000000000000000000000000000000000000000..f90b07ad7594e9ac654b0fd7c63b9f4538cf07e6 GIT binary patch literal 4427 zcmeHKdr%X19$%uK$sl z&F+35pWpZU`F?-j*Sf6%w8bok^$K3 z<5|wdz+$PFfteu3LQwF6+jeo{NmTa3!>I{v-g9l&QmwQ6>)%@LGQVRtRK2bj$DQph zZ9Pj>TB_g4EN;-e@Sf$Gr;5$0`(4w*^chiE56g(?Lz8Eps4Lw4bZ^JZuHP@sSI&Df z!Etnob>8xd4d9`qhv-#WdeGrv0t zy$#cMD<45|zuMp#vn$D}eP1I^{bXO>ug}lzz4XtFCy{rrygL1u=gL1IC}IO=G}b{2c4X~`d^6-(=nMcf3PqSkbj_5 zI+oZ_`(bMF^;yN8TU*iEjwRcha|BuRY)ABD(@T5b-GI4H6@6nlu;tyJ!<#FUuOBa3+w|?4&V-e>Z(hdF^p->Va^IF473z;b-vv3)Uj^2M1jW0RB+WY* zWzg*fjR!$#=|L|^6*D62V4R%CAiv$xDu+4RAYY=fqE@ewDdNm!J|?d$$4-?MQ+isS zJ|`wENB{sgBa(2??eYjj&>#=t65v@9BXT%oA{HCu1y&nuuqnOMR#v>*Vg`lYcf3M%?3Z+9+2;*Yhz*GRMs)j9@WwF`@JR}O7 zoZB1n0%Q-f6ghT~tYNW9nov4J0|D*>xWlaba}OBslZkD?f(&}cO}g<7k3DD;eqRp1P*V=y&^(>l!%D2qoBNe{(HPyk%X0US!F!L=Ch zA!&+HsC8Oa;ZSL51*)NNoYk=y%VI+y7Wp{Pm85HER1y>opmel`!cZ-xz%U(%Mu*Z0 z(xFBH6pJ|+N~6PYT?mS%i21zFO@eZAZqmshUXL@RkO(K{+AIb+rbGuNHWw+fz`-D2 z$a(z1L4}=jGkGE@v8mFbDh;YpYqU6u>s0DNqkP6EfKHS!Rj3m0(@13@Kr(<>QtDFx z5b^-I5Jn$EioDOx^Dcv23JI1x2h>)uooG@dO{B;GP!z)n6-J<#U4;`GHK9_apc(=n zV$ahYTl&AOrOgAU^_ASr31I!wkf?7*Le#A*y$Y98j z0e*clFucGlLTPna)wAcKq072uYNLK_@QyT|_ zQKH3~8Fgbqq%1C0-?3&J5Z$ww=Guc7ZeGluv>u(1(e~oi-X$dn6mj3^!ua#kYW_H* zvFm>IFD=z2D_1AYH_fj4s_^Bph0|`x{?ztdvOoSB6!E0-X2+$T=w;`H{cuJl6cIT_ z7F+*a)S>H3Z29lm(+~W{y!6n{6uG>k`?tQWfBm5PY-f8D{D)&_oEZx$Ce^%YzgnL< zg=_Gw*yRtTXjXplDDv|&jzIEr`E}#OhjYHZGId9LV|U8I#{En6?Q7XZ4-#?~*Ux?$ z?N3eL(SGZrF4v-JF=da;_BZDiBL3v8a0KQ(2hS}|X&p+VI>z9we d4HB8O`k9{Yf}pRU`+&rlB{Rp=IB&(e{{r%cN#g(j literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-hdpi/ic_settings.png b/app/src/main/res/drawable-hdpi/ic_settings.png index 4cb8e41bfb6a23af97eca06167002f9f3e2466e6..bda5e854555c9d00cfab623cc26b1e8c7d032800 100644 GIT binary patch literal 4511 zcmeHKeNYo;8V`aJ5oqL8RIs-$*H+YIlifg)m8g&)1Pn&xL(2KF*?kjM$OqZQ1pGiN z=VvP-*H#e~to67mj#aFPUvNNm^c=mj);p&37}TqCO0`gjyQ=lx4Tv!9%#AbG|H#Z{ z-}m|Wz0dP|pZA%4x0q5Af&wN7h(w|wL!v$vz7vHefN89 z$=&I@0*lX0%J-|={`UFch_HDbl5Tm8B4hfYp28B4oS758g0FaTepCIm^XCe>iyO~Q zjnMdp1XWFud@|-iWrwlQt_`&|ZrqLCVHeE0_uAv$tOzV@eT_)uQ^M+WCWB7*A|04S z<(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$Afxb8T7u^?%y3%^b_bG22WQ%mvv4FO#oC~ BWc2_5 literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_import_white.png b/app/src/main/res/drawable-mdpi/ic_import_white.png new file mode 100644 index 0000000000000000000000000000000000000000..f90b07ad7594e9ac654b0fd7c63b9f4538cf07e6 GIT binary patch literal 4427 zcmeHKdr%X19$%uK$sl z&F+35pWpZU`F?-j*Sf6%w8bok^$K3 z<5|wdz+$PFfteu3LQwF6+jeo{NmTa3!>I{v-g9l&QmwQ6>)%@LGQVRtRK2bj$DQph zZ9Pj>TB_g4EN;-e@Sf$Gr;5$0`(4w*^chiE56g(?Lz8Eps4Lw4bZ^JZuHP@sSI&Df z!Etnob>8xd4d9`qhv-#WdeGrv0t zy$#cMD<45|zuMp#vn$D}eP1I^{bXO>ug}lzz4XtFCy{rrygL1u=gL1IC}IO=G}b{2c4X~`d^6-(=nMcf3PqSkbj_5 zI+oZ_`(bMF^;yN8TU*iEjwRcha|BuRY)ABD(@T5b-GI4H6@6nlu;tyJ!<#FUuOBa3+w|?4&V-e>Z(hdF^p->Va^IF473z;b-vv3)Uj^2M1jW0RB+WY* zWzg*fjR!$#=|L|^6*D62V4R%CAiv$xDu+4RAYY=fqE@ewDdNm!J|?d$$4-?MQ+isS zJ|`wENB{sgBa(2??eYjj&>#=t65v@9BXT%oA{HCu1y&nuuqnOMR#v>*Vg`lYcf3M%?3Z+9+2;*Yhz*GRMs)j9@WwF`@JR}O7 zoZB1n0%Q-f6ghT~tYNW9nov4J0|D*>xWlaba}OBslZkD?f(&}cO}g<7k3DD;eqRp1P*V=y&^(>l!%D2qoBNe{(HPyk%X0US!F!L=Ch zA!&+HsC8Oa;ZSL51*)NNoYk=y%VI+y7Wp{Pm85HER1y>opmel`!cZ-xz%U(%Mu*Z0 z(xFBH6pJ|+N~6PYT?mS%i21zFO@eZAZqmshUXL@RkO(K{+AIb+rbGuNHWw+fz`-D2 z$a(z1L4}=jGkGE@v8mFbDh;YpYqU6u>s0DNqkP6EfKHS!Rj3m0(@13@Kr(<>QtDFx z5b^-I5Jn$EioDOx^Dcv23JI1x2h>)uooG@dO{B;GP!z)n6-J<#U4;`GHK9_apc(=n zV$ahYTl&AOrOgAU^_ASr31I!wkf?7*Le#A*y$Y98j z0e*clFucGlLTPna)wAcKq072uYNLK_@QyT|_ zQKH3~8Fgbqq%1C0-?3&J5Z$ww=Guc7ZeGluv>u(1(e~oi-X$dn6mj3^!ua#kYW_H* zvFm>IFD=z2D_1AYH_fj4s_^Bph0|`x{?ztdvOoSB6!E0-X2+$T=w;`H{cuJl6cIT_ z7F+*a)S>H3Z29lm(+~W{y!6n{6uG>k`?tQWfBm5PY-f8D{D)&_oEZx$Ce^%YzgnL< zg=_Gw*yRtTXjXplDDv|&jzIEr`E}#OhjYHZGId9LV|U8I#{En6?Q7XZ4-#?~*Ux?$ z?N3eL(SGZrF4v-JF=da;_BZDiBL3v8a0KQ(2hS}|X&p+VI>z9we d4HB8O`k9{Yf}pRU`+&rlB{Rp=IB&(e{{r%cN#g(j literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-mdpi/ic_settings.png b/app/src/main/res/drawable-mdpi/ic_settings.png index cf6c63e77bd1d3b919ab8e8b1882df7af687feb7..bda5e854555c9d00cfab623cc26b1e8c7d032800 100644 GIT binary patch literal 4511 zcmeHKeNYo;8V`aJ5oqL8RIs-$*H+YIlifg)m8g&)1Pn&xL(2KF*?kjM$OqZQ1pGiN z=VvP-*H#e~to67mj#aFPUvNNm^c=mj);p&37}TqCO0`gjyQ=lx4Tv!9%#AbG|H#Z{ z-}m|Wz0dP|pZA%4x0q5Af&wN7h(w|wL!v$vz7vHefN89 z$=&I@0*lX0%J-|={`UFch_HDbl5Tm8B4hfYp28B4oS758g0FaTepCIm^XCe>iyO~Q zjnMdp1XWFud@|-iWrwlQt_`&|ZrqLCVHeE0_uAv$tOzV@eT_)uQ^M+WCWB7*A|04S z<(e{WV)NYa)@6(0%RUHRDajY7?wz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+isS zJ|`wENB{sgBa(2??eYjj&>#=t65v@9BXT%oA{HCu1y&nuuqnOMR#v>*Vg`lYcf3M%?3Z+9+2;*Yhz*GRMs)j9@WwF`@JR}O7 zoZB1n0%Q-f6ghT~tYNW9nov4J0|D*>xWlaba}OBslZkD?f(&}cO}g<7k3DD;eqRp1P*V=y&^(>l!%D2qoBNe{(HPyk%X0US!F!L=Ch zA!&+HsC8Oa;ZSL51*)NNoYk=y%VI+y7Wp{Pm85HER1y>opmel`!cZ-xz%U(%Mu*Z0 z(xFBH6pJ|+N~6PYT?mS%i21zFO@eZAZqmshUXL@RkO(K{+AIb+rbGuNHWw+fz`-D2 z$a(z1L4}=jGkGE@v8mFbDh;YpYqU6u>s0DNqkP6EfKHS!Rj3m0(@13@Kr(<>QtDFx z5b^-I5Jn$EioDOx^Dcv23JI1x2h>)uooG@dO{B;GP!z)n6-J<#U4;`GHK9_apc(=n zV$ahYTl&AOrOgAU^_ASr31I!wkf?7*Le#A*y$Y98j z0e*clFucGlLTPna)wAcKq072uYNLK_@QyT|_ zQKH3~8Fgbqq%1C0-?3&J5Z$ww=Guc7ZeGluv>u(1(e~oi-X$dn6mj3^!ua#kYW_H* zvFm>IFD=z2D_1AYH_fj4s_^Bph0|`x{?ztdvOoSB6!E0-X2+$T=w;`H{cuJl6cIT_ z7F+*a)S>H3Z29lm(+~W{y!6n{6uG>k`?tQWfBm5PY-f8D{D)&_oEZx$Ce^%YzgnL< zg=_Gw*yRtTXjXplDDv|&jzIEr`E}#OhjYHZGId9LV|U8I#{En6?Q7XZ4-#?~*Ux?$ z?N3eL(SGZrF4v-JF=da;_BZDiBL3v8a0KQ(2hS}|X&p+VI>z9we d4HB8O`k9{Yf}pRU`+&rlB{Rp=IB&(e{{r%cN#g(j literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xhdpi/ic_settings.png b/app/src/main/res/drawable-xhdpi/ic_settings.png index 31709168d68785fdb65de7f2c439be8d1ac83e31..bda5e854555c9d00cfab623cc26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hV`2d581{EaAS89j_NSK)Hecyxa{k zkDqycy}q39A2=pe6zFCMbgC%O$PlPg^)u@kA^BtLL$@Vh37E$(b_9MwrgewN00000 LNkvXXu0mjfe-Ri} diff --git a/app/src/main/res/drawable-xxhdpi/ic_home.png b/app/src/main/res/drawable-xxhdpi/ic_home.png new file mode 100644 index 0000000000000000000000000000000000000000..35d7634bb2283707570d0b6bfd00f3e30a84e22a GIT binary patch literal 627 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY1|&n@Zgyv2V6yUbaSW-5dpl#V7jvLU%VIGn zl~9l6b9;OJ7tDRadMT=7Ut^h_;{mtbCT3wPw`|@VBygoX>iG|5t2q@(n`YnHZOt4% zdGGf*GaDzUuAQcG)y*|9NAl0kE59_-`S;XqJbqqUSEPvJUWc>Yb&rJ|3xm&@JKNpY zSlHmbT;$oL_ohx9c4en#9GUU{dKkxUHn}-MN^j0donJjwU<32KIUg=3m0R0v7jxRs z`{=X!9OwVyvo{|6yjhItt(D{R)al<-G+AzzADVj9?)_;m4g-x-KcjpPrSVtfi#2^L zRu2fB^Z8#2>t^i-$2bE`w-vYkRZ*X@r}T_|SM;~ZJqdZDcdVC*_f|%v)_aTcthIKV ze%9)DOjp7Z?s>A!r;pi`-hA)G%53er)&BA4qdVdgrH2j)A9r~* zr=ZWP#Wnrhrx=UJHcPp<-OgRQBT=|+XK2m7$9F7G7aiR+<@36f<^zj2tCZ_pu2D^N z_?<1lzn**A+Os>C3+d%qF~2^g_WXbFjtk8C=N9ZrimblVtSw`sajDLF9oOla1GRsI z_+%`_XCD*%{z=hhM**MtRBpZJr!23OtlM|m^P&H`ke%C`emH+@j*s8!dFWv7z6j=R zme0>@N<7zeC(w~mOT&Scb;SY(QIQEbj@KVlxV_OkKYMBlx7E|1mruR3`kdwpm0r-q v6cW(D#T9_82e+U@C9CHo70;kaRqRiGg$HghU3L$cm>4`={an^LB{Ts5b3qps literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_import_white.png b/app/src/main/res/drawable-xxhdpi/ic_import_white.png new file mode 100644 index 0000000000000000000000000000000000000000..f90b07ad7594e9ac654b0fd7c63b9f4538cf07e6 GIT binary patch literal 4427 zcmeHKdr%X19$%uK$sl z&F+35pWpZU`F?-j*Sf6%w8bok^$K3 z<5|wdz+$PFfteu3LQwF6+jeo{NmTa3!>I{v-g9l&QmwQ6>)%@LGQVRtRK2bj$DQph zZ9Pj>TB_g4EN;-e@Sf$Gr;5$0`(4w*^chiE56g(?Lz8Eps4Lw4bZ^JZuHP@sSI&Df z!Etnob>8xd4d9`qhv-#WdeGrv0t zy$#cMD<45|zuMp#vn$D}eP1I^{bXO>ug}lzz4XtFCy{rrygL1u=gL1IC}IO=G}b{2c4X~`d^6-(=nMcf3PqSkbj_5 zI+oZ_`(bMF^;yN8TU*iEjwRcha|BuRY)ABD(@T5b-GI4H6@6nlu;tyJ!<#FUuOBa3+w|?4&V-e>Z(hdF^p->Va^IF473z;b-vv3)Uj^2M1jW0RB+WY* zWzg*fjR!$#=|L|^6*D62V4R%CAiv$xDu+4RAYY=fqE@ewDdNm!J|?d$$4-?MQ+isS zJ|`wENB{sgBa(2??eYjj&>#=t65v@9BXT%oA{HCu1y&nuuqnOMR#v>*Vg`lYcf3M%?3Z+9+2;*Yhz*GRMs)j9@WwF`@JR}O7 zoZB1n0%Q-f6ghT~tYNW9nov4J0|D*>xWlaba}OBslZkD?f(&}cO}g<7k3DD;eqRp1P*V=y&^(>l!%D2qoBNe{(HPyk%X0US!F!L=Ch zA!&+HsC8Oa;ZSL51*)NNoYk=y%VI+y7Wp{Pm85HER1y>opmel`!cZ-xz%U(%Mu*Z0 z(xFBH6pJ|+N~6PYT?mS%i21zFO@eZAZqmshUXL@RkO(K{+AIb+rbGuNHWw+fz`-D2 z$a(z1L4}=jGkGE@v8mFbDh;YpYqU6u>s0DNqkP6EfKHS!Rj3m0(@13@Kr(<>QtDFx z5b^-I5Jn$EioDOx^Dcv23JI1x2h>)uooG@dO{B;GP!z)n6-J<#U4;`GHK9_apc(=n zV$ahYTl&AOrOgAU^_ASr31I!wkf?7*Le#A*y$Y98j z0e*clFucGlLTPna)wAcKq072uYNLK_@QyT|_ zQKH3~8Fgbqq%1C0-?3&J5Z$ww=Guc7ZeGluv>u(1(e~oi-X$dn6mj3^!ua#kYW_H* zvFm>IFD=z2D_1AYH_fj4s_^Bph0|`x{?ztdvOoSB6!E0-X2+$T=w;`H{cuJl6cIT_ z7F+*a)S>H3Z29lm(+~W{y!6n{6uG>k`?tQWfBm5PY-f8D{D)&_oEZx$Ce^%YzgnL< zg=_Gw*yRtTXjXplDDv|&jzIEr`E}#OhjYHZGId9LV|U8I#{En6?Q7XZ4-#?~*Ux?$ z?N3eL(SGZrF4v-JF=da;_BZDiBL3v8a0KQ(2hS}|X&p+VI>z9we d4HB8O`k9{Yf}pRU`+&rlB{Rp=IB&(e{{r%cN#g(j literal 0 HcmV?d00001 diff --git a/app/src/main/res/drawable-xxhdpi/ic_settings.png b/app/src/main/res/drawable-xxhdpi/ic_settings.png index 55d0279eabea549f3d2c80b017cf4f4251042874..bda5e854555c9d00cfab623cc26b1e8c7d032800 100644 GIT binary patch literal 4511 zcmeHKeNYo;8V`aJ5oqL8RIs-$*H+YIlifg)m8g&)1Pn&xL(2KF*?kjM$OqZQ1pGiN z=VvP-*H#e~to67mj#aFPUvNNm^c=mj);p&37}TqCO0`gjyQ=lx4Tv!9%#AbG|H#Z{ z-}m|Wz0dP|pZA%4x0q5Af&wN7h(w|wL!v$vz7vHefN89 z$=&I@0*lX0%J-|={`UFch_HDbl5Tm8B4hfYp28B4oS758g0FaTepCIm^XCe>iyO~Q zjnMdp1XWFud@|-iWrwlQt_`&|ZrqLCVHeE0_uAv$tOzV@eT_)uQ^M+WCWB7*A|04S z<(e{WV)NYa)@6(0%RUHRDajY7?wz@Lt9r%wt){781k{qde*42nI_+^@cz zbUbNwN{r>NBe(qe^ij{#&rjbw-bj38c~iR}{EZ3QrX1nrGj>n@Ze0HS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^$L% zp6shTwS|>q!;awplFUl%8Cl!vz9E}z|?Fw7@mTevygV*+Km}V zMf&GcxZA;{XD5x1+?jk&|6QABV_9xPM8?O>e=z;ovn@UUwcyK(r)9WGYeH|Ykz9B8 zoL%Tg`oC9y@8-32`^ArTd{y7uz0WUa?x?Af5qBF}4{)0={Elmph}R3en|zk7$^K&b T(-Uh?3sXaUivDQa@^}6Vw^D2p delta 1010 zcmVE>x&)uDK&dwNd94BHK94o;JvVyE2E657^j|D&*(0?z;D`0LI1UV9N;_MHD zplSs{7sDW^Q9;myFbL{W5cJt}LDLoF#F=cepydRDmY6K4kU-ETlLeI!2r3@xf`$P# zKnHLZSQOwhqk!$eYXU)T!dQgAGtsz4o$%(U)N>DQJ#6UsKz;FsdyA6~RXNRhw zDL|*ef<6KhRRo>U5ab`A0Vu~(qy)ci#Gi4Ge_U43On;z{F|aOdzoz@d5XHQun=y`F zV5*FuRK{fQ7LX>8Vz{E}m|}6|PmsOEmICd>0afD6D4NBO0IG;%ao?`ws?K85fLg*U zM@G)SlIn?Kx#@Rni6)B4f_2zn&zv+zy+;!zcqWww$$?~w)pZI@cZaZ%RVo>S+ih6O z-4B`%w0}xW<>`ciG9*%f7A&~6v|Kj`2G_vQ4s8;QAx~#ddXHdmdF+xFQ z3fX)fhak5GIz~`6M~SW;)h@%4pfzETfMx)jI+QIdXC!ckD3)3*#FYfO%T?YI zw-~AOI8S`uG z9(*|=b&H+U)Up{YB$(&uI%$zNEe>ZjKMr{3Gk7N! zwb_`7U)3O|8n-9p04IPi2}+9;?tYNhYWcgk#CEjD@oszJIfIyIz#5P7#sCGtJ&INO zGJ=wD-&Py`#c~3+OSTfNmwtf)g0w5#02n203Sq7K2rguh6?8ugf>f5#T?m7qg9?K7g+b6f%&hwa=*7%AD-43{KR2<0 gtRRaOWChXi7gbDK11BI4^#A|>07*qoM6N<$f_C`Nk^lez diff --git a/app/src/main/res/layout-land/activity_main.xml b/app/src/main/res/layout-land/activity_main.xml index 08a56bf..c483435 100644 --- a/app/src/main/res/layout-land/activity_main.xml +++ b/app/src/main/res/layout-land/activity_main.xml @@ -95,14 +95,24 @@ + + + + + - \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge/activity_main.xml b/app/src/main/res/layout-xlarge/activity_main.xml index bf2bde7..cd45fdd 100644 --- a/app/src/main/res/layout-xlarge/activity_main.xml +++ b/app/src/main/res/layout-xlarge/activity_main.xml @@ -94,15 +94,25 @@ + + + + - \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 6ed3db9..81e3cdf 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -15,7 +15,7 @@ android:id="@+id/idTable" android:layout_width="0dp" android:layout_height="200dp" - android:visibility="visible" + android:visibility="visible" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -88,36 +88,46 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - + - + - + + + + + - \ No newline at end of file diff --git a/app/src/main/res/menu/activity_main_bottom_toolbar.xml b/app/src/main/res/menu/activity_main_bottom_toolbar.xml new file mode 100644 index 0000000..6c2fa92 --- /dev/null +++ b/app/src/main/res/menu/activity_main_bottom_toolbar.xml @@ -0,0 +1,23 @@ + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/menu/activity_main_toolbar.xml b/app/src/main/res/menu/activity_main_toolbar.xml index 4d217d2..53a2b3d 100644 --- a/app/src/main/res/menu/activity_main_toolbar.xml +++ b/app/src/main/res/menu/activity_main_toolbar.xml @@ -1,14 +1,16 @@ + xmlns:app="http://schemas.android.com/apk/res-auto" + > + + - \ No newline at end of file diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml index 60d2fe0..285561f 100644 --- a/app/src/main/res/xml/preferences.xml +++ b/app/src/main/res/xml/preferences.xml @@ -36,4 +36,13 @@ android:key="org.phenoapps.verify.TUTORIAL_MODE" android:summary="Always display the tutorial when Verify is opened." android:title="Tutorial" /> + + \ No newline at end of file From 97bf7edf6d25fe39257e85cc0b1fd1f6c281f517 Mon Sep 17 00:00:00 2001 From: Siddharth Malladi Date: Thu, 14 Dec 2023 10:13:20 -0800 Subject: [PATCH 2/2] About was migrated. App now updated with the latest About info --- app/build.gradle | 5 +- app/src/main/AndroidManifest.xml | 43 ++++++---- .../org/phenoapps/verify/AboutActivity.java | 83 +++++++++++++++++++ .../phenoapps/verify/SettingsFragment.java | 53 +----------- .../main/res/drawable/ic_person_profile.xml | 10 +++ app/src/main/res/values/about_styles.xml | 3 + app/src/main/res/values/styles.xml | 7 ++ 7 files changed, 135 insertions(+), 69 deletions(-) create mode 100644 app/src/main/java/org/phenoapps/verify/AboutActivity.java create mode 100644 app/src/main/res/drawable/ic_person_profile.xml create mode 100644 app/src/main/res/values/about_styles.xml diff --git a/app/build.gradle b/app/build.gradle index 4a5447f..e9899c5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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 @@ -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' } } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index b290ec8..444bbcc 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -12,31 +12,38 @@ android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> - + + android:exported="true" + android:windowSoftInputMode="adjustPan"> + - - - - - - - - - + android:name=".CompareActivity" + android:exported="true" /> + + + + - \ No newline at end of file + diff --git a/app/src/main/java/org/phenoapps/verify/AboutActivity.java b/app/src/main/java/org/phenoapps/verify/AboutActivity.java new file mode 100644 index 0000000..6f05bba --- /dev/null +++ b/app/src/main/java/org/phenoapps/verify/AboutActivity.java @@ -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(); + } +} \ No newline at end of file diff --git a/app/src/main/java/org/phenoapps/verify/SettingsFragment.java b/app/src/main/java/org/phenoapps/verify/SettingsFragment.java index 89c8970..0092384 100644 --- a/app/src/main/java/org/phenoapps/verify/SettingsFragment.java +++ b/app/src/main/java/org/phenoapps/verify/SettingsFragment.java @@ -20,57 +20,10 @@ private void showChangeLog() { } private void showAboutDialog(Context ctx) { - android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(ctx); - { - android.view.View personView = null; - if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) { - personView = getLayoutInflater().inflate( - R.layout.about, new android.widget.LinearLayout(ctx), - false); - } - { - assert personView != null; - android.widget.TextView versionTextView = (android.widget.TextView) - personView.findViewById(org.phenoapps.verify.R.id.tvVersion); - try - { - android.content.pm.PackageInfo packageInfo = - ctx.getPackageManager().getPackageInfo(ctx.getPackageName(), 0); - assert packageInfo != null; - assert versionTextView != null; - versionTextView.setText(this.getResources().getString( - org.phenoapps.verify.R.string.versiontitle) + - ' ' + packageInfo.versionName); - } - catch (android.content.pm.PackageManager.NameNotFoundException e) - { e.printStackTrace(); } - versionTextView.setOnClickListener(new android.view.View.OnClickListener() - { - @java.lang.Override - public void onClick(android.view.View v) - { showChangeLog(); } - }); - } - - builder.setCancelable(true); - builder.setTitle (this.getResources().getString( - org.phenoapps.verify.R.string.about)); - builder.setView(personView); + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) { + Intent i = new Intent(getContext(), AboutActivity.class); + startActivity(i); } - - builder.setNegativeButton( - this.getResources().getString(org.phenoapps.verify.R.string.ok), - new android.content.DialogInterface.OnClickListener() - { - @java.lang.Override - public void onClick(android.content.DialogInterface dialog, int which) - { - assert dialog != null; - dialog.dismiss(); - } - }); - - builder.show(); } @Override diff --git a/app/src/main/res/drawable/ic_person_profile.xml b/app/src/main/res/drawable/ic_person_profile.xml new file mode 100644 index 0000000..d21debf --- /dev/null +++ b/app/src/main/res/drawable/ic_person_profile.xml @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/values/about_styles.xml b/app/src/main/res/values/about_styles.xml new file mode 100644 index 0000000..55344e5 --- /dev/null +++ b/app/src/main/res/values/about_styles.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index dfd0a57..855819f 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -15,4 +15,11 @@ @color/colorAccent + + + +