diff options
author | Christian Schneppe <christian.schneppe@pix-art.de> | 2019-11-14 20:31:42 +0100 |
---|---|---|
committer | Christian Schneppe <christian.schneppe@pix-art.de> | 2019-11-15 17:14:08 +0100 |
commit | f42f00b40eaa0ba9ed03592deea2651cab8ed4a0 (patch) | |
tree | d89f166d4facb74e057ffdb33f268b1c44c83249 /src/main | |
parent | 6a8fb3e8aed08df03198b5909964fb91a5e78f39 (diff) |
rework IntroActivity a bit
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/IntroActivity.java | 8 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/StartConversationActivity.java | 3 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/WelcomeActivity.java | 3 | ||||
-rw-r--r-- | src/main/res/layout/activity_import_backup.xml | 2 | ||||
-rw-r--r-- | src/main/res/layout/activity_magic_create.xml | 2 | ||||
-rw-r--r-- | src/main/res/layout/activity_start_ui.xml | 8 | ||||
-rw-r--r-- | src/main/res/values-de/strings.xml | 1 | ||||
-rw-r--r-- | src/main/res/values-es/strings.xml | 1 | ||||
-rw-r--r-- | src/main/res/values/strings.xml | 4 |
9 files changed, 14 insertions, 18 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/IntroActivity.java b/src/main/java/de/pixart/messenger/ui/IntroActivity.java index d368c3274..da2b29e14 100644 --- a/src/main/java/de/pixart/messenger/ui/IntroActivity.java +++ b/src/main/java/de/pixart/messenger/ui/IntroActivity.java @@ -18,6 +18,8 @@ public class IntroActivity extends AppIntro { public static final String ACTIVITY = "activity"; public static final String MULTICHAT = "multi_chat"; public static final String START_UI = "StartUI"; + public static final String WELCOME_ACTIVITY = "WelcomeActivity"; + public static final String START_CONVERSATION_ACTIVITY = "StartConversationActivity"; public static final String CONVERSATIONS_ACTIVITY = "ConversationsActivity"; public static final String CONTACT_DETAILS_ACTIVITY = "ContactDetailsActivity"; public static final String CONFERENCE_DETAILS_ACTIVITY = "ConferenceDetailsActivity"; @@ -90,7 +92,8 @@ public class IntroActivity extends AppIntro { permissions3.setImageDrawable(R.drawable.intro_location_icon); permissions3.setBgColor(backgroundColor); addSlide(AppIntroFragment.newInstance(permissions3)); - + break; + case WELCOME_ACTIVITY: SliderPage account = new SliderPage(); account.setTitle(getString(R.string.intro_account)); account.setDescription(getString(R.string.intro_desc_account)); @@ -111,7 +114,8 @@ public class IntroActivity extends AppIntro { account3.setImageDrawable(R.drawable.intro_account_icon); account3.setBgColor(backgroundColor); addSlide(AppIntroFragment.newInstance(account3)); - + break; + case START_CONVERSATION_ACTIVITY: SliderPage startChatting = new SliderPage(); startChatting.setTitle(getString(R.string.intro_start_chatting)); startChatting.setDescription(getString(R.string.intro_desc_start_chatting)); diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java index 574995e36..4cfd752b6 100644 --- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java @@ -71,6 +71,7 @@ import de.pixart.messenger.services.XmppConnectionService; import de.pixart.messenger.services.XmppConnectionService.OnRosterUpdate; import de.pixart.messenger.ui.adapter.ListItemAdapter; import de.pixart.messenger.ui.interfaces.OnBackendConnected; +import de.pixart.messenger.ui.util.IntroHelper; import de.pixart.messenger.ui.util.JidDialog; import de.pixart.messenger.ui.util.PendingItem; import de.pixart.messenger.ui.util.SoftKeyboardUtils; @@ -273,10 +274,10 @@ public class StartConversationActivity extends XmppActivity implements XmppConne }); mListPagerAdapter = new ListPagerAdapter(getSupportFragmentManager()); binding.startConversationViewPager.setAdapter(mListPagerAdapter); - mConferenceAdapter = new ListItemAdapter(this, conferences); mContactsAdapter = new ListItemAdapter(this, contacts); mContactsAdapter.setOnTagClickedListener(this.mOnTagClickedListener); + IntroHelper.showIntro(this, false); final SharedPreferences preferences = getPreferences(); this.mHideOfflineContacts = QuickConversationsService.isConversations() && preferences.getBoolean("hide_offline", false); diff --git a/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java b/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java index a46b24a5a..d0257e44b 100644 --- a/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java +++ b/src/main/java/de/pixart/messenger/ui/WelcomeActivity.java @@ -12,6 +12,7 @@ import android.widget.TextView; import android.widget.Toast; import de.pixart.messenger.R; +import de.pixart.messenger.ui.util.IntroHelper; import static de.pixart.messenger.Config.DISALLOW_REGISTRATION_IN_UI; import static de.pixart.messenger.utils.PermissionUtils.allGranted; @@ -60,7 +61,7 @@ public class WelcomeActivity extends XmppActivity { ab.setDisplayShowHomeEnabled(false); ab.setDisplayHomeAsUpEnabled(false); } - + IntroHelper.showIntro(this, false); final Button ImportDatabase = findViewById(R.id.import_database); final TextView ImportText = findViewById(R.id.import_text); if (hasStoragePermission(REQUEST_IMPORT_BACKUP)) { diff --git a/src/main/res/layout/activity_import_backup.xml b/src/main/res/layout/activity_import_backup.xml index f1eb37430..125bb43bd 100644 --- a/src/main/res/layout/activity_import_backup.xml +++ b/src/main/res/layout/activity_import_backup.xml @@ -36,7 +36,7 @@ android:id="@+id/list" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?attr/color_background_tertiary" + android:background="?attr/color_background_secondary" android:orientation="vertical" app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" /> diff --git a/src/main/res/layout/activity_magic_create.xml b/src/main/res/layout/activity_magic_create.xml index 1ecf8a346..e315a634b 100644 --- a/src/main/res/layout/activity_magic_create.xml +++ b/src/main/res/layout/activity_magic_create.xml @@ -14,7 +14,7 @@ <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" - android:background="?attr/color_background_primary"> + android:background="?attr/color_background_secondary"> <LinearLayout android:id="@+id/linearLayout" diff --git a/src/main/res/layout/activity_start_ui.xml b/src/main/res/layout/activity_start_ui.xml index 8db66bb3e..1d068ef39 100644 --- a/src/main/res/layout/activity_start_ui.xml +++ b/src/main/res/layout/activity_start_ui.xml @@ -3,12 +3,4 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - <ProgressBar - android:id="@+id/progressBar" - style="?android:attr/progressBarStyleLarge" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_centerHorizontal="true" - android:layout_centerVertical="true" /> - </RelativeLayout> diff --git a/src/main/res/values-de/strings.xml b/src/main/res/values-de/strings.xml index 11a4773c9..245d8430f 100644 --- a/src/main/res/values-de/strings.xml +++ b/src/main/res/values-de/strings.xml @@ -948,7 +948,6 @@ <string name="intro_desc_required_permissions">Am Ende des Intros wirst du gefragt, Zugriff auf externen Speicher zuzulassen (erforderlich), wenn du ihn nicht bereits erteilt hast. Zusätzliche Berechtigungen werden bei Bedarf angefragt und sind optional.</string> <string name="intro_account">Dein Profil</string> <string name="intro_desc_account">Wenn du bereits ein Profil hast, kannst du dich einfach mit deiner Jabber-ID und deinem Passwort anmelden</string> - <string name="intro_start_chatting">Kontakte</string> <string name="intro_desc_start_chatting">Hast du den Adressbuchzugriff erlaubt, werden bereits vorhandene Jabber-Kontakte automatisch in deiner Kontaktliste angezeigt. Andernfalls füge einfach Jabber-IDs hinzu</string> <string name="intro_desc_open_chat">Jetzt kannst du mit dem Chatten beginnen, Orte, Dateien, Videos und Bilder freigeben oder Sprachnachrichten senden.</string> <string name="intro_chat_details">Chat-Details</string> diff --git a/src/main/res/values-es/strings.xml b/src/main/res/values-es/strings.xml index ad0ad2288..b2ce3c27e 100644 --- a/src/main/res/values-es/strings.xml +++ b/src/main/res/values-es/strings.xml @@ -947,7 +947,6 @@ <string name="intro_required_permissions">Permisos necesarios</string> <string name="intro_account">Tu cuenta</string> <string name="intro_desc_account">Si ya tienes una cuenta, puedes simplemente entrar con tu Jabber-ID y contraseña</string> - <string name="intro_start_chatting">Contactos</string> <string name="intro_desc_open_chat">Ahora ya puedes empezar a chatear, compartir ubicaciones, archivos, videos e imágenes, o enviar mensajes de voz.</string> <string name="intro_chat_details">Detalles del chat</string> <string name="intro_desc_chat_details">¿Quieres abrir los detalles del chat? Pulsa el nombre del chat en la barra superior de menú.</string> diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 634f4beef..7c899ecd4 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -950,7 +950,7 @@ <string name="intro_desc_required_permissions">At the end of the intro you will be asked to grant storage permissions (mandatory), if you have not already given them. Addition permissions are requested as needed and are optional.</string> <string name="intro_account">Your account</string> <string name="intro_desc_account">If you already have an account, you can simply log in with your Jabber-ID and password</string> - <string name="intro_start_chatting">Contacts</string> + <string name="intro_start_chatting">Start chatting</string> <string name="intro_desc_start_chatting">If you have given the contact permissions, already existing Jabber contacts are automatically displayed in your address book. Otherwise, just add Jabber-IDs</string> <string name="intro_desc_open_chat">Now you can start chatting, share locations, files, videos and images or send voice messages.</string> <string name="intro_chat_details">Chat details</string> @@ -969,7 +969,7 @@ <string name="open_join_dialog">Join public channel…</string> <string name="intro_optional_permissions">Optional permissions</string> <string name="intro_desc_optional_permissions2">Permissions for your location is needed if you would like to share your location.\nFor sharing voice messages it is required to get access to your microphone.</string> - <string name="intro_desc_account3">You have the option to import an existing account.\nJust touch to the import button. If there are backup files available, they will be shown. Choose an account to import.</string> + <string name="intro_desc_account3">You have the option to import an existing account.\nIf there are backup files available, they will be shown.</string> <string name="intro_desc_start_chatting2">You can also add, create or join multi user chats - so-called MUCs. They where distinguished between private group chats and public group chats - so called channels.</string> <string name="intro_desc_start_chatting3">Congratulations!\nHere we go and have fun…</string> <string name="intro_privacy">Your privacy\nYour sovereignty</string> |