Added a new onboarding megaphone.
|
@ -52,6 +52,7 @@ public final class AppInitialization {
|
||||||
|
|
||||||
ApplicationDependencies.getMegaphoneRepository().onFirstEverAppLaunch();
|
ApplicationDependencies.getMegaphoneRepository().onFirstEverAppLaunch();
|
||||||
SignalStore.onFirstEverAppLaunch();
|
SignalStore.onFirstEverAppLaunch();
|
||||||
|
SignalStore.onboarding().clearAll();
|
||||||
ApplicationDependencies.getJobManager().add(StickerPackDownloadJob.forInstall(BlessedPacks.ZOZO.getPackId(), BlessedPacks.ZOZO.getPackKey(), false));
|
ApplicationDependencies.getJobManager().add(StickerPackDownloadJob.forInstall(BlessedPacks.ZOZO.getPackId(), BlessedPacks.ZOZO.getPackKey(), false));
|
||||||
ApplicationDependencies.getJobManager().add(StickerPackDownloadJob.forInstall(BlessedPacks.BANDIT.getPackId(), BlessedPacks.BANDIT.getPackKey(), false));
|
ApplicationDependencies.getJobManager().add(StickerPackDownloadJob.forInstall(BlessedPacks.BANDIT.getPackId(), BlessedPacks.BANDIT.getPackKey(), false));
|
||||||
ApplicationDependencies.getJobManager().add(StickerPackDownloadJob.forReference(BlessedPacks.SWOON_HANDS.getPackId(), BlessedPacks.SWOON_HANDS.getPackKey()));
|
ApplicationDependencies.getJobManager().add(StickerPackDownloadJob.forReference(BlessedPacks.SWOON_HANDS.getPackId(), BlessedPacks.SWOON_HANDS.getPackKey()));
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
package org.thoughtcrime.securesms.components.reminder;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.View.OnClickListener;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.R;
|
|
||||||
import org.thoughtcrime.securesms.phonenumbers.PhoneNumberFormatter;
|
|
||||||
import org.thoughtcrime.securesms.util.SmsUtil;
|
|
||||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
|
||||||
import org.thoughtcrime.securesms.util.Util;
|
|
||||||
|
|
||||||
public class DefaultSmsReminder extends Reminder {
|
|
||||||
|
|
||||||
public DefaultSmsReminder(@NonNull Fragment fragment, short requestCode) {
|
|
||||||
super(fragment.getString(R.string.reminder_header_sms_default_title),
|
|
||||||
fragment.getString(R.string.reminder_header_sms_default_text));
|
|
||||||
|
|
||||||
final OnClickListener okListener = new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
TextSecurePreferences.setPromptedDefaultSmsProvider(fragment.requireContext(), true);
|
|
||||||
fragment.startActivityForResult(SmsUtil.getSmsRoleIntent(fragment.requireContext()), requestCode);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
final OnClickListener dismissListener = new OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
TextSecurePreferences.setPromptedDefaultSmsProvider(fragment.requireContext(), true);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
setOkListener(okListener);
|
|
||||||
setDismissListener(dismissListener);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isEligible(Context context) {
|
|
||||||
final boolean isDefault = Util.isDefaultSmsProvider(context);
|
|
||||||
if (isDefault) {
|
|
||||||
TextSecurePreferences.setPromptedDefaultSmsProvider(context, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
return !isDefault && !TextSecurePreferences.hasPromptedDefaultSmsProvider(context) && PhoneNumberFormatter.getLocalCountryCode() != 91;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,45 +0,0 @@
|
||||||
package org.thoughtcrime.securesms.components.reminder;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.database.Cursor;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.View.OnClickListener;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.InviteActivity;
|
|
||||||
import org.thoughtcrime.securesms.R;
|
|
||||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
|
||||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
|
||||||
|
|
||||||
public class ShareReminder extends Reminder {
|
|
||||||
|
|
||||||
public ShareReminder(final @NonNull Context context) {
|
|
||||||
super(context.getString(R.string.reminder_header_share_title),
|
|
||||||
context.getString(R.string.reminder_header_share_text));
|
|
||||||
|
|
||||||
setDismissListener(new OnClickListener() {
|
|
||||||
@Override public void onClick(View v) {
|
|
||||||
TextSecurePreferences.setPromptedShare(context, true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
setOkListener(new OnClickListener() {
|
|
||||||
@Override public void onClick(View v) {
|
|
||||||
TextSecurePreferences.setPromptedShare(context, true);
|
|
||||||
context.startActivity(new Intent(context, InviteActivity.class));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isEligible(final @NonNull Context context) {
|
|
||||||
if (!TextSecurePreferences.isPushRegistered(context) ||
|
|
||||||
TextSecurePreferences.hasPromptedShare(context))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return DatabaseFactory.getThreadDatabase(context).getUnarchivedConversationListCount() >= 1;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -80,7 +80,6 @@ import org.thoughtcrime.securesms.components.RatingManager;
|
||||||
import org.thoughtcrime.securesms.components.SearchToolbar;
|
import org.thoughtcrime.securesms.components.SearchToolbar;
|
||||||
import org.thoughtcrime.securesms.components.recyclerview.DeleteItemAnimator;
|
import org.thoughtcrime.securesms.components.recyclerview.DeleteItemAnimator;
|
||||||
import org.thoughtcrime.securesms.components.registration.PulsingFloatingActionButton;
|
import org.thoughtcrime.securesms.components.registration.PulsingFloatingActionButton;
|
||||||
import org.thoughtcrime.securesms.components.reminder.DefaultSmsReminder;
|
|
||||||
import org.thoughtcrime.securesms.components.reminder.DozeReminder;
|
import org.thoughtcrime.securesms.components.reminder.DozeReminder;
|
||||||
import org.thoughtcrime.securesms.components.reminder.ExpiredBuildReminder;
|
import org.thoughtcrime.securesms.components.reminder.ExpiredBuildReminder;
|
||||||
import org.thoughtcrime.securesms.components.reminder.OutdatedBuildReminder;
|
import org.thoughtcrime.securesms.components.reminder.OutdatedBuildReminder;
|
||||||
|
@ -88,8 +87,6 @@ import org.thoughtcrime.securesms.components.reminder.PushRegistrationReminder;
|
||||||
import org.thoughtcrime.securesms.components.reminder.Reminder;
|
import org.thoughtcrime.securesms.components.reminder.Reminder;
|
||||||
import org.thoughtcrime.securesms.components.reminder.ReminderView;
|
import org.thoughtcrime.securesms.components.reminder.ReminderView;
|
||||||
import org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder;
|
import org.thoughtcrime.securesms.components.reminder.ServiceOutageReminder;
|
||||||
import org.thoughtcrime.securesms.components.reminder.ShareReminder;
|
|
||||||
import org.thoughtcrime.securesms.components.reminder.SystemSmsImportReminder;
|
|
||||||
import org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder;
|
import org.thoughtcrime.securesms.components.reminder.UnauthorizedReminder;
|
||||||
import org.thoughtcrime.securesms.conversation.ConversationFragment;
|
import org.thoughtcrime.securesms.conversation.ConversationFragment;
|
||||||
import org.thoughtcrime.securesms.conversationlist.model.Conversation;
|
import org.thoughtcrime.securesms.conversationlist.model.Conversation;
|
||||||
|
@ -103,6 +100,7 @@ import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||||
import org.thoughtcrime.securesms.events.ReminderUpdateEvent;
|
import org.thoughtcrime.securesms.events.ReminderUpdateEvent;
|
||||||
import org.thoughtcrime.securesms.insights.InsightsLauncher;
|
import org.thoughtcrime.securesms.insights.InsightsLauncher;
|
||||||
import org.thoughtcrime.securesms.jobs.ServiceOutageDetectionJob;
|
import org.thoughtcrime.securesms.jobs.ServiceOutageDetectionJob;
|
||||||
|
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||||
import org.thoughtcrime.securesms.lock.v2.CreateKbsPinActivity;
|
import org.thoughtcrime.securesms.lock.v2.CreateKbsPinActivity;
|
||||||
import org.thoughtcrime.securesms.mediasend.MediaSendActivity;
|
import org.thoughtcrime.securesms.mediasend.MediaSendActivity;
|
||||||
import org.thoughtcrime.securesms.megaphone.Megaphone;
|
import org.thoughtcrime.securesms.megaphone.Megaphone;
|
||||||
|
@ -124,7 +122,6 @@ import org.thoughtcrime.securesms.util.SnapToTopDataObserver;
|
||||||
import org.thoughtcrime.securesms.util.StickyHeaderDecoration;
|
import org.thoughtcrime.securesms.util.StickyHeaderDecoration;
|
||||||
import org.thoughtcrime.securesms.util.Stopwatch;
|
import org.thoughtcrime.securesms.util.Stopwatch;
|
||||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||||
import org.thoughtcrime.securesms.util.Util;
|
|
||||||
import org.thoughtcrime.securesms.util.ViewUtil;
|
import org.thoughtcrime.securesms.util.ViewUtil;
|
||||||
import org.thoughtcrime.securesms.util.WindowUtil;
|
import org.thoughtcrime.securesms.util.WindowUtil;
|
||||||
import org.thoughtcrime.securesms.util.concurrent.SimpleTask;
|
import org.thoughtcrime.securesms.util.concurrent.SimpleTask;
|
||||||
|
@ -156,12 +153,6 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
||||||
|
|
||||||
private static final int MAXIMUM_PINNED_CONVERSATIONS = 4;
|
private static final int MAXIMUM_PINNED_CONVERSATIONS = 4;
|
||||||
|
|
||||||
private static final int[] EMPTY_IMAGES = new int[] { R.drawable.empty_inbox_1,
|
|
||||||
R.drawable.empty_inbox_2,
|
|
||||||
R.drawable.empty_inbox_3,
|
|
||||||
R.drawable.empty_inbox_4,
|
|
||||||
R.drawable.empty_inbox_5 };
|
|
||||||
|
|
||||||
private ActionMode actionMode;
|
private ActionMode actionMode;
|
||||||
private RecyclerView list;
|
private RecyclerView list;
|
||||||
private Stub<ReminderView> reminderView;
|
private Stub<ReminderView> reminderView;
|
||||||
|
@ -613,14 +604,8 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
||||||
return Optional.of(new ServiceOutageReminder(context));
|
return Optional.of(new ServiceOutageReminder(context));
|
||||||
} else if (OutdatedBuildReminder.isEligible()) {
|
} else if (OutdatedBuildReminder.isEligible()) {
|
||||||
return Optional.of(new OutdatedBuildReminder(context));
|
return Optional.of(new OutdatedBuildReminder(context));
|
||||||
} else if (DefaultSmsReminder.isEligible(context)) {
|
|
||||||
return Optional.of(new DefaultSmsReminder(this, SMS_ROLE_REQUEST_CODE));
|
|
||||||
} else if (Util.isDefaultSmsProvider(context) && SystemSmsImportReminder.isEligible(context)) {
|
|
||||||
return Optional.of((new SystemSmsImportReminder(context)));
|
|
||||||
} else if (PushRegistrationReminder.isEligible(context)) {
|
} else if (PushRegistrationReminder.isEligible(context)) {
|
||||||
return Optional.of((new PushRegistrationReminder(context)));
|
return Optional.of((new PushRegistrationReminder(context)));
|
||||||
} else if (ShareReminder.isEligible(context)) {
|
|
||||||
return Optional.of(new ShareReminder(context));
|
|
||||||
} else if (DozeReminder.isEligible(context)) {
|
} else if (DozeReminder.isEligible(context)) {
|
||||||
return Optional.of(new DozeReminder(context));
|
return Optional.of(new DozeReminder(context));
|
||||||
} else {
|
} else {
|
||||||
|
@ -858,8 +843,8 @@ public class ConversationListFragment extends MainFragment implements ActionMode
|
||||||
fab.startPulse(3 * 1000);
|
fab.startPulse(3 * 1000);
|
||||||
cameraFab.startPulse(3 * 1000);
|
cameraFab.startPulse(3 * 1000);
|
||||||
|
|
||||||
ImageView emptyImage = emptyState.get().findViewById(R.id.empty);
|
SignalStore.onboarding().setShowNewGroup(true);
|
||||||
emptyImage.setImageResource(EMPTY_IMAGES[(int) (Math.random() * EMPTY_IMAGES.length)]);
|
SignalStore.onboarding().setShowInviteFriends(true);
|
||||||
} else {
|
} else {
|
||||||
list.setVisibility(View.VISIBLE);
|
list.setVisibility(View.VISIBLE);
|
||||||
fab.stopPulse();
|
fab.stopPulse();
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
package org.thoughtcrime.securesms.keyvalue;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import org.thoughtcrime.securesms.phonenumbers.PhoneNumberFormatter;
|
||||||
|
import org.thoughtcrime.securesms.util.Util;
|
||||||
|
|
||||||
|
public final class OnboardingValues extends SignalStoreValues {
|
||||||
|
|
||||||
|
private static final String SHOW_NEW_GROUP = "onboarding.new_group";
|
||||||
|
private static final String SHOW_INVITE_FRIENDS = "onboarding.invite_friends";
|
||||||
|
private static final String SHOW_SMS = "onboarding.sms";
|
||||||
|
|
||||||
|
OnboardingValues(@NonNull KeyValueStore store) {
|
||||||
|
super(store);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void onFirstEverAppLaunch() {
|
||||||
|
putBoolean(SHOW_NEW_GROUP, true);
|
||||||
|
putBoolean(SHOW_INVITE_FRIENDS, true);
|
||||||
|
putBoolean(SHOW_SMS, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearAll() {
|
||||||
|
setShowNewGroup(false);
|
||||||
|
setShowInviteFriends(false);
|
||||||
|
setShowSms(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasOnboarding(@NonNull Context context) {
|
||||||
|
return shouldShowNewGroup() ||
|
||||||
|
shouldShowInviteFriends() ||
|
||||||
|
shouldShowSms(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShowNewGroup(boolean value) {
|
||||||
|
putBoolean(SHOW_NEW_GROUP, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean shouldShowNewGroup() {
|
||||||
|
return getBoolean(SHOW_NEW_GROUP, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShowInviteFriends(boolean value) {
|
||||||
|
putBoolean(SHOW_INVITE_FRIENDS, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean shouldShowInviteFriends() {
|
||||||
|
return getBoolean(SHOW_INVITE_FRIENDS, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setShowSms(boolean value) {
|
||||||
|
putBoolean(SHOW_SMS, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean shouldShowSms(@NonNull Context context) {
|
||||||
|
return getBoolean(SHOW_SMS, false) && !Util.isDefaultSmsProvider(context) && PhoneNumberFormatter.getLocalCountryCode() != 91;
|
||||||
|
}
|
||||||
|
}
|
|
@ -27,6 +27,7 @@ public final class SignalStore {
|
||||||
private final SettingsValues settingsValues;
|
private final SettingsValues settingsValues;
|
||||||
private final CertificateValues certificateValues;
|
private final CertificateValues certificateValues;
|
||||||
private final PhoneNumberPrivacyValues phoneNumberPrivacyValues;
|
private final PhoneNumberPrivacyValues phoneNumberPrivacyValues;
|
||||||
|
private final OnboardingValues onboardingValues;
|
||||||
|
|
||||||
private SignalStore() {
|
private SignalStore() {
|
||||||
this.store = new KeyValueStore(ApplicationDependencies.getApplication());
|
this.store = new KeyValueStore(ApplicationDependencies.getApplication());
|
||||||
|
@ -43,6 +44,7 @@ public final class SignalStore {
|
||||||
this.settingsValues = new SettingsValues(store);
|
this.settingsValues = new SettingsValues(store);
|
||||||
this.certificateValues = new CertificateValues(store);
|
this.certificateValues = new CertificateValues(store);
|
||||||
this.phoneNumberPrivacyValues = new PhoneNumberPrivacyValues(store);
|
this.phoneNumberPrivacyValues = new PhoneNumberPrivacyValues(store);
|
||||||
|
this.onboardingValues = new OnboardingValues(store);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void onFirstEverAppLaunch() {
|
public static void onFirstEverAppLaunch() {
|
||||||
|
@ -58,6 +60,7 @@ public final class SignalStore {
|
||||||
settings().onFirstEverAppLaunch();
|
settings().onFirstEverAppLaunch();
|
||||||
certificateValues().onFirstEverAppLaunch();
|
certificateValues().onFirstEverAppLaunch();
|
||||||
phoneNumberPrivacy().onFirstEverAppLaunch();
|
phoneNumberPrivacy().onFirstEverAppLaunch();
|
||||||
|
onboarding().onFirstEverAppLaunch();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static @NonNull KbsValues kbsValues() {
|
public static @NonNull KbsValues kbsValues() {
|
||||||
|
@ -112,6 +115,10 @@ public final class SignalStore {
|
||||||
return INSTANCE.phoneNumberPrivacyValues;
|
return INSTANCE.phoneNumberPrivacyValues;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static @NonNull OnboardingValues onboarding() {
|
||||||
|
return INSTANCE.onboardingValues;
|
||||||
|
}
|
||||||
|
|
||||||
public static @NonNull GroupsV2AuthorizationSignalStoreCache groupsV2AuthorizationCache() {
|
public static @NonNull GroupsV2AuthorizationSignalStoreCache groupsV2AuthorizationCache() {
|
||||||
return new GroupsV2AuthorizationSignalStoreCache(getStore());
|
return new GroupsV2AuthorizationSignalStoreCache(getStore());
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,6 +200,9 @@ public class Megaphone {
|
||||||
/** Specialized style for announcing link previews. */
|
/** Specialized style for announcing link previews. */
|
||||||
LINK_PREVIEWS,
|
LINK_PREVIEWS,
|
||||||
|
|
||||||
|
/** Specialized style for onboarding. */
|
||||||
|
ONBOARDING,
|
||||||
|
|
||||||
/** Basic bottom of the screen megaphone with optional snooze and action buttons. */
|
/** Basic bottom of the screen megaphone with optional snooze and action buttons. */
|
||||||
BASIC,
|
BASIC,
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ public class MegaphoneViewBuilder {
|
||||||
return buildReactionsMegaphone(context, megaphone, listener);
|
return buildReactionsMegaphone(context, megaphone, listener);
|
||||||
case LINK_PREVIEWS:
|
case LINK_PREVIEWS:
|
||||||
return buildLinkPreviewsMegaphone(context, megaphone, listener);
|
return buildLinkPreviewsMegaphone(context, megaphone, listener);
|
||||||
|
case ONBOARDING:
|
||||||
|
return buildOnboardingMegaphone(context, megaphone, listener);
|
||||||
case POPUP:
|
case POPUP:
|
||||||
return buildPopupMegaphone(context, megaphone, listener);
|
return buildPopupMegaphone(context, megaphone, listener);
|
||||||
default:
|
default:
|
||||||
|
@ -58,6 +60,15 @@ public class MegaphoneViewBuilder {
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static @NonNull View buildOnboardingMegaphone(@NonNull Context context,
|
||||||
|
@NonNull Megaphone megaphone,
|
||||||
|
@NonNull MegaphoneActionController listener)
|
||||||
|
{
|
||||||
|
OnboardingMegaphoneView view = new OnboardingMegaphoneView(context);
|
||||||
|
view.present(megaphone, listener);
|
||||||
|
return view;
|
||||||
|
}
|
||||||
|
|
||||||
private static @NonNull View buildPopupMegaphone(@NonNull Context context,
|
private static @NonNull View buildPopupMegaphone(@NonNull Context context,
|
||||||
@NonNull Megaphone megaphone,
|
@NonNull Megaphone megaphone,
|
||||||
@NonNull MegaphoneActionController listener)
|
@NonNull MegaphoneActionController listener)
|
||||||
|
|
|
@ -93,6 +93,7 @@ public final class Megaphones {
|
||||||
put(Event.RESEARCH, shouldShowResearchMegaphone(context) ? ShowForDurationSchedule.showForDays(7) : NEVER);
|
put(Event.RESEARCH, shouldShowResearchMegaphone(context) ? ShowForDurationSchedule.showForDays(7) : NEVER);
|
||||||
put(Event.DONATE, shouldShowDonateMegaphone(context) ? ShowForDurationSchedule.showForDays(7) : NEVER);
|
put(Event.DONATE, shouldShowDonateMegaphone(context) ? ShowForDurationSchedule.showForDays(7) : NEVER);
|
||||||
put(Event.GROUP_CALLING, shouldShowGroupCallingMegaphone() ? ALWAYS : NEVER);
|
put(Event.GROUP_CALLING, shouldShowGroupCallingMegaphone() ? ALWAYS : NEVER);
|
||||||
|
put(Event.ONBOARDING, shouldShowOnboardingMegaphone(context) ? ALWAYS : NEVER);
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,6 +117,8 @@ public final class Megaphones {
|
||||||
return buildDonateMegaphone(context);
|
return buildDonateMegaphone(context);
|
||||||
case GROUP_CALLING:
|
case GROUP_CALLING:
|
||||||
return buildGroupCallingMegaphone(context);
|
return buildGroupCallingMegaphone(context);
|
||||||
|
case ONBOARDING:
|
||||||
|
return buildOnboardingMegaphone();
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException("Event not handled!");
|
throw new IllegalArgumentException("Event not handled!");
|
||||||
}
|
}
|
||||||
|
@ -255,6 +258,12 @@ public final class Megaphones {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static @NonNull Megaphone buildOnboardingMegaphone() {
|
||||||
|
return new Megaphone.Builder(Event.ONBOARDING, Megaphone.Style.ONBOARDING)
|
||||||
|
.setPriority(Megaphone.Priority.DEFAULT)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
private static boolean shouldShowMessageRequestsMegaphone() {
|
private static boolean shouldShowMessageRequestsMegaphone() {
|
||||||
return Recipient.self().getProfileName() == ProfileName.EMPTY;
|
return Recipient.self().getProfileName() == ProfileName.EMPTY;
|
||||||
}
|
}
|
||||||
|
@ -275,6 +284,10 @@ public final class Megaphones {
|
||||||
return FeatureFlags.groupCalling();
|
return FeatureFlags.groupCalling();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean shouldShowOnboardingMegaphone(@NonNull Context context) {
|
||||||
|
return SignalStore.onboarding().hasOnboarding(context);
|
||||||
|
}
|
||||||
|
|
||||||
public enum Event {
|
public enum Event {
|
||||||
REACTIONS("reactions"),
|
REACTIONS("reactions"),
|
||||||
PINS_FOR_ALL("pins_for_all"),
|
PINS_FOR_ALL("pins_for_all"),
|
||||||
|
@ -284,7 +297,8 @@ public final class Megaphones {
|
||||||
CLIENT_DEPRECATED("client_deprecated"),
|
CLIENT_DEPRECATED("client_deprecated"),
|
||||||
RESEARCH("research"),
|
RESEARCH("research"),
|
||||||
DONATE("donate"),
|
DONATE("donate"),
|
||||||
GROUP_CALLING("group_calling");
|
GROUP_CALLING("group_calling"),
|
||||||
|
ONBOARDING("onboarding");
|
||||||
|
|
||||||
private final String key;
|
private final String key;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,262 @@
|
||||||
|
package org.thoughtcrime.securesms.megaphone;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.util.AttributeSet;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
|
import androidx.annotation.DrawableRes;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.StringRes;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import org.signal.core.util.logging.Log;
|
||||||
|
import org.thoughtcrime.securesms.InviteActivity;
|
||||||
|
import org.thoughtcrime.securesms.R;
|
||||||
|
import org.thoughtcrime.securesms.conversationlist.ConversationListFragment;
|
||||||
|
import org.thoughtcrime.securesms.groups.ui.creategroup.CreateGroupActivity;
|
||||||
|
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||||
|
import org.thoughtcrime.securesms.util.SmsUtil;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shows the a fun rail of cards that educate the user about some actions they can take right after
|
||||||
|
* they install the app.
|
||||||
|
*/
|
||||||
|
public class OnboardingMegaphoneView extends FrameLayout {
|
||||||
|
|
||||||
|
private static final String TAG = Log.tag(OnboardingMegaphoneView.class);
|
||||||
|
|
||||||
|
private RecyclerView cardList;
|
||||||
|
|
||||||
|
public OnboardingMegaphoneView(Context context) {
|
||||||
|
super(context);
|
||||||
|
initialize(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public OnboardingMegaphoneView(Context context, AttributeSet attrs) {
|
||||||
|
super(context, attrs);
|
||||||
|
initialize(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initialize(@NonNull Context context) {
|
||||||
|
inflate(context, R.layout.onboarding_megaphone, this);
|
||||||
|
|
||||||
|
this.cardList = findViewById(R.id.onboarding_megaphone_list);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void present(@NonNull Megaphone megaphone, @NonNull MegaphoneActionController listener) {
|
||||||
|
this.cardList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false));
|
||||||
|
this.cardList.setAdapter(new CardAdapter(getContext(), listener));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class CardAdapter extends RecyclerView.Adapter<CardViewHolder> implements ActionClickListener {
|
||||||
|
|
||||||
|
private static final int TYPE_GROUP = 0;
|
||||||
|
private static final int TYPE_INVITE = 1;
|
||||||
|
private static final int TYPE_SMS = 2;
|
||||||
|
|
||||||
|
private final Context context;
|
||||||
|
private final MegaphoneActionController controller;
|
||||||
|
private final List<Integer> data;
|
||||||
|
|
||||||
|
CardAdapter(@NonNull Context context, @NonNull MegaphoneActionController controller) {
|
||||||
|
this.context = context;
|
||||||
|
this.controller = controller;
|
||||||
|
this.data = buildData(context);
|
||||||
|
|
||||||
|
if (data.isEmpty()) {
|
||||||
|
Log.i(TAG, "Nothing to show (constructor)! Considering megaphone completed.");
|
||||||
|
controller.onMegaphoneCompleted(Megaphones.Event.ONBOARDING);
|
||||||
|
}
|
||||||
|
|
||||||
|
setHasStableIds(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemViewType(int position) {
|
||||||
|
return data.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getItemId(int position) {
|
||||||
|
return data.get(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NonNull CardViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.onboarding_megaphone_list_item, parent, false);
|
||||||
|
switch (viewType) {
|
||||||
|
case TYPE_GROUP: return new GroupCardViewHolder(view);
|
||||||
|
case TYPE_INVITE: return new InviteCardViewHolder(view);
|
||||||
|
case TYPE_SMS: return new SmsCardViewHolder(view);
|
||||||
|
default: throw new IllegalStateException("Invalid viewType! " + viewType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull CardViewHolder holder, int position) {
|
||||||
|
holder.bind(this, controller);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getItemCount() {
|
||||||
|
return data.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick() {
|
||||||
|
data.clear();
|
||||||
|
data.addAll(buildData(context));
|
||||||
|
if (data.isEmpty()) {
|
||||||
|
Log.i(TAG, "Nothing to show! Considering megaphone completed.");
|
||||||
|
controller.onMegaphoneCompleted(Megaphones.Event.ONBOARDING);
|
||||||
|
}
|
||||||
|
notifyDataSetChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<Integer> buildData(@NonNull Context context) {
|
||||||
|
List<Integer> data = new ArrayList<>();
|
||||||
|
|
||||||
|
if (SignalStore.onboarding().shouldShowNewGroup()) {
|
||||||
|
data.add(TYPE_GROUP);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SignalStore.onboarding().shouldShowInviteFriends()) {
|
||||||
|
data.add(TYPE_INVITE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SignalStore.onboarding().shouldShowSms(context)) {
|
||||||
|
data.add(TYPE_SMS);
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private interface ActionClickListener {
|
||||||
|
void onClick();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static abstract class CardViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
private final ImageView image;
|
||||||
|
private final TextView actionButton;
|
||||||
|
private final View closeButton;
|
||||||
|
|
||||||
|
public CardViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
this.image = itemView.findViewById(R.id.onboarding_megaphone_item_image);
|
||||||
|
this.actionButton = itemView.findViewById(R.id.onboarding_megaphone_item_button);
|
||||||
|
this.closeButton = itemView.findViewById(R.id.onboarding_megaphone_item_close);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void bind(@NonNull ActionClickListener listener, @NonNull MegaphoneActionController controller) {
|
||||||
|
image.setImageResource(getImageRes());
|
||||||
|
actionButton.setText(getButtonStringRes());
|
||||||
|
actionButton.setOnClickListener(v -> {
|
||||||
|
onActionClicked(controller);
|
||||||
|
listener.onClick();
|
||||||
|
});
|
||||||
|
closeButton.setOnClickListener(v -> {
|
||||||
|
onCloseClicked();
|
||||||
|
listener.onClick();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
abstract @StringRes int getButtonStringRes();
|
||||||
|
abstract @DrawableRes int getImageRes();
|
||||||
|
abstract void onActionClicked(@NonNull MegaphoneActionController controller);
|
||||||
|
abstract void onCloseClicked();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class GroupCardViewHolder extends CardViewHolder {
|
||||||
|
|
||||||
|
public GroupCardViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
int getButtonStringRes() {
|
||||||
|
return R.string.Megaphones_new_group;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
int getImageRes() {
|
||||||
|
return R.drawable.ic_megaphone_start_group;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void onActionClicked(@NonNull MegaphoneActionController controller) {
|
||||||
|
controller.onMegaphoneNavigationRequested(CreateGroupActivity.newIntent(controller.getMegaphoneActivity()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void onCloseClicked() {
|
||||||
|
SignalStore.onboarding().setShowNewGroup(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class InviteCardViewHolder extends CardViewHolder {
|
||||||
|
|
||||||
|
public InviteCardViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
int getButtonStringRes() {
|
||||||
|
return R.string.Megaphones_invite_friends;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
int getImageRes() {
|
||||||
|
return R.drawable.ic_megaphone_invite_friends;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void onActionClicked(@NonNull MegaphoneActionController controller) {
|
||||||
|
controller.onMegaphoneNavigationRequested(new Intent(controller.getMegaphoneActivity(), InviteActivity.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void onCloseClicked() {
|
||||||
|
SignalStore.onboarding().setShowInviteFriends(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class SmsCardViewHolder extends CardViewHolder {
|
||||||
|
|
||||||
|
public SmsCardViewHolder(@NonNull View itemView) {
|
||||||
|
super(itemView);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
int getButtonStringRes() {
|
||||||
|
return R.string.Megaphones_use_sms;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
int getImageRes() {
|
||||||
|
return R.drawable.ic_megaphone_use_sms;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void onActionClicked(@NonNull MegaphoneActionController controller) {
|
||||||
|
Intent intent = SmsUtil.getSmsRoleIntent(controller.getMegaphoneActivity());
|
||||||
|
controller.onMegaphoneNavigationRequested(intent, ConversationListFragment.SMS_ROLE_REQUEST_CODE);
|
||||||
|
SignalStore.onboarding().setShowSms(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
void onCloseClicked() {
|
||||||
|
SignalStore.onboarding().setShowSms(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,6 +29,7 @@ import org.thoughtcrime.securesms.MainActivity;
|
||||||
import org.thoughtcrime.securesms.R;
|
import org.thoughtcrime.securesms.R;
|
||||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||||
import org.thoughtcrime.securesms.jobs.ProfileUploadJob;
|
import org.thoughtcrime.securesms.jobs.ProfileUploadJob;
|
||||||
|
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||||
import org.thoughtcrime.securesms.lock.v2.KbsConstants;
|
import org.thoughtcrime.securesms.lock.v2.KbsConstants;
|
||||||
import org.thoughtcrime.securesms.lock.v2.PinKeyboardType;
|
import org.thoughtcrime.securesms.lock.v2.PinKeyboardType;
|
||||||
import org.thoughtcrime.securesms.profiles.AvatarHelper;
|
import org.thoughtcrime.securesms.profiles.AvatarHelper;
|
||||||
|
@ -227,6 +228,7 @@ public class PinRestoreEntryFragment extends LoggingFragment {
|
||||||
|
|
||||||
private void handleSuccess() {
|
private void handleSuccess() {
|
||||||
cancelSpinning(pinButton);
|
cancelSpinning(pinButton);
|
||||||
|
SignalStore.onboarding().clearAll();
|
||||||
|
|
||||||
Activity activity = requireActivity();
|
Activity activity = requireActivity();
|
||||||
|
|
||||||
|
|
|
@ -304,6 +304,7 @@ public final class RegistrationLockFragment extends BaseRegistrationFragment {
|
||||||
|
|
||||||
long startTime = System.currentTimeMillis();
|
long startTime = System.currentTimeMillis();
|
||||||
SimpleTask.run(() -> {
|
SimpleTask.run(() -> {
|
||||||
|
SignalStore.onboarding().clearAll();
|
||||||
return ApplicationDependencies.getJobManager().runSynchronously(new StorageAccountRestoreJob(), StorageAccountRestoreJob.LIFESPAN);
|
return ApplicationDependencies.getJobManager().runSynchronously(new StorageAccountRestoreJob(), StorageAccountRestoreJob.LIFESPAN);
|
||||||
}, result -> {
|
}, result -> {
|
||||||
long elapsedTime = System.currentTimeMillis() - startTime;
|
long elapsedTime = System.currentTimeMillis() - startTime;
|
||||||
|
|
|
@ -78,9 +78,7 @@ public class TextSecurePreferences {
|
||||||
private static final String GCM_PASSWORD_PREF = "pref_gcm_password";
|
private static final String GCM_PASSWORD_PREF = "pref_gcm_password";
|
||||||
private static final String SEEN_WELCOME_SCREEN_PREF = "pref_seen_welcome_screen";
|
private static final String SEEN_WELCOME_SCREEN_PREF = "pref_seen_welcome_screen";
|
||||||
private static final String PROMPTED_PUSH_REGISTRATION_PREF = "pref_prompted_push_registration";
|
private static final String PROMPTED_PUSH_REGISTRATION_PREF = "pref_prompted_push_registration";
|
||||||
private static final String PROMPTED_DEFAULT_SMS_PREF = "pref_prompted_default_sms";
|
|
||||||
private static final String PROMPTED_OPTIMIZE_DOZE_PREF = "pref_prompted_optimize_doze";
|
private static final String PROMPTED_OPTIMIZE_DOZE_PREF = "pref_prompted_optimize_doze";
|
||||||
private static final String PROMPTED_SHARE_PREF = "pref_prompted_share";
|
|
||||||
private static final String SIGNALING_KEY_PREF = "pref_signaling_key";
|
private static final String SIGNALING_KEY_PREF = "pref_signaling_key";
|
||||||
private static final String DIRECTORY_FRESH_TIME_PREF = "pref_directory_refresh_time";
|
private static final String DIRECTORY_FRESH_TIME_PREF = "pref_directory_refresh_time";
|
||||||
private static final String UPDATE_APK_REFRESH_TIME_PREF = "pref_update_apk_refresh_time";
|
private static final String UPDATE_APK_REFRESH_TIME_PREF = "pref_update_apk_refresh_time";
|
||||||
|
@ -890,14 +888,6 @@ public class TextSecurePreferences {
|
||||||
setBooleanPreference(context, PROMPTED_PUSH_REGISTRATION_PREF, value);
|
setBooleanPreference(context, PROMPTED_PUSH_REGISTRATION_PREF, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasPromptedDefaultSmsProvider(Context context) {
|
|
||||||
return getBooleanPreference(context, PROMPTED_DEFAULT_SMS_PREF, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setPromptedDefaultSmsProvider(Context context, boolean value) {
|
|
||||||
setBooleanPreference(context, PROMPTED_DEFAULT_SMS_PREF, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setPromptedOptimizeDoze(Context context, boolean value) {
|
public static void setPromptedOptimizeDoze(Context context, boolean value) {
|
||||||
setBooleanPreference(context, PROMPTED_OPTIMIZE_DOZE_PREF, value);
|
setBooleanPreference(context, PROMPTED_OPTIMIZE_DOZE_PREF, value);
|
||||||
}
|
}
|
||||||
|
@ -906,14 +896,6 @@ public class TextSecurePreferences {
|
||||||
return getBooleanPreference(context, PROMPTED_OPTIMIZE_DOZE_PREF, false);
|
return getBooleanPreference(context, PROMPTED_OPTIMIZE_DOZE_PREF, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean hasPromptedShare(Context context) {
|
|
||||||
return getBooleanPreference(context, PROMPTED_SHARE_PREF, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setPromptedShare(Context context, boolean value) {
|
|
||||||
setBooleanPreference(context, PROMPTED_SHARE_PREF, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isInterceptAllMmsEnabled(Context context) {
|
public static boolean isInterceptAllMmsEnabled(Context context) {
|
||||||
return getBooleanPreference(context, ALL_MMS_PREF, true);
|
return getBooleanPreference(context, ALL_MMS_PREF, true);
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 30 KiB |
9
app/src/main/res/drawable/ic_close_14.xml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="14dp"
|
||||||
|
android:height="14dp"
|
||||||
|
android:viewportWidth="14"
|
||||||
|
android:viewportHeight="14">
|
||||||
|
<path
|
||||||
|
android:pathData="M13.03,2.03L11.97,0.97L7,5.939L2.03,0.97L0.97,2.03L5.939,7L0.97,11.97L2.03,13.03L7,8.061L11.97,13.03L13.03,11.97L8.061,7L13.03,2.03Z"
|
||||||
|
android:fillColor="#fff"/>
|
||||||
|
</vector>
|
37
app/src/main/res/drawable/ic_megaphone_invite_friends.xml
Normal file
318
app/src/main/res/drawable/ic_megaphone_start_group.xml
Normal file
23
app/src/main/res/drawable/ic_megaphone_use_sms.xml
Normal file
|
@ -5,82 +5,96 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="16dp"
|
android:layout_margin="8dp"
|
||||||
android:paddingStart="8dp"
|
android:clipChildren="false"
|
||||||
android:paddingEnd="8dp"
|
android:clipToPadding="false"
|
||||||
android:paddingBottom="8dp"
|
app:cardBackgroundColor="@color/megaphone_background_color"
|
||||||
android:background="@color/signal_background_secondary"
|
app:cardCornerRadius="8dp"
|
||||||
android:clickable="true">
|
app:cardElevation="6dp"
|
||||||
|
app:cardPreventCornerOverlap="false"
|
||||||
|
app:cardUseCompatPadding="true"
|
||||||
|
app:contentPadding="0dp">
|
||||||
|
|
||||||
<ImageView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/basic_megaphone_image"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="64dp"
|
|
||||||
android:layout_height="64dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:scaleType="centerInside"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:src="@tools:sample/avatars"/>
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
|
||||||
android:id="@+id/basic_megaphone_title"
|
|
||||||
style="@style/Signal.Text.Body"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="12dp"
|
android:clickable="true"
|
||||||
android:layout_marginEnd="8dp"
|
android:paddingStart="8dp"
|
||||||
android:fontFamily="sans-serif-medium"
|
android:paddingTop="16dp"
|
||||||
app:layout_constraintStart_toEndOf="@id/basic_megaphone_image"
|
android:paddingEnd="8dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:paddingBottom="8dp">
|
||||||
app:layout_constraintTop_toTopOf="@id/basic_megaphone_image"
|
|
||||||
tools:text="Avengers HQ Destroyed!" />
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
<ImageView
|
||||||
android:id="@+id/basic_megaphone_body"
|
android:id="@+id/basic_megaphone_image"
|
||||||
style="@style/Signal.Text.Preview"
|
android:layout_width="64dp"
|
||||||
android:layout_width="0dp"
|
android:layout_height="64dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:scaleType="centerInside"
|
||||||
android:textColor="@color/megaphone_body_text_color"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@id/basic_megaphone_title"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/basic_megaphone_title"
|
tools:src="@tools:sample/avatars" />
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
tools:text="Where was the 'hero' Spider-Man during the battle?" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||||
android:id="@+id/basic_megaphone_content_barrier"
|
android:id="@+id/basic_megaphone_title"
|
||||||
android:layout_width="wrap_content"
|
style="@style/Signal.Text.Body"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="0dp"
|
||||||
app:barrierDirection="bottom"
|
android:layout_height="wrap_content"
|
||||||
app:constraint_referenced_ids="basic_megaphone_image,basic_megaphone_body,basic_megaphone_title"/>
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/basic_megaphone_image"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/basic_megaphone_image"
|
||||||
|
tools:text="Avengers HQ Destroyed!" />
|
||||||
|
|
||||||
<Button
|
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||||
android:id="@+id/basic_megaphone_action"
|
android:id="@+id/basic_megaphone_body"
|
||||||
android:layout_width="0dp"
|
style="@style/Signal.Text.Preview"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_height="wrap_content"
|
||||||
style="@style/Button.Borderless"
|
android:layout_marginEnd="8dp"
|
||||||
app:layout_constraintStart_toEndOf="@id/basic_megaphone_secondary"
|
android:textColor="@color/megaphone_body_text_color"
|
||||||
app:layout_constraintTop_toBottomOf="@id/basic_megaphone_content_barrier"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintStart_toStartOf="@id/basic_megaphone_title"
|
||||||
tools:text="*sigh*"
|
app:layout_constraintTop_toBottomOf="@id/basic_megaphone_title"
|
||||||
tools:visibility="visible"/>
|
tools:text="Where was the 'hero' Spider-Man during the battle?" />
|
||||||
|
|
||||||
<Button
|
<androidx.constraintlayout.widget.Barrier
|
||||||
android:id="@+id/basic_megaphone_secondary"
|
android:id="@+id/basic_megaphone_content_barrier"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
app:barrierDirection="bottom"
|
||||||
android:text="@string/Megaphones_remind_me_later"
|
app:constraint_referenced_ids="basic_megaphone_image,basic_megaphone_body,basic_megaphone_title" />
|
||||||
style="@style/Button.Borderless"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/basic_megaphone_content_barrier"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/basic_megaphone_action"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
tools:visibility="visible"/>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<Button
|
||||||
|
android:id="@+id/basic_megaphone_action"
|
||||||
|
style="@style/Button.Borderless"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/basic_megaphone_secondary"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/basic_megaphone_content_barrier"
|
||||||
|
tools:text="*sigh*"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/basic_megaphone_secondary"
|
||||||
|
style="@style/Button.Borderless"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:text="@string/Megaphones_remind_me_later"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/basic_megaphone_action"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/basic_megaphone_content_barrier"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</merge>
|
</merge>
|
|
@ -5,7 +5,7 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/empty_state"
|
android:id="@+id/empty_state"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="32dp"
|
android:layout_marginTop="32dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
@ -14,13 +14,6 @@
|
||||||
app:layout_constraintTop_toBottomOf="@id/toolbar_barrier"
|
app:layout_constraintTop_toBottomOf="@id/toolbar_barrier"
|
||||||
tools:visibility="visible">
|
tools:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/empty"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
tools:src="@drawable/conversation_list_empty_state" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
style="@style/Signal.Text.Body"
|
style="@style/Signal.Text.Body"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -30,6 +23,6 @@
|
||||||
android:layout_marginEnd="32dp"
|
android:layout_marginEnd="32dp"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="20dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/conversation_list_fragment__give_your_inbox_something_to_write_home_about_get_started_by_messaging_a_friend" />
|
android:text="@string/conversation_list_fragment__no_chats_yet_get_started_by_messaging_a_friend" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -152,7 +152,9 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="500dp">
|
android:layout_height="500dp"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:clipChildren="false">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -160,6 +162,8 @@
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_gravity="bottom|end"
|
android:layout_gravity="bottom|end"
|
||||||
android:gravity="end"
|
android:gravity="end"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:clipToPadding="false"
|
||||||
app:layout_behavior="org.thoughtcrime.securesms.util.views.SlideUpWithSnackbarBehavior">
|
app:layout_behavior="org.thoughtcrime.securesms.util.views.SlideUpWithSnackbarBehavior">
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.registration.PulsingFloatingActionButton
|
<org.thoughtcrime.securesms.components.registration.PulsingFloatingActionButton
|
||||||
|
@ -168,6 +172,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="20dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
android:contentDescription="@string/conversation_list_fragment__open_camera_description"
|
android:contentDescription="@string/conversation_list_fragment__open_camera_description"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:tint="@color/signal_icon_tint_secondary"
|
android:tint="@color/signal_icon_tint_secondary"
|
||||||
|
@ -191,7 +196,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout="@layout/conversation_list_megaphone_container"
|
android:layout="@layout/conversation_list_megaphone_container"
|
||||||
android:layout_margin="8dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent" />
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.cardview.widget.CardView
|
<FrameLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
@ -9,11 +9,5 @@
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:cardBackgroundColor="@color/signal_background_secondary"
|
|
||||||
app:cardCornerRadius="8dp"
|
|
||||||
app:cardElevation="4dp"
|
|
||||||
app:cardPreventCornerOverlap="false"
|
|
||||||
app:cardUseCompatPadding="true"
|
|
||||||
app:contentPadding="0dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
|
@ -5,87 +5,101 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingBottom="14dp"
|
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
|
android:paddingBottom="14dp"
|
||||||
tools:parentTag="android.widget.FrameLayout">
|
tools:parentTag="android.widget.FrameLayout">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.cardview.widget.CardView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingTop="16dp"
|
android:layout_margin="8dp"
|
||||||
android:paddingStart="8dp"
|
android:clipChildren="false"
|
||||||
android:paddingEnd="8dp"
|
android:clipToPadding="false"
|
||||||
android:paddingBottom="8dp"
|
app:cardBackgroundColor="@color/megaphone_background_color"
|
||||||
android:background="@color/signal_background_secondary"
|
app:cardCornerRadius="8dp"
|
||||||
android:clickable="true">
|
app:cardElevation="6dp"
|
||||||
|
app:cardPreventCornerOverlap="false"
|
||||||
|
app:cardUseCompatPadding="true"
|
||||||
|
app:contentPadding="0dp">
|
||||||
|
|
||||||
<ImageView
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/linkpreview_megaphone_image"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="64dp"
|
|
||||||
android:layout_height="64dp"
|
|
||||||
android:layout_marginStart="8dp"
|
|
||||||
android:scaleType="centerInside"
|
|
||||||
app:srcCompat="@drawable/ic_megaphone_link_previews"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
|
||||||
android:id="@+id/linkpreview_megaphone_title"
|
|
||||||
style="@style/Signal.Text.Body"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="12dp"
|
android:clickable="true"
|
||||||
android:layout_marginEnd="8dp"
|
android:paddingStart="8dp"
|
||||||
android:fontFamily="sans-serif-medium"
|
android:paddingTop="16dp"
|
||||||
android:text="@string/LinkPreviewsMegaphone_preview_any_link"
|
android:paddingEnd="8dp"
|
||||||
app:layout_constraintStart_toEndOf="@id/linkpreview_megaphone_image"
|
android:paddingBottom="8dp">
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/linkpreview_megaphone_image" />
|
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
<ImageView
|
||||||
android:id="@+id/linkpreview_megaphone_body"
|
android:id="@+id/linkpreview_megaphone_image"
|
||||||
style="@style/Signal.Text.Preview"
|
android:layout_width="64dp"
|
||||||
android:layout_width="0dp"
|
android:layout_height="64dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_marginStart="8dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:scaleType="centerInside"
|
||||||
android:textColor="@color/megaphone_body_text_color"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:text="@string/LinkPreviewsMegaphone_you_can_now_retrieve_link_previews_directly_from_any_website"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="@id/linkpreview_megaphone_title"
|
app:srcCompat="@drawable/ic_megaphone_link_previews" />
|
||||||
app:layout_constraintTop_toBottomOf="@id/linkpreview_megaphone_title"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Barrier
|
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||||
android:id="@+id/linkpreview_megaphone_content_barrier"
|
android:id="@+id/linkpreview_megaphone_title"
|
||||||
android:layout_width="wrap_content"
|
style="@style/Signal.Text.Body"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="0dp"
|
||||||
app:barrierDirection="bottom"
|
android:layout_height="wrap_content"
|
||||||
app:constraint_referenced_ids="linkpreview_megaphone_image,linkpreview_megaphone_body,linkpreview_megaphone_title"/>
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:fontFamily="sans-serif-medium"
|
||||||
|
android:text="@string/LinkPreviewsMegaphone_preview_any_link"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/linkpreview_megaphone_image"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/linkpreview_megaphone_image" />
|
||||||
|
|
||||||
<Button
|
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||||
android:id="@+id/linkpreview_megaphone_ok"
|
android:id="@+id/linkpreview_megaphone_body"
|
||||||
android:layout_width="0dp"
|
style="@style/Signal.Text.Preview"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="0dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_height="wrap_content"
|
||||||
style="@style/Button.Borderless"
|
android:layout_marginEnd="8dp"
|
||||||
android:text="@string/ok"
|
android:text="@string/LinkPreviewsMegaphone_you_can_now_retrieve_link_previews_directly_from_any_website"
|
||||||
app:layout_constraintStart_toEndOf="@id/linkpreview_megaphone_disable"
|
android:textColor="@color/megaphone_body_text_color"
|
||||||
app:layout_constraintTop_toBottomOf="@id/linkpreview_megaphone_content_barrier"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintStart_toStartOf="@id/linkpreview_megaphone_title"
|
||||||
tools:visibility="visible"/>
|
app:layout_constraintTop_toBottomOf="@id/linkpreview_megaphone_title" />
|
||||||
|
|
||||||
<Button
|
<androidx.constraintlayout.widget.Barrier
|
||||||
android:id="@+id/linkpreview_megaphone_disable"
|
android:id="@+id/linkpreview_megaphone_content_barrier"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
app:barrierDirection="bottom"
|
||||||
android:text="@string/LinkPreviewsMegaphone_disable"
|
app:constraint_referenced_ids="linkpreview_megaphone_image,linkpreview_megaphone_body,linkpreview_megaphone_title" />
|
||||||
style="@style/Button.Borderless"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/linkpreview_megaphone_content_barrier"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/linkpreview_megaphone_ok"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
tools:visibility="visible"/>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
<Button
|
||||||
|
android:id="@+id/linkpreview_megaphone_ok"
|
||||||
|
style="@style/Button.Borderless"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:text="@string/ok"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/linkpreview_megaphone_disable"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/linkpreview_megaphone_content_barrier"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/linkpreview_megaphone_disable"
|
||||||
|
style="@style/Button.Borderless"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:text="@string/LinkPreviewsMegaphone_disable"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/linkpreview_megaphone_ok"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/linkpreview_megaphone_content_barrier"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</merge>
|
</merge>
|
42
app/src/main/res/layout/onboarding_megaphone.xml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<merge
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="14dp"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
tools:parentTag="android.widget.FrameLayout">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingBottom="12dp"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:clipChildren="false">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/onboarding_megaphone_title"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
style="@style/TextAppearance.Signal.Title2"
|
||||||
|
android:text="@string/Megaphones_get_started"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/onboarding_megaphone_list"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/onboarding_megaphone_title"/>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</merge>
|
54
app/src/main/res/layout/onboarding_megaphone_list_item.xml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="180dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
app:cardBackgroundColor="@color/megaphone_background_color"
|
||||||
|
app:cardCornerRadius="12dp"
|
||||||
|
app:cardElevation="6dp"
|
||||||
|
app:contentPadding="0dp">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/onboarding_megaphone_item_image"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="90dp"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
tools:srcCompat="@drawable/ic_megaphone_start_group"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"/>
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/onboarding_megaphone_item_button"
|
||||||
|
style="@style/Signal.Widget.Button.Small.Primary"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="8dp"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
android:layout_marginBottom="4dp"
|
||||||
|
tools:text="@string/Megaphones_new_group"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/onboarding_megaphone_item_image"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/onboarding_megaphone_item_image"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/onboarding_megaphone_item_image"/>
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/onboarding_megaphone_item_close"
|
||||||
|
android:layout_marginEnd="5dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
style="@style/Widget.Signal.Button.Icon.Circular.Small"
|
||||||
|
app:backgroundTint="@color/transparent_black_40"
|
||||||
|
app:icon="@drawable/ic_close_14"
|
||||||
|
app:iconTint="@color/core_white"
|
||||||
|
app:rippleColor="@color/core_ultramarine"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
|
@ -1,9 +1,23 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<merge xmlns:android="http://schemas.android.com/apk/res/android"
|
<merge
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
app:cardBackgroundColor="@color/megaphone_background_color"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardElevation="6dp"
|
||||||
|
app:cardPreventCornerOverlap="false"
|
||||||
|
app:cardUseCompatPadding="true"
|
||||||
|
app:contentPadding="0dp">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -11,52 +25,54 @@
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:paddingBottom="16dp">
|
android:paddingBottom="16dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/popup_megaphone_image"
|
android:id="@+id/popup_megaphone_image"
|
||||||
android:layout_width="64dp"
|
android:layout_width="64dp"
|
||||||
android:layout_height="64dp"
|
android:layout_height="64dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:scaleType="centerInside"
|
android:scaleType="centerInside"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||||
android:id="@+id/popup_megaphone_title"
|
android:id="@+id/popup_megaphone_title"
|
||||||
style="@style/Signal.Text.Body"
|
style="@style/Signal.Text.Body"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="12dp"
|
||||||
android:fontFamily="sans-serif-medium"
|
android:fontFamily="sans-serif-medium"
|
||||||
app:layout_constraintEnd_toStartOf="@id/popup_x"
|
app:layout_constraintEnd_toStartOf="@id/popup_x"
|
||||||
app:layout_constraintStart_toEndOf="@id/popup_megaphone_image"
|
app:layout_constraintStart_toEndOf="@id/popup_megaphone_image"
|
||||||
app:layout_constraintTop_toTopOf="@id/popup_megaphone_image"
|
app:layout_constraintTop_toTopOf="@id/popup_megaphone_image"
|
||||||
tools:text="Avengers HQ Destroyed!" />
|
tools:text="Avengers HQ Destroyed!" />
|
||||||
|
|
||||||
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
|
||||||
android:id="@+id/popup_megaphone_body"
|
android:id="@+id/popup_megaphone_body"
|
||||||
style="@style/Signal.Text.Preview"
|
style="@style/Signal.Text.Preview"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/megaphone_body_text_color"
|
android:textColor="@color/megaphone_body_text_color"
|
||||||
app:layout_constraintEnd_toStartOf="@id/popup_x"
|
app:layout_constraintEnd_toStartOf="@id/popup_x"
|
||||||
app:layout_constraintStart_toStartOf="@id/popup_megaphone_title"
|
app:layout_constraintStart_toStartOf="@id/popup_megaphone_title"
|
||||||
app:layout_constraintTop_toBottomOf="@id/popup_megaphone_title"
|
app:layout_constraintTop_toBottomOf="@id/popup_megaphone_title"
|
||||||
tools:text="Where was the 'hero' Spider-Man during the battle?" />
|
tools:text="Where was the 'hero' Spider-Man during the battle?" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/popup_x"
|
android:id="@+id/popup_x"
|
||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:paddingStart="12.5dp"
|
android:paddingStart="12.5dp"
|
||||||
android:paddingTop="14dp"
|
android:paddingTop="14dp"
|
||||||
android:paddingEnd="15.5dp"
|
android:paddingEnd="15.5dp"
|
||||||
android:paddingBottom="14dp"
|
android:paddingBottom="14dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:srcCompat="@drawable/ic_x_20" />
|
app:srcCompat="@drawable/ic_x_20" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</merge>
|
</merge>
|
|
@ -5,11 +5,22 @@
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:paddingBottom="14dp"
|
|
||||||
android:clipChildren="false"
|
android:clipChildren="false"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
tools:parentTag="android.widget.FrameLayout">
|
tools:parentTag="android.widget.FrameLayout">
|
||||||
|
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
app:cardBackgroundColor="@color/megaphone_background_color"
|
||||||
|
app:cardCornerRadius="8dp"
|
||||||
|
app:cardElevation="6dp"
|
||||||
|
app:cardPreventCornerOverlap="false"
|
||||||
|
app:cardUseCompatPadding="true"
|
||||||
|
app:contentPadding="0dp">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -20,69 +31,70 @@
|
||||||
android:id="@+id/reactions_megaphone_banner_background"
|
android:id="@+id/reactions_megaphone_banner_background"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="125dp"
|
android:layout_height="125dp"
|
||||||
|
android:alpha="0.5"
|
||||||
android:background="@color/megaphone_reactions_shade"
|
android:background="@color/megaphone_reactions_shade"
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp"
|
||||||
android:alpha="0.5"
|
android:scaleType="centerCrop"
|
||||||
app:srcCompat="@drawable/reactions_megaphone_background"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:srcCompat="@drawable/reactions_megaphone_background" />
|
||||||
|
|
||||||
<com.airbnb.lottie.LottieAnimationView
|
<com.airbnb.lottie.LottieAnimationView
|
||||||
android:id="@+id/reactions_megaphone_animation"
|
android:id="@+id/reactions_megaphone_animation"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:lottie_rawRes="@raw/lottie_reactions_megaphone"
|
|
||||||
app:lottie_autoPlay="true"
|
|
||||||
app:lottie_repeatCount="3"
|
|
||||||
app:layout_constraintStart_toStartOf="@id/reactions_megaphone_banner_background"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/reactions_megaphone_banner_background"
|
|
||||||
app:layout_constraintTop_toTopOf="@id/reactions_megaphone_banner_background"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/reactions_megaphone_banner_background"
|
app:layout_constraintBottom_toBottomOf="@id/reactions_megaphone_banner_background"
|
||||||
tools:layout_width="200dp"
|
app:layout_constraintEnd_toEndOf="@id/reactions_megaphone_banner_background"
|
||||||
tools:layout_height="50dp"/>
|
app:layout_constraintStart_toStartOf="@id/reactions_megaphone_banner_background"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/reactions_megaphone_banner_background"
|
||||||
|
app:lottie_autoPlay="true"
|
||||||
|
app:lottie_rawRes="@raw/lottie_reactions_megaphone"
|
||||||
|
app:lottie_repeatCount="3"
|
||||||
|
tools:layout_height="50dp"
|
||||||
|
tools:layout_width="200dp" />
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/reactions_megaphone_x"
|
android:id="@+id/reactions_megaphone_x"
|
||||||
android:layout_width="46dp"
|
android:layout_width="46dp"
|
||||||
android:layout_height="46dp"
|
android:layout_height="46dp"
|
||||||
|
android:background="?selectableItemBackgroundBorderless"
|
||||||
android:padding="13dp"
|
android:padding="13dp"
|
||||||
android:tint="@color/megaphone_reactions_close_tint"
|
android:tint="@color/megaphone_reactions_close_tint"
|
||||||
android:background="?selectableItemBackgroundBorderless"
|
|
||||||
app:srcCompat="@drawable/ic_x"
|
|
||||||
app:layout_constraintEnd_toEndOf="@id/reactions_megaphone_banner_background"
|
app:layout_constraintEnd_toEndOf="@id/reactions_megaphone_banner_background"
|
||||||
app:layout_constraintTop_toTopOf="@id/reactions_megaphone_banner_background"/>
|
app:layout_constraintTop_toTopOf="@id/reactions_megaphone_banner_background"
|
||||||
|
app:srcCompat="@drawable/ic_x" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/reactions_megaphone_title"
|
android:id="@+id/reactions_megaphone_title"
|
||||||
|
style="@style/Signal.Text.Body"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
|
||||||
android:layout_marginTop="14dp"
|
android:layout_marginTop="14dp"
|
||||||
style="@style/Signal.Text.Body"
|
android:layout_marginEnd="16dp"
|
||||||
android:fontFamily="sans-serif-medium"
|
android:fontFamily="sans-serif-medium"
|
||||||
android:text="@string/Megaphones_introducing_reactions"
|
android:text="@string/Megaphones_introducing_reactions"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/reactions_megaphone_banner_background" />
|
app:layout_constraintTop_toBottomOf="@id/reactions_megaphone_banner_background" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/reactions_megaphone_body"
|
android:id="@+id/reactions_megaphone_body"
|
||||||
|
style="@style/Signal.Text.Preview"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:textColor="@color/megaphone_body_text_color"
|
|
||||||
style="@style/Signal.Text.Preview"
|
|
||||||
android:text="@string/Megaphones_tap_and_hold_any_message_to_quicky_share_how_you_feel"
|
android:text="@string/Megaphones_tap_and_hold_any_message_to_quicky_share_how_you_feel"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:textColor="@color/megaphone_body_text_color"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/reactions_megaphone_title" />
|
app:layout_constraintTop_toBottomOf="@id/reactions_megaphone_title" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</merge>
|
</merge>
|
|
@ -107,6 +107,7 @@
|
||||||
|
|
||||||
<color name="media_keyboard_button_color">@color/core_grey_25</color>
|
<color name="media_keyboard_button_color">@color/core_grey_25</color>
|
||||||
|
|
||||||
|
<color name="megaphone_background_color">@color/core_grey_85</color>
|
||||||
<color name="megaphone_body_text_color">@color/core_grey_25</color>
|
<color name="megaphone_body_text_color">@color/core_grey_25</color>
|
||||||
<color name="megaphone_reactions_shade">@color/core_grey_70</color>
|
<color name="megaphone_reactions_shade">@color/core_grey_70</color>
|
||||||
<color name="megaphone_reactions_close_tint">@color/core_grey_15</color>
|
<color name="megaphone_reactions_close_tint">@color/core_grey_15</color>
|
||||||
|
|
|
@ -107,6 +107,7 @@
|
||||||
|
|
||||||
<color name="media_keyboard_button_color">@color/core_grey_60</color>
|
<color name="media_keyboard_button_color">@color/core_grey_60</color>
|
||||||
|
|
||||||
|
<color name="megaphone_background_color">@color/core_white</color>
|
||||||
<color name="megaphone_body_text_color">@color/core_grey_65</color>
|
<color name="megaphone_body_text_color">@color/core_grey_65</color>
|
||||||
<color name="megaphone_reactions_shade">@color/core_grey_02</color>
|
<color name="megaphone_reactions_shade">@color/core_grey_02</color>
|
||||||
<color name="megaphone_reactions_close_tint">@color/core_black</color>
|
<color name="megaphone_reactions_close_tint">@color/core_black</color>
|
||||||
|
|
|
@ -36,14 +36,31 @@
|
||||||
<item name="android:textSize">13sp</item>
|
<item name="android:textSize">13sp</item>
|
||||||
<item name="android:fontFamily">sans-serif-medium</item>
|
<item name="android:fontFamily">sans-serif-medium</item>
|
||||||
<item name="android:letterSpacing" tools:targetApi="21">0.01</item>
|
<item name="android:letterSpacing" tools:targetApi="21">0.01</item>
|
||||||
<item name="strokeWidth">2dp</item>
|
<item name="strokeWidth">1.5dp</item>
|
||||||
<item name="cornerRadius">18dp</item>
|
<item name="cornerRadius">18dp</item>
|
||||||
<item name="android:textColor">@color/signal_button_secondary_text_selector</item>
|
<item name="android:textColor">@color/signal_button_secondary_text_selector</item>
|
||||||
<item name="strokeColor">@color/signal_button_secondary_stroke</item>
|
<item name="strokeColor">@color/signal_button_secondary_stroke</item>
|
||||||
<item name="backgroundTint">@color/signal_background_primary</item>
|
<item name="backgroundTint">@color/transparent</item>
|
||||||
<item name="rippleColor">@color/signal_button_secondary</item>
|
<item name="rippleColor">@color/signal_button_secondary</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Signal.Widget.Button.Small.Secondary" parent="Widget.MaterialComponents.Button.UnelevatedButton">
|
||||||
|
<item name="android:textAllCaps">false</item>
|
||||||
|
<item name="android:paddingTop">6dp</item>
|
||||||
|
<item name="android:paddingBottom">7dp</item>
|
||||||
|
<item name="android:paddingStart">14dp</item>
|
||||||
|
<item name="android:paddingEnd">14dp</item>
|
||||||
|
<item name="android:minHeight">0dp</item>
|
||||||
|
<item name="android:textSize">13sp</item>
|
||||||
|
<item name="android:fontFamily">sans-serif-medium</item>
|
||||||
|
<item name="android:letterSpacing" tools:targetApi="21">0.01</item>
|
||||||
|
<item name="android:elevation" tools:ignore="NewApi">0dp</item>
|
||||||
|
<item name="android:textColor">@color/signal_button_secondary_text_selector</item>
|
||||||
|
<item name="background">@color/signal_background_tertiary</item>
|
||||||
|
<item name="rippleColor">@color/core_ultramarine</item>
|
||||||
|
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.Signal.Button.Rounded</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="Signal.Widget.Button.Base.Secondary" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
<style name="Signal.Widget.Button.Base.Secondary" parent="Widget.MaterialComponents.Button.OutlinedButton">
|
||||||
<item name="android:insetTop">0dp</item>
|
<item name="android:insetTop">0dp</item>
|
||||||
<item name="android:insetBottom">0dp</item>
|
<item name="android:insetBottom">0dp</item>
|
||||||
|
|
|
@ -1014,6 +1014,10 @@
|
||||||
<string name="Megaphones_verify_your_signal_pin">Verify your Signal PIN</string>
|
<string name="Megaphones_verify_your_signal_pin">Verify your Signal PIN</string>
|
||||||
<string name="Megaphones_well_occasionally_ask_you_to_verify_your_pin">We\'ll occasionally ask you to verify your PIN so that you remember it.</string>
|
<string name="Megaphones_well_occasionally_ask_you_to_verify_your_pin">We\'ll occasionally ask you to verify your PIN so that you remember it.</string>
|
||||||
<string name="Megaphones_verify_pin">Verify PIN</string>
|
<string name="Megaphones_verify_pin">Verify PIN</string>
|
||||||
|
<string name="Megaphones_get_started">Get started</string>
|
||||||
|
<string name="Megaphones_new_group">New group</string>
|
||||||
|
<string name="Megaphones_invite_friends">Invite friends</string>
|
||||||
|
<string name="Megaphones_use_sms">Use SMS</string>
|
||||||
|
|
||||||
<!-- NotificationBarManager -->
|
<!-- NotificationBarManager -->
|
||||||
<string name="NotificationBarManager_signal_call_in_progress">Signal call in progress</string>
|
<string name="NotificationBarManager_signal_call_in_progress">Signal call in progress</string>
|
||||||
|
@ -2558,7 +2562,7 @@
|
||||||
<!-- conversation_list_fragment -->
|
<!-- conversation_list_fragment -->
|
||||||
<string name="conversation_list_fragment__fab_content_description">New conversation</string>
|
<string name="conversation_list_fragment__fab_content_description">New conversation</string>
|
||||||
<string name="conversation_list_fragment__open_camera_description">Open Camera</string>
|
<string name="conversation_list_fragment__open_camera_description">Open Camera</string>
|
||||||
<string name="conversation_list_fragment__give_your_inbox_something_to_write_home_about_get_started_by_messaging_a_friend">Give your inbox something to write home about. Get started by messaging a friend.</string>
|
<string name="conversation_list_fragment__no_chats_yet_get_started_by_messaging_a_friend">No chats yet.\nGet started by messaging a friend.</string>
|
||||||
|
|
||||||
|
|
||||||
<!-- conversation_secure_verified -->
|
<!-- conversation_secure_verified -->
|
||||||
|
@ -2606,8 +2610,6 @@
|
||||||
<string name="verify_display_fragment_context_menu__compare_with_clipboard">Compare with clipboard</string>
|
<string name="verify_display_fragment_context_menu__compare_with_clipboard">Compare with clipboard</string>
|
||||||
|
|
||||||
<!-- reminder_header -->
|
<!-- reminder_header -->
|
||||||
<string name="reminder_header_sms_default_title">Use as default SMS app</string>
|
|
||||||
<string name="reminder_header_sms_default_text">Tap to make Signal your default SMS app.</string>
|
|
||||||
<string name="reminder_header_sms_import_title">Import system SMS</string>
|
<string name="reminder_header_sms_import_title">Import system SMS</string>
|
||||||
<string name="reminder_header_sms_import_text">Tap to copy your phone\'s SMS messages into Signal\'s encrypted database.</string>
|
<string name="reminder_header_sms_import_text">Tap to copy your phone\'s SMS messages into Signal\'s encrypted database.</string>
|
||||||
<string name="reminder_header_push_title">Enable Signal messages and calls</string>
|
<string name="reminder_header_push_title">Enable Signal messages and calls</string>
|
||||||
|
|
|
@ -480,6 +480,14 @@
|
||||||
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.Signal.Button.Rounded</item>
|
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.Signal.Button.Rounded</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Widget.Signal.Button.Icon.Circular.Small">
|
||||||
|
<item name="android:layout_width">24dp</item>
|
||||||
|
<item name="android:layout_height">24dp</item>
|
||||||
|
<item name="iconSize">10dp</item>
|
||||||
|
<item name="android:padding">0dp</item>
|
||||||
|
<item name="iconGravity">textStart</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="ShapeAppearanceOverlay.Signal.Button.Rounded" parent="">
|
<style name="ShapeAppearanceOverlay.Signal.Button.Rounded" parent="">
|
||||||
<item name="cornerFamily">rounded</item>
|
<item name="cornerFamily">rounded</item>
|
||||||
<item name="cornerSize">50%</item>
|
<item name="cornerSize">50%</item>
|
||||||
|
|