Add a gradient and background to the onboarding megaphone.
This commit is contained in:
parent
5d515198e6
commit
e6dfe96569
5 changed files with 54 additions and 22 deletions
|
@ -81,7 +81,7 @@ public class ConversationListArchiveFragment extends ConversationListFragment im
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void onPostSubmitList() {
|
||||
protected void onPostSubmitList(int conversationCount) {
|
||||
list.setVisibility(View.VISIBLE);
|
||||
|
||||
if (emptyState.resolved()) {
|
||||
|
@ -148,6 +148,11 @@ public class ConversationListArchiveFragment extends ConversationListFragment im
|
|||
}
|
||||
}.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, threadId);
|
||||
}
|
||||
|
||||
@Override
|
||||
void updateEmptyState(boolean isConversationEmpty) {
|
||||
// Do nothing
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -832,10 +832,10 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
|||
|
||||
private void onSubmitList(@NonNull List<Conversation> conversationList) {
|
||||
defaultAdapter.submitList(conversationList);
|
||||
onPostSubmitList();
|
||||
onPostSubmitList(conversationList.size());
|
||||
}
|
||||
|
||||
private void updateEmptyState(boolean isConversationEmpty) {
|
||||
void updateEmptyState(boolean isConversationEmpty) {
|
||||
if (isConversationEmpty) {
|
||||
Log.i(TAG, "Received an empty data set.");
|
||||
list.setVisibility(View.INVISIBLE);
|
||||
|
@ -856,7 +856,11 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
|||
}
|
||||
}
|
||||
|
||||
protected void onPostSubmitList() {
|
||||
protected void onPostSubmitList(int conversationCount) {
|
||||
if (conversationCount >= 6 && (SignalStore.onboarding().shouldShowInviteFriends() || SignalStore.onboarding().shouldShowNewGroup())) {
|
||||
SignalStore.onboarding().clearAll();
|
||||
ApplicationDependencies.getMegaphoneRepository().markFinished(Megaphones.Event.ONBOARDING);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<gradient
|
||||
android:type="linear"
|
||||
android:angle="90"
|
||||
android:startColor="@color/signal_background_primary"
|
||||
android:endColor="@color/signal_transparent" />
|
||||
</shape>
|
|
@ -139,7 +139,7 @@
|
|||
android:clipToPadding="false"
|
||||
android:nextFocusDown="@+id/fab"
|
||||
android:nextFocusForward="@+id/fab"
|
||||
android:paddingBottom="150dp"
|
||||
android:paddingBottom="160dp"
|
||||
android:scrollbars="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/reminder"
|
||||
|
|
|
@ -5,23 +5,37 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="14dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
tools:parentTag="android.widget.FrameLayout">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/megaphone_onboarding_gradient" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="12dp"
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false">
|
||||
android:clipChildren="false"
|
||||
android:background="@color/signal_background_primary">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/onboarding_megaphone_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="4dp"
|
||||
style="@style/TextAppearance.Signal.Title2"
|
||||
android:text="@string/Megaphones_get_started"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
@ -38,5 +52,6 @@
|
|||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</merge>
|
Loading…
Add table
Reference in a new issue