Added Notes app
This commit is contained in:
parent
2168352afa
commit
2954b33f97
|
@ -14,8 +14,8 @@
|
|||
<option name="values">
|
||||
<map>
|
||||
<entry key="assetSourceType" value="FILE" />
|
||||
<entry key="outputName" value="ic_clear_cache" />
|
||||
<entry key="sourceFile" value="$PROJECT_DIR$/../DisIcons/clear_cache.svg" />
|
||||
<entry key="outputName" value="ic_note" />
|
||||
<entry key="sourceFile" value="$PROJECT_DIR$/../DisIcons/ic_note.svg" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
|
|
|
@ -507,6 +507,32 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
|
||||
});
|
||||
|
||||
button = findViewById(R.id.NotesBtn);//NotesBtn
|
||||
button.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
public boolean onLongClick(View v) {
|
||||
showNotesInfo();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
button.setOnClickListener(new View.OnClickListener() {
|
||||
public void onClick(View arg0) {
|
||||
//first time tap check
|
||||
if (firstStart.getBoolean("firsttap", true)){
|
||||
showFirstTap();
|
||||
firstStart.edit().putBoolean("firsttap", false).apply();
|
||||
return;
|
||||
}
|
||||
String NotesApp = "it.niedermann.owncloud.notes";
|
||||
Intent notes = getPackageManager().getLaunchIntentForPackage(NotesApp);
|
||||
if(notes == null) {
|
||||
showNotesDialog();
|
||||
return;
|
||||
}
|
||||
else startActivity(notes);
|
||||
}
|
||||
});
|
||||
|
||||
button = findViewById(R.id.UserBtn);//UserBtn
|
||||
button.setOnLongClickListener(new View.OnLongClickListener() {
|
||||
@Override
|
||||
|
@ -1043,6 +1069,43 @@ public class MainActivity extends AppCompatActivity implements View.OnLongClickL
|
|||
builder.show();
|
||||
}
|
||||
|
||||
//There is no extra info about Nextcoud notes yet
|
||||
private void showNotesInfo() {
|
||||
final ScrollView dashboard = findViewById(R.id.dashboard);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
|
||||
builder.setCancelable(false);
|
||||
builder.setTitle(R.string.NotesTitle);
|
||||
builder.setMessage(getString(R.string.NotesInfo));
|
||||
builder.setPositiveButton(R.string.global_ok, null);
|
||||
//builder.setNegativeButton(R.string.tell_more, new DialogInterface.OnClickListener() {
|
||||
// @Override
|
||||
// public void onClick(DialogInterface dialog, int which) {
|
||||
// webView.loadUrl(Constants.URL_DisApp_NOTESHELP);
|
||||
// webView.setVisibility(View.VISIBLE);
|
||||
// dashboard.setVisibility(View.GONE);
|
||||
// }
|
||||
//});
|
||||
builder.show();
|
||||
}
|
||||
private void showNotesDialog(){
|
||||
final ScrollView dashboard = findViewById(R.id.dashboard);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
|
||||
builder.setCancelable(false);
|
||||
builder.setTitle(R.string.DiaInstallTitle);
|
||||
builder.setMessage(getString(R.string.NotesDialog));
|
||||
builder.setPositiveButton(R.string.global_install, new DialogInterface.OnClickListener() {
|
||||
String NotesApp = "it.niedermann.owncloud.notes";
|
||||
Intent notes = getPackageManager().getLaunchIntentForPackage(NotesApp);
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
notes = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + NotesApp));
|
||||
startActivity(notes);
|
||||
}
|
||||
});
|
||||
builder.setNegativeButton(R.string.global_cancel , null);
|
||||
builder.show();
|
||||
}
|
||||
|
||||
private void showUserInfo() {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
|
||||
builder.setCancelable(false)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<vector android:height="24dp" android:viewportHeight="48"
|
||||
android:viewportWidth="48" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillAlpha="1" android:fillColor="#ffffff"
|
||||
android:pathData="m12.625,30.625 l4.75,4.75L15.75,37L14,37L14,34L11,34L11,32.25ZM25.5625,18.4375c0.25,0.2188 0.1875,0.6563 -0.0938,0.9375L16.375,28.4688C16.0938,28.75 15.6563,28.8125 15.4375,28.5625 15.1875,28.3437 15.25,27.9062 15.5313,27.625L24.625,18.5312c0.2813,-0.2813 0.7188,-0.3438 0.9375,-0.0937zM17,40 L34,23 25,14 8,31v9zM27,12 L29.875,9.125c1.1563,-1.1563 1.1563,-3.0938 0,-4.25l-4.75,-4.75c-1.1563,-1.1563 -3.0938,-1.1563 -4.25,0L27,12ZM48,9v30c0,4.9688 -4.0313,9 -9,9L9,48C4.0313,48 0,43.9688 0,39L0,9C0,4.0313 4.0313,0 9,0h30c4.9688,0 9,4.0313 9,9z" android:strokeWidth="0.03125"/>
|
||||
</vector>
|
|
@ -194,13 +194,22 @@
|
|||
android:gravity="center_horizontal"
|
||||
android:id="@+id/group4"
|
||||
android:layout_below="@+id/group3">
|
||||
<Button
|
||||
android:id="@+id/NotesBtn"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="24dp"
|
||||
android:drawableTop="@drawable/ic_notes"
|
||||
android:text="@string/action_notes"
|
||||
android:textColor="#ffffff" />
|
||||
<Button
|
||||
android:id="@+id/UserBtn"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="24dp"
|
||||
android:drawableTop="@drawable/ic_poll"
|
||||
android:drawableTop="@drawable/ic_user"
|
||||
android:text="@string/action_user"
|
||||
android:textColor="#ffffff" />
|
||||
|
||||
|
@ -224,15 +233,22 @@
|
|||
android:text="@string/action_howto"
|
||||
android:textColor="#ffffff" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/AboudBtn"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="24dp"
|
||||
android:drawableTop="@drawable/ic_about"
|
||||
android:text="@string/action_about"
|
||||
android:textColor="#ffffff" />
|
||||
android:id="@+id/group5"
|
||||
android:layout_below="@+id/group4"><!-- android:gravity="center_horizontal" -->
|
||||
<Button
|
||||
android:id="@+id/AboudBtn"
|
||||
style="?android:attr/borderlessButtonStyle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxWidth="24dp"
|
||||
android:drawableTop="@drawable/ic_about"
|
||||
android:text="@string/action_about"
|
||||
android:textColor="#ffffff" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
</ScrollView>
|
||||
|
|
|
@ -152,4 +152,8 @@
|
|||
<string name="Scheduled">Scheduled</string>
|
||||
<string name="Investigating">Investigating</string>
|
||||
<string name="Identified">Identified</string>
|
||||
<string name="NotesTitle">Nextcloud Notes Info</string>
|
||||
<string name="NotesInfo">The notes app is a distraction free notes taking app for Nextcloud</string>
|
||||
<string name="NotesDialog">To continue you need to install Notes first.\nPlease select install to continue with the installatin on F-Droid.</string>
|
||||
<string name="action_notes">Notes</string>
|
||||
</resources>
|
||||
|
|
|
@ -181,4 +181,8 @@
|
|||
<string name="Scheduled">Scheduled</string>
|
||||
<string name="Investigating">Investigating</string>
|
||||
<string name="Identified">Identified</string>
|
||||
<string name="NotesTitle">Nextcloud Notes Info</string>
|
||||
<string name="NotesInfo">The notes app is a distraction free notes taking app for Nextcloud</string>
|
||||
<string name="NotesDialog">To continue you need to install Notes first.\nPlease select install to continue with the installatin on F-Droid.</string>
|
||||
<string name="action_notes">Notes</string>
|
||||
</resources>
|
||||
|
|
|
@ -151,4 +151,8 @@
|
|||
<string name="Scheduled">Pianificato</string>
|
||||
<string name="Investigating">Indagando</string>
|
||||
<string name="Identified">Identificato</string>
|
||||
<string name="NotesTitle">Nextcloud Notes Info</string>
|
||||
<string name="NotesInfo">The notes app is a distraction free notes taking app for Nextcloud</string>
|
||||
<string name="NotesDialog">To continue you need to install Notes first.\nPlease select install to continue with the installatin on F-Droid.</string>
|
||||
<string name="action_notes">Notes</string>
|
||||
</resources>
|
||||
|
|
|
@ -152,4 +152,8 @@
|
|||
<string name="Scheduled">Gepland</string>
|
||||
<string name="Investigating">Aan het onderzoeken</string>
|
||||
<string name="Identified">Geïdentificeerd</string>
|
||||
<string name="NotesTitle">Nextcloud Notes Info</string>
|
||||
<string name="NotesInfo">The notes app is a distraction free notes taking app for Nextcloud</string>
|
||||
<string name="NotesDialog">To continue you need to install Notes first.\nPlease select install to continue with the installatin on F-Droid.</string>
|
||||
<string name="action_notes">Notes</string>
|
||||
</resources>
|
||||
|
|
|
@ -151,4 +151,8 @@
|
|||
<string name="Scheduled">Scheduled</string>
|
||||
<string name="Investigating">Investigating</string>
|
||||
<string name="Identified">Identified</string>
|
||||
<string name="NotesTitle">Nextcloud Notes Info</string>
|
||||
<string name="NotesInfo">The notes app is a distraction free notes taking app for Nextcloud</string>
|
||||
<string name="NotesDialog">To continue you need to install Notes first.\nPlease select install to continue with the installatin on F-Droid.</string>
|
||||
<string name="action_notes">Notes</string>
|
||||
</resources>
|
||||
|
|
|
@ -152,4 +152,8 @@
|
|||
<string name="Scheduled">Scheduled</string>
|
||||
<string name="Investigating">Investigating</string>
|
||||
<string name="Identified">Identified</string>
|
||||
<string name="NotesTitle">Nextcloud Notes Info</string>
|
||||
<string name="NotesInfo">The notes app is a distraction free notes taking app for Nextcloud</string>
|
||||
<string name="NotesDialog">To continue you need to install Notes first.\nPlease select install to continue with the installatin on F-Droid.</string>
|
||||
<string name="action_notes">Notes</string>
|
||||
</resources>
|
||||
|
|
|
@ -152,4 +152,8 @@
|
|||
<string name="Scheduled">Scheduled</string>
|
||||
<string name="Investigating">Investigating</string>
|
||||
<string name="Identified">Identified</string>
|
||||
<string name="NotesTitle">Nextcloud Notes Info</string>
|
||||
<string name="NotesInfo">The notes app is a distraction free notes taking app for Nextcloud</string>
|
||||
<string name="NotesDialog">To continue you need to install Notes first.\nPlease select install to continue with the installatin on F-Droid.</string>
|
||||
<string name="action_notes">Notes</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue