Loading README.md +10 −8 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ An android client for [Nextcloud Notes App](https://github.com/nextcloud/notes/) [](https://liberapay.com/stefan-niedermann/donate) ## :eyes: Screenshots   Loading @@ -23,19 +24,20 @@ An android client for [Nextcloud Notes App](https://github.com/nextcloud/notes/) * Mark notes as favorite * Bulk delete * Render MarkDown (using [RxMarkdown](https://github.com/yydcdut/RxMarkdown)) * English, German, Russian, Armenian, French and Serbian UI * Translated in many languages on [Transifex](https://www.transifex.com/nextcloud/nextcloud/android-notes/) ## :checkered_flag: Planned features * Tablet layout ([#8](https://github.com/stefan-niedermann/nextcloud-notes/issues/8)) * Simple widget for individual note ([#5](https://github.com/stefan-niedermann/nextcloud-notes/issues/5)) * Make a widget for all notes ([#15](https://github.com/stefan-niedermann/nextcloud-notes/issues/15)) * In-note search ([#106](https://github.com/stefan-niedermann/nextcloud-notes/issues/106)) * Toggle checkboxes in view mode ([#451](https://github.com/stefan-niedermann/nextcloud-notes/issues/451)) * Context based formatting ([#363](https://github.com/stefan-niedermann/nextcloud-notes/issues/363)) * Trashbin ([#238](https://github.com/stefan-niedermann/nextcloud-notes/issues/238)) ## :wrench: Contribution ## :family: Join the team * Test the app with different devices * Write issues in the [issue tracker](https://github.com/stefan-niedermann/nextcloud-notes/issues) * Provide pull requests * Translate this app on [Transifex](https://www.transifex.com/nextcloud/nextcloud/android-notes/) * Report issues in the [issue tracker](https://github.com/stefan-niedermann/nextcloud-notes/issues) * [Pick a good first issue](https://github.com/nextcloud/server/labels/good%20first%20issue) :notebook: * Create a [Pull Request](https://opensource.guide/how-to-contribute/#opening-a-pull-request) * Help translating this app on [Transifex](https://www.transifex.com/nextcloud/nextcloud/android-notes/) :flags: * Buy this app on [Google Play Store](https://play.google.com/store/apps/details?id=it.niedermann.owncloud.notes) * Send me a bottle of your favorite beer :beers: :wink: Loading app/build.gradle +6 −4 Original line number Diff line number Diff line Loading @@ -8,8 +8,8 @@ android { applicationId "it.niedermann.owncloud.notes" minSdkVersion 14 targetSdkVersion 27 versionCode 30 versionName "0.18.0" versionCode 33 versionName "0.21.0" } buildTypes { release { Loading @@ -26,8 +26,10 @@ android { dependencies { implementation project(':cert4android') implementation 'com.yydcdut:rxmarkdown:0.1.1-beta' implementation 'io.reactivex:rxandroid:1.2.0' implementation 'io.reactivex:rxjava:1.1.5' implementation 'com.yydcdut:markdown-processor:0.1.3' implementation 'com.yydcdut:rxmarkdown-wrapper:0.1.3' implementation 'com.jakewharton:butterknife:8.8.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' Loading app/src/main/java/it/niedermann/owncloud/notes/android/activity/EditNoteActivity.java +3 −2 Original line number Diff line number Diff line Loading @@ -198,8 +198,9 @@ public class EditNoteActivity extends AppCompatActivity implements BaseNoteFragm ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setTitle(note.getTitle()); String subtitle = note.getCategory().isEmpty() ? getString(R.string.action_uncategorized) : NoteUtil.extendCategory(note.getCategory()); actionBar.setSubtitle(subtitle); if(!note.getCategory().isEmpty()) { actionBar.setSubtitle(NoteUtil.extendCategory(note.getCategory())); } } } } No newline at end of file app/src/main/java/it/niedermann/owncloud/notes/android/activity/NotesListViewActivity.java +29 −2 Original line number Diff line number Diff line Loading @@ -2,11 +2,14 @@ package it.niedermann.owncloud.notes.android.activity; import android.app.SearchManager; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.Configuration; import android.graphics.Canvas; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; import android.support.annotation.Nullable; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; Loading @@ -27,6 +30,7 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewTreeObserver; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; import java.util.ArrayList; Loading Loading @@ -69,6 +73,8 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap Toolbar toolbar; @BindView(R.id.drawerLayout) DrawerLayout drawerLayout; @BindView(R.id.account) TextView account; @BindView(R.id.swiperefreshlayout) SwipeRefreshLayout swipeRefreshLayout; @BindView(R.id.fab_create) Loading Loading @@ -197,7 +203,7 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap private void setupNavigationList(final String selectedItem) { itemRecent = new NavigationAdapter.NavigationItem(ADAPTER_KEY_RECENT, getString(R.string.label_all_notes), null, R.drawable.ic_access_time_grey600_24dp); itemFavorites = new NavigationAdapter.NavigationItem(ADAPTER_KEY_STARRED, getString(R.string.label_favorites), null, R.drawable.ic_star_grey600_24dp); itemFavorites = new NavigationAdapter.NavigationItem(ADAPTER_KEY_STARRED, getString(R.string.label_favorites), null, R.drawable.ic_star_yellow_24dp); adapterCategories = new NavigationAdapter(new NavigationAdapter.ClickListener() { @Override public void onItemClick(NavigationAdapter.NavigationItem item) { Loading Loading @@ -331,10 +337,12 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap } private void setupNavigationMenu() { final NavigationAdapter.NavigationItem itemTrashbin = new NavigationAdapter.NavigationItem("trashbin", getString(R.string.action_trashbin), null, R.drawable.ic_delete_grey600_24dp); final NavigationAdapter.NavigationItem itemSettings = new NavigationAdapter.NavigationItem("settings", getString(R.string.action_settings), null, R.drawable.ic_settings_grey600_24dp); final NavigationAdapter.NavigationItem itemAbout = new NavigationAdapter.NavigationItem("about", getString(R.string.simple_about), null, R.drawable.ic_info_outline_grey600_24dp); ArrayList<NavigationAdapter.NavigationItem> itemsMenu = new ArrayList<>(); itemsMenu.add(itemTrashbin); itemsMenu.add(itemSettings); itemsMenu.add(itemAbout); Loading @@ -347,6 +355,10 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap } else if (item == itemAbout) { Intent aboutIntent = new Intent(getApplicationContext(), AboutActivity.class); startActivityForResult(aboutIntent, about); } else if (item == itemTrashbin) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); String url = preferences.getString(SettingsActivity.SETTINGS_URL, SettingsActivity.DEFAULT_SETTINGS); startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url + "index.php/apps/files/?dir=/&view=trashbin"))); } } Loading @@ -355,6 +367,21 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap onItemClick(item); } }); SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); String username = preferences.getString(SettingsActivity.SETTINGS_USERNAME, SettingsActivity.DEFAULT_SETTINGS); String url = preferences.getString(SettingsActivity.SETTINGS_URL, SettingsActivity.DEFAULT_SETTINGS).replace("https://", "").replace("http://", ""); this.account.setText(username + "@" + url.substring(0, url.length() - 1)); final NotesListViewActivity that = this; this.account.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent settingsIntent = new Intent(that, SettingsActivity.class); startActivityForResult(settingsIntent, server_settings); } }); adapterMenu.setItems(itemsMenu); listNavigationMenu.setAdapter(adapterMenu); } Loading Loading @@ -412,7 +439,7 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap } case ItemTouchHelper.RIGHT: { final DBNote dbNote = (DBNote) adapter.getItem(viewHolder.getAdapterPosition()); db.toggleFavorite(dbNote, null); db.toggleFavorite(dbNote, syncCallBack); refreshLists(); break; } Loading app/src/main/java/it/niedermann/owncloud/notes/android/activity/SettingsActivity.java +8 −9 Original line number Diff line number Diff line Loading @@ -76,6 +76,13 @@ public class SettingsActivity extends AppCompatActivity { } } field_url.setOnFocusChangeListener(new View.OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { new URLValidatorAsyncTask().execute(NotesClientUtil.formatURL(field_url.getText().toString())); } }); field_url.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { Loading @@ -83,15 +90,7 @@ public class SettingsActivity extends AppCompatActivity { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { String url = field_url.getText().toString().trim(); if (!url.endsWith("/")) { url += "/"; } if (!url.startsWith("http://") && !url.startsWith("https://")) { url = "https://" + url; } new URLValidatorAsyncTask().execute(url); String url = NotesClientUtil.formatURL(field_url.getText().toString()); if (NotesClientUtil.isHttp(url)) { urlWarnHttp.setVisibility(View.VISIBLE); Loading Loading
README.md +10 −8 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ An android client for [Nextcloud Notes App](https://github.com/nextcloud/notes/) [](https://liberapay.com/stefan-niedermann/donate) ## :eyes: Screenshots   Loading @@ -23,19 +24,20 @@ An android client for [Nextcloud Notes App](https://github.com/nextcloud/notes/) * Mark notes as favorite * Bulk delete * Render MarkDown (using [RxMarkdown](https://github.com/yydcdut/RxMarkdown)) * English, German, Russian, Armenian, French and Serbian UI * Translated in many languages on [Transifex](https://www.transifex.com/nextcloud/nextcloud/android-notes/) ## :checkered_flag: Planned features * Tablet layout ([#8](https://github.com/stefan-niedermann/nextcloud-notes/issues/8)) * Simple widget for individual note ([#5](https://github.com/stefan-niedermann/nextcloud-notes/issues/5)) * Make a widget for all notes ([#15](https://github.com/stefan-niedermann/nextcloud-notes/issues/15)) * In-note search ([#106](https://github.com/stefan-niedermann/nextcloud-notes/issues/106)) * Toggle checkboxes in view mode ([#451](https://github.com/stefan-niedermann/nextcloud-notes/issues/451)) * Context based formatting ([#363](https://github.com/stefan-niedermann/nextcloud-notes/issues/363)) * Trashbin ([#238](https://github.com/stefan-niedermann/nextcloud-notes/issues/238)) ## :wrench: Contribution ## :family: Join the team * Test the app with different devices * Write issues in the [issue tracker](https://github.com/stefan-niedermann/nextcloud-notes/issues) * Provide pull requests * Translate this app on [Transifex](https://www.transifex.com/nextcloud/nextcloud/android-notes/) * Report issues in the [issue tracker](https://github.com/stefan-niedermann/nextcloud-notes/issues) * [Pick a good first issue](https://github.com/nextcloud/server/labels/good%20first%20issue) :notebook: * Create a [Pull Request](https://opensource.guide/how-to-contribute/#opening-a-pull-request) * Help translating this app on [Transifex](https://www.transifex.com/nextcloud/nextcloud/android-notes/) :flags: * Buy this app on [Google Play Store](https://play.google.com/store/apps/details?id=it.niedermann.owncloud.notes) * Send me a bottle of your favorite beer :beers: :wink: Loading
app/build.gradle +6 −4 Original line number Diff line number Diff line Loading @@ -8,8 +8,8 @@ android { applicationId "it.niedermann.owncloud.notes" minSdkVersion 14 targetSdkVersion 27 versionCode 30 versionName "0.18.0" versionCode 33 versionName "0.21.0" } buildTypes { release { Loading @@ -26,8 +26,10 @@ android { dependencies { implementation project(':cert4android') implementation 'com.yydcdut:rxmarkdown:0.1.1-beta' implementation 'io.reactivex:rxandroid:1.2.0' implementation 'io.reactivex:rxjava:1.1.5' implementation 'com.yydcdut:markdown-processor:0.1.3' implementation 'com.yydcdut:rxmarkdown-wrapper:0.1.3' implementation 'com.jakewharton:butterknife:8.8.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' Loading
app/src/main/java/it/niedermann/owncloud/notes/android/activity/EditNoteActivity.java +3 −2 Original line number Diff line number Diff line Loading @@ -198,8 +198,9 @@ public class EditNoteActivity extends AppCompatActivity implements BaseNoteFragm ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setTitle(note.getTitle()); String subtitle = note.getCategory().isEmpty() ? getString(R.string.action_uncategorized) : NoteUtil.extendCategory(note.getCategory()); actionBar.setSubtitle(subtitle); if(!note.getCategory().isEmpty()) { actionBar.setSubtitle(NoteUtil.extendCategory(note.getCategory())); } } } } No newline at end of file
app/src/main/java/it/niedermann/owncloud/notes/android/activity/NotesListViewActivity.java +29 −2 Original line number Diff line number Diff line Loading @@ -2,11 +2,14 @@ package it.niedermann.owncloud.notes.android.activity; import android.app.SearchManager; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.Configuration; import android.graphics.Canvas; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; import android.support.annotation.Nullable; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; Loading @@ -27,6 +30,7 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewTreeObserver; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; import java.util.ArrayList; Loading Loading @@ -69,6 +73,8 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap Toolbar toolbar; @BindView(R.id.drawerLayout) DrawerLayout drawerLayout; @BindView(R.id.account) TextView account; @BindView(R.id.swiperefreshlayout) SwipeRefreshLayout swipeRefreshLayout; @BindView(R.id.fab_create) Loading Loading @@ -197,7 +203,7 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap private void setupNavigationList(final String selectedItem) { itemRecent = new NavigationAdapter.NavigationItem(ADAPTER_KEY_RECENT, getString(R.string.label_all_notes), null, R.drawable.ic_access_time_grey600_24dp); itemFavorites = new NavigationAdapter.NavigationItem(ADAPTER_KEY_STARRED, getString(R.string.label_favorites), null, R.drawable.ic_star_grey600_24dp); itemFavorites = new NavigationAdapter.NavigationItem(ADAPTER_KEY_STARRED, getString(R.string.label_favorites), null, R.drawable.ic_star_yellow_24dp); adapterCategories = new NavigationAdapter(new NavigationAdapter.ClickListener() { @Override public void onItemClick(NavigationAdapter.NavigationItem item) { Loading Loading @@ -331,10 +337,12 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap } private void setupNavigationMenu() { final NavigationAdapter.NavigationItem itemTrashbin = new NavigationAdapter.NavigationItem("trashbin", getString(R.string.action_trashbin), null, R.drawable.ic_delete_grey600_24dp); final NavigationAdapter.NavigationItem itemSettings = new NavigationAdapter.NavigationItem("settings", getString(R.string.action_settings), null, R.drawable.ic_settings_grey600_24dp); final NavigationAdapter.NavigationItem itemAbout = new NavigationAdapter.NavigationItem("about", getString(R.string.simple_about), null, R.drawable.ic_info_outline_grey600_24dp); ArrayList<NavigationAdapter.NavigationItem> itemsMenu = new ArrayList<>(); itemsMenu.add(itemTrashbin); itemsMenu.add(itemSettings); itemsMenu.add(itemAbout); Loading @@ -347,6 +355,10 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap } else if (item == itemAbout) { Intent aboutIntent = new Intent(getApplicationContext(), AboutActivity.class); startActivityForResult(aboutIntent, about); } else if (item == itemTrashbin) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); String url = preferences.getString(SettingsActivity.SETTINGS_URL, SettingsActivity.DEFAULT_SETTINGS); startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url + "index.php/apps/files/?dir=/&view=trashbin"))); } } Loading @@ -355,6 +367,21 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap onItemClick(item); } }); SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); String username = preferences.getString(SettingsActivity.SETTINGS_USERNAME, SettingsActivity.DEFAULT_SETTINGS); String url = preferences.getString(SettingsActivity.SETTINGS_URL, SettingsActivity.DEFAULT_SETTINGS).replace("https://", "").replace("http://", ""); this.account.setText(username + "@" + url.substring(0, url.length() - 1)); final NotesListViewActivity that = this; this.account.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent settingsIntent = new Intent(that, SettingsActivity.class); startActivityForResult(settingsIntent, server_settings); } }); adapterMenu.setItems(itemsMenu); listNavigationMenu.setAdapter(adapterMenu); } Loading Loading @@ -412,7 +439,7 @@ public class NotesListViewActivity extends AppCompatActivity implements ItemAdap } case ItemTouchHelper.RIGHT: { final DBNote dbNote = (DBNote) adapter.getItem(viewHolder.getAdapterPosition()); db.toggleFavorite(dbNote, null); db.toggleFavorite(dbNote, syncCallBack); refreshLists(); break; } Loading
app/src/main/java/it/niedermann/owncloud/notes/android/activity/SettingsActivity.java +8 −9 Original line number Diff line number Diff line Loading @@ -76,6 +76,13 @@ public class SettingsActivity extends AppCompatActivity { } } field_url.setOnFocusChangeListener(new View.OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { new URLValidatorAsyncTask().execute(NotesClientUtil.formatURL(field_url.getText().toString())); } }); field_url.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { Loading @@ -83,15 +90,7 @@ public class SettingsActivity extends AppCompatActivity { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { String url = field_url.getText().toString().trim(); if (!url.endsWith("/")) { url += "/"; } if (!url.startsWith("http://") && !url.startsWith("https://")) { url = "https://" + url; } new URLValidatorAsyncTask().execute(url); String url = NotesClientUtil.formatURL(field_url.getText().toString()); if (NotesClientUtil.isHttp(url)) { urlWarnHttp.setVisibility(View.VISIBLE); Loading