diff --git a/README.md b/README.md index e29dfe634b4c249636046aadb799cf948909e752..785ed3f8e0a6d1d06c632753c7f11343c2d7bbeb 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,21 @@ -# Nextcloud Notes -An android client for [Nextcloud Notes App](https://github.com/nextcloud/notes/). +# Notes +An android client for [Nextcloud Notes App](https://github.com/nextcloud/notes/) +Notes is forked from [Nextcloud Notes](https://github.com/stefan-niedermann/nextcloud-notes) -[![Build Status](https://travis-ci.org/stefan-niedermann/nextcloud-notes.svg?branch=master)](https://travis-ci.org/stefan-niedermann/nextcloud-notes) -[![GitHub issues](https://img.shields.io/github/issues/stefan-niedermann/nextcloud-notes.svg)](https://github.com/stefan-niedermann/nextcloud-notes/issues) -[![GitHub stars](https://img.shields.io/github/stars/stefan-niedermann/nextcloud-notes.svg)](https://github.com/stefan-niedermann/nextcloud-notes/stargazers) -[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +## Authors -## :arrow_forward: Access +[Authors](https://gitlab.e.foundation/e/apps/Notes/-/blob/master/AUTHORS) -<<<<<<< HEAD -[![Download from Google Play](https://play.google.com/intl/en_us/badges/images/badge_new.png)](https://play.google.com/store/apps/details?id=it.niedermann.notes) -[![Nextcloud Notes App on fdroid.org](https://camo.githubusercontent.com/7df0eafa4433fa4919a56f87c3d99cf81b68d01c/68747470733a2f2f662d64726f69642e6f72672f77696b692f696d616765732f632f63342f462d44726f69642d627574746f6e5f617661696c61626c652d6f6e2e706e67)](https://f-droid.org/repository/browse/?fdid=it.niedermann.notes) -[![Donate with PayPal](https://raw.githubusercontent.com/stefan-niedermann/paypal-donate-button/master/paypal-donate-button.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K7HVLE6J7SXXA) -======= -[Get it on Play Store](https://play.google.com/store/apps/details?id=it.niedermann.owncloud.notes) -[Get it on F-Droid](https://f-droid.org/repository/browse/?fdid=it.niedermann.owncloud.notes) -[Donate with PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=K7HVLE6J7SXXA) ->>>>>>> steff_master -[![Donate using Liberapay](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/stefan-niedermann/donate) +## Release Notes -## :eyes: Screenshots +Check out the [Release Notes](https://gitlab.e.foundation/e/apps/Notes/-/releases) to find out what changed +in each version of Notes. -| Navi | List View | Edit Mode | -| :--: | :--: | :--: | -| ![Screenshot of categories in sidebar](/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png) | ![Screenshot of list view](/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png) | ![Screenshot of edit view](/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png) | +## Privacy Policy -## :rocket: Features -* List, create, edit, share, search and delete notes -* Share text and links as new note into the app -* Mark notes as favorite -* Bulk delete -* In-note search ([#106](https://github.com/stefan-niedermann/nextcloud-notes/issues/106)) -* Render MarkDown (using [RxMarkdown](https://github.com/yydcdut/RxMarkdown)) -* Translated in many languages on [Transifex](https://www.transifex.com/nextcloud/nextcloud/android-notes/) -* Context based formatting ([#363](https://github.com/stefan-niedermann/nextcloud-notes/issues/363)) +[Privacy Policy](https://e.foundation/legal-notice-privacy) +[Terms of service](https://e.foundation/legal-notice-privacy) -## :checkered_flag: Planned features -* Toggle checkboxes in view mode ([#451](https://github.com/stefan-niedermann/nextcloud-notes/issues/451)) -* Trashbin ([#238](https://github.com/stefan-niedermann/nextcloud-notes/issues/238)) +## License -## :family: Join the team -* Test the app with different devices -* 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.notes) -* Send me a bottle of your favorite beer :beers: :wink: - -## :link: Requirements -* [Nextcloud](https://nextcloud.com/) instance running -* [Nextcloud Notes](https://github.com/nextcloud/notes) app enabled - -## :notebook: License -This project is licensed under the [GNU GENERAL PUBLIC LICENSE](/LICENSE). - -## :twisted_rightwards_arrows: Alternatives -If you dislike this app and you are looking for alternatives: Have a look at [MyOwnNotes](https://github.com/aykit/MyOwnNotes). +Notes is licensed under the [GNU General Public License v3.0](https://gitlab.e.foundation/e/apps/Notes/-/blob/master/LICENSE) diff --git a/app/src/main/java/foundation/e/notes/android/activity/AboutActivity.java b/app/src/main/java/foundation/e/notes/android/activity/AboutActivity.java index 6136a00d315d12e2bfc093827abea6d8a8ec825b..82f1d368dcdab1b25188626efccf7a80175038a8 100644 --- a/app/src/main/java/foundation/e/notes/android/activity/AboutActivity.java +++ b/app/src/main/java/foundation/e/notes/android/activity/AboutActivity.java @@ -3,95 +3,18 @@ package foundation.e.notes.android.activity; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; -import androidx.fragment.app.Fragment; -import androidx.fragment.app.FragmentManager; -import androidx.fragment.app.FragmentPagerAdapter; -import androidx.viewpager.widget.ViewPager; - -import com.google.android.material.tabs.TabLayout; - -import butterknife.BindView; import butterknife.ButterKnife; -import foundation.e.notes.android.fragment.about.AboutFragmentContributingTab; -import foundation.e.notes.android.fragment.about.AboutFragmentCreditsTab; -import foundation.e.notes.android.fragment.about.AboutFragmentLicenseTab; import foundation.e.notes.R; -import foundation.e.notes.util.ExceptionHandler; +import foundation.e.notes.android.fragment.about.AboutFragment; public class AboutActivity extends AppCompatActivity { - @BindView(R.id.pager) - ViewPager mViewPager; - @BindView(R.id.tabs) - TabLayout mTabLayout; - @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - Thread.currentThread().setUncaughtExceptionHandler(new ExceptionHandler(this)); setContentView(R.layout.activity_about); ButterKnife.bind(this); + getFragmentManager().beginTransaction().replace(R.id.container, new AboutFragment()).commit(); - mViewPager.setAdapter(new TabsPagerAdapter(getSupportFragmentManager())); - mTabLayout.setupWithViewPager(mViewPager); - } - - private class TabsPagerAdapter extends FragmentPagerAdapter { - private final int PAGE_COUNT = 3; - - public TabsPagerAdapter(FragmentManager fragmentManager) { - super(fragmentManager); - } - - @Override - public int getCount() { - return PAGE_COUNT; - } - - /** - * return the right fragment for the given position - */ - @Override - public Fragment getItem(int position) { - switch (position) { - case 0: - return new AboutFragmentCreditsTab(); - - case 1: - return new AboutFragmentContributingTab(); - - case 2: - return new AboutFragmentLicenseTab(); - - default: - return null; - } - } - - /** - * generate title based on given position - */ - @Override - public CharSequence getPageTitle(int position) { - switch (position) { - case 0: - return getString(R.string.about_credits_tab_title); - - case 1: - return getString(R.string.about_contribution_tab_title); - - case 2: - return getString(R.string.about_license_tab_title); - - default: - return null; - } - } - } - - @Override - public boolean onSupportNavigateUp() { - finish(); // close this activity as oppose to navigating up - return true; } -} +} \ No newline at end of file diff --git a/app/src/main/java/foundation/e/notes/android/fragment/about/AboutFragment.java b/app/src/main/java/foundation/e/notes/android/fragment/about/AboutFragment.java new file mode 100644 index 0000000000000000000000000000000000000000..e6c13cbcce9f571eff2bf39d04701537398df924 --- /dev/null +++ b/app/src/main/java/foundation/e/notes/android/fragment/about/AboutFragment.java @@ -0,0 +1,23 @@ +package foundation.e.notes.android.fragment.about; + +import android.os.Bundle; +import android.preference.PreferenceFragment; + +import androidx.annotation.Nullable; +import foundation.e.notes.BuildConfig; +import foundation.e.notes.R; + +public class AboutFragment extends PreferenceFragment { + + private static final String BUILD_VERSION = "build_version"; + + @Override + public void onCreate(@Nullable Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + addPreferencesFromResource(R.xml.about_preferences); + + findPreference(BUILD_VERSION).setSummary(BuildConfig.VERSION_NAME); + + } +} diff --git a/app/src/main/java/foundation/e/notes/android/fragment/about/AboutFragmentContributingTab.java b/app/src/main/java/foundation/e/notes/android/fragment/about/AboutFragmentContributingTab.java deleted file mode 100644 index 4aec91cb0fe1307698c94b08a4452e110965f588..0000000000000000000000000000000000000000 --- a/app/src/main/java/foundation/e/notes/android/fragment/about/AboutFragmentContributingTab.java +++ /dev/null @@ -1,34 +0,0 @@ -package foundation.e.notes.android.fragment.about; - -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.fragment.app.Fragment; -import butterknife.BindView; -import butterknife.ButterKnife; -import foundation.e.notes.R; -import foundation.e.notes.util.SupportUtil; - -public class AboutFragmentContributingTab extends Fragment { - - @BindView(R.id.about_source) - TextView aboutSource; - @BindView(R.id.about_issues) - TextView aboutIssues; - @BindView(R.id.about_translate) - TextView aboutTranslate; - - @Override - public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View v = inflater.inflate(R.layout.fragment_about_contribution_tab, container, false); - ButterKnife.bind(this, v); - SupportUtil.setHtml(aboutSource, R.string.about_source, getString(R.string.url_source)); - SupportUtil.setHtml(aboutIssues, R.string.about_issues, getString(R.string.url_issues)); - SupportUtil.setHtml(aboutTranslate, R.string.about_translate, getString(R.string.url_translations)); - return v; - } -} \ No newline at end of file diff --git a/app/src/main/java/foundation/e/notes/android/fragment/about/AboutFragmentCreditsTab.java b/app/src/main/java/foundation/e/notes/android/fragment/about/AboutFragmentCreditsTab.java deleted file mode 100644 index 35b896e780b772d71c7b93f74c604754d931d061..0000000000000000000000000000000000000000 --- a/app/src/main/java/foundation/e/notes/android/fragment/about/AboutFragmentCreditsTab.java +++ /dev/null @@ -1,35 +0,0 @@ -package foundation.e.notes.android.fragment.about; - -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.fragment.app.Fragment; -import butterknife.BindView; -import butterknife.ButterKnife; -import foundation.e.notes.BuildConfig; -import foundation.e.notes.R; -import foundation.e.notes.util.SupportUtil; - -public class AboutFragmentCreditsTab extends Fragment { - - @BindView(R.id.about_version) - TextView aboutVersion; - @BindView(R.id.about_maintainer) - TextView aboutMaintainer; - @BindView(R.id.about_translators) - TextView aboutTranslators; - - @Override - public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View v = inflater.inflate(R.layout.fragment_about_credits_tab, container, false); - ButterKnife.bind(this, v); - SupportUtil.setHtml(aboutVersion, R.string.about_version, "v" + BuildConfig.VERSION_NAME); - SupportUtil.setHtml(aboutMaintainer, R.string.about_maintainer); - SupportUtil.setHtml(aboutTranslators, R.string.about_translators_transifex, getString(R.string.url_translations)); - return v; - } -} \ No newline at end of file diff --git a/app/src/main/java/foundation/e/notes/android/fragment/about/AboutFragmentLicenseTab.java b/app/src/main/java/foundation/e/notes/android/fragment/about/AboutFragmentLicenseTab.java deleted file mode 100644 index eac1b7374a5ae4779302e6466f7def31159b97bf..0000000000000000000000000000000000000000 --- a/app/src/main/java/foundation/e/notes/android/fragment/about/AboutFragmentLicenseTab.java +++ /dev/null @@ -1,39 +0,0 @@ -package foundation.e.notes.android.fragment.about; - -import android.content.Intent; -import android.net.Uri; -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.Button; -import android.widget.TextView; - -import androidx.annotation.NonNull; -import androidx.fragment.app.Fragment; -import butterknife.BindView; -import butterknife.ButterKnife; -import butterknife.OnClick; -import foundation.e.notes.R; -import foundation.e.notes.util.SupportUtil; - -public class AboutFragmentLicenseTab extends Fragment { - - @BindView(R.id.about_icons_disclaimer) - TextView iconsDisclaimer; - @BindView(R.id.about_app_license_button) - Button appLicenseButton; - - @OnClick(R.id.about_app_license_button) - void openLicense() { - startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.url_license)))); - } - - @Override - public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View v = inflater.inflate(R.layout.fragment_about_license_tab, container, false); - ButterKnife.bind(this, v); - SupportUtil.setHtml(iconsDisclaimer, R.string.about_icons_disclaimer, getString(R.string.about_app_icon_author)); - return v; - } -} \ No newline at end of file diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index 78e17475d72b0ceb571b35177bfb6c7827b4f52b..bdd3321311d0eb349ea0de4cfe7032b360f9f4db 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -1,17 +1,6 @@ - - - - - - - \ No newline at end of file + android:orientation="vertical" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_about_contribution_tab.xml b/app/src/main/res/layout/fragment_about_contribution_tab.xml deleted file mode 100644 index b67fc4e2755d00b78ab36c844a1bd01cf3b23f84..0000000000000000000000000000000000000000 --- a/app/src/main/res/layout/fragment_about_contribution_tab.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_about_credits_tab.xml b/app/src/main/res/layout/fragment_about_credits_tab.xml deleted file mode 100644 index 807033069c514e56bd735be395420e9be3c6c6d8..0000000000000000000000000000000000000000 --- a/app/src/main/res/layout/fragment_about_credits_tab.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_about_license_tab.xml b/app/src/main/res/layout/fragment_about_license_tab.xml deleted file mode 100644 index 73fe550d7410d59246907c4edbbe425820c449d7..0000000000000000000000000000000000000000 --- a/app/src/main/res/layout/fragment_about_license_tab.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - -