mirror of https://github.com/M66B/FairEmail.git
Added legend
This commit is contained in:
parent
e60f8a6ffd
commit
12779b6ff6
|
@ -117,12 +117,15 @@ public class ActivityView extends ActivityBase implements FragmentManager.OnBack
|
|||
case R.string.menu_operations:
|
||||
onMenuOperations();
|
||||
break;
|
||||
case R.string.menu_privacy:
|
||||
onMenuPrivacy();
|
||||
case R.string.menu_legend:
|
||||
onMenuLegend();
|
||||
break;
|
||||
case R.string.menu_faq:
|
||||
onMenuFAQ();
|
||||
break;
|
||||
case R.string.menu_privacy:
|
||||
onMenuPrivacy();
|
||||
break;
|
||||
case R.string.menu_about:
|
||||
onMenuAbout();
|
||||
break;
|
||||
|
@ -165,13 +168,15 @@ public class ActivityView extends ActivityBase implements FragmentManager.OnBack
|
|||
if (PreferenceManager.getDefaultSharedPreferences(ActivityView.this).getBoolean("debug", false))
|
||||
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_list_24, R.string.menu_operations));
|
||||
|
||||
if (getIntentPrivacy().resolveActivity(getPackageManager()) != null)
|
||||
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_account_box_24, R.string.menu_privacy));
|
||||
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_help_24, R.string.menu_legend));
|
||||
|
||||
if (getIntentFAQ().resolveActivity(getPackageManager()) != null)
|
||||
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_question_answer_24, R.string.menu_faq));
|
||||
|
||||
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_help_24, R.string.menu_about));
|
||||
if (getIntentPrivacy().resolveActivity(getPackageManager()) != null)
|
||||
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_account_box_24, R.string.menu_privacy));
|
||||
|
||||
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_info_24, R.string.menu_about));
|
||||
|
||||
if (getIntentOtherApps().resolveActivity(getPackageManager()) != null)
|
||||
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_get_app_24, R.string.menu_other));
|
||||
|
@ -446,14 +451,20 @@ public class ActivityView extends ActivityBase implements FragmentManager.OnBack
|
|||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onMenuPrivacy() {
|
||||
startActivity(getIntentPrivacy());
|
||||
private void onMenuLegend() {
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentLegend()).addToBackStack("legend");
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onMenuFAQ() {
|
||||
startActivity(getIntentFAQ());
|
||||
}
|
||||
|
||||
private void onMenuPrivacy() {
|
||||
startActivity(getIntentPrivacy());
|
||||
}
|
||||
|
||||
private void onMenuAbout() {
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentAbout()).addToBackStack("about");
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
package eu.faircode.email;
|
||||
|
||||
/*
|
||||
This file is part of FairEmail.
|
||||
|
||||
FairEmail is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
NetGuard is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with NetGuard. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright 2018 by Marcel Bokhorst (M66B)
|
||||
*/
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class FragmentLegend extends FragmentEx {
|
||||
@Override
|
||||
@Nullable
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
setSubtitle(R.string.menu_legend);
|
||||
|
||||
View view = inflater.inflate(R.layout.fragment_legend, container, false);
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM13,17h-2v-6h2v6zM13,9h-2L11,7h2v2z"/>
|
||||
</vector>
|
|
@ -0,0 +1,172 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="18dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivCC"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/baseline_people_24"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCC"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
android:text="@string/title_legend_cc"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivCC"
|
||||
app:layout_constraintStart_toEndOf="@id/ivCC"
|
||||
app:layout_constraintTop_toTopOf="@id/ivCC" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivAttachment"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:src="@drawable/baseline_attachment_24"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivCC" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAttachment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
android:text="@string/title_legend_attachment"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivAttachment"
|
||||
app:layout_constraintStart_toEndOf="@id/ivAttachment"
|
||||
app:layout_constraintTop_toTopOf="@id/ivAttachment" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSynchronize"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:src="@drawable/baseline_sync_24"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivAttachment" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSynchronize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
android:text="@string/title_legend_synchronize"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivSynchronize"
|
||||
app:layout_constraintStart_toEndOf="@id/ivSynchronize"
|
||||
app:layout_constraintTop_toTopOf="@id/ivSynchronize" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPrimary"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:src="@drawable/baseline_star_24"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivSynchronize" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPrimary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
android:text="@string/title_legend_primary"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivPrimary"
|
||||
app:layout_constraintStart_toEndOf="@id/ivPrimary"
|
||||
app:layout_constraintTop_toTopOf="@id/ivPrimary" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivDisconnected"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:src="@drawable/baseline_cloud_off_24"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivPrimary" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDisconnected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
android:text="@string/title_legend_disconnected"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivDisconnected"
|
||||
app:layout_constraintStart_toEndOf="@id/ivDisconnected"
|
||||
app:layout_constraintTop_toTopOf="@id/ivDisconnected" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivConnecting"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:src="@drawable/baseline_cloud_queue_24"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivDisconnected" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvConnecting"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
android:text="@string/title_legend_connecting"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivConnecting"
|
||||
app:layout_constraintStart_toEndOf="@id/ivConnecting"
|
||||
app:layout_constraintTop_toTopOf="@id/ivConnecting" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivConnected"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:src="@drawable/baseline_cloud_24"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivConnecting" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvConnected"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
android:text="@string/title_legend_connected"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivConnected"
|
||||
app:layout_constraintStart_toEndOf="@id/ivConnected"
|
||||
app:layout_constraintTop_toTopOf="@id/ivConnected" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivClosing"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:src="@drawable/baseline_close_24"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivConnected" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvClosing"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="18dp"
|
||||
android:text="@string/title_legend_closing"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivClosing"
|
||||
app:layout_constraintStart_toEndOf="@id/ivClosing"
|
||||
app:layout_constraintTop_toTopOf="@id/ivClosing" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</ScrollView>
|
|
@ -33,8 +33,9 @@
|
|||
|
||||
<string name="menu_setup">Setup</string>
|
||||
<string name="menu_operations">Operations</string>
|
||||
<string name="menu_privacy">Privacy</string>
|
||||
<string name="menu_legend">Legend</string>
|
||||
<string name="menu_faq">FAQ</string>
|
||||
<string name="menu_privacy">Privacy</string>
|
||||
<string name="menu_about">About</string>
|
||||
<string name="menu_other">Other apps</string>
|
||||
|
||||
|
@ -162,6 +163,15 @@
|
|||
<string name="title_draft_saved">Draft saved</string>
|
||||
<string name="title_queued">Sending message</string>
|
||||
|
||||
<string name="title_legend_cc">CC/BCC</string>
|
||||
<string name="title_legend_attachment">Attachment</string>
|
||||
<string name="title_legend_synchronize">Synchronize</string>
|
||||
<string name="title_legend_primary">Primary</string>
|
||||
<string name="title_legend_disconnected">Disconnected</string>
|
||||
<string name="title_legend_connecting">Connecting</string>
|
||||
<string name="title_legend_connected">Connected</string>
|
||||
<string name="title_legend_closing">Closing</string>
|
||||
|
||||
<string name="title_debug_info">Debug info</string>
|
||||
<string name="title_debug_info_remark">Please describe the problem and indicate the time of the problem:</string>
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue