mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 22:53:39 +00:00
Further Lokify UI
This commit is contained in:
parent
b71293fb11
commit
1da6f20f18
@ -302,7 +302,7 @@
|
|||||||
|
|
||||||
<activity android:name=".registration.WelcomeActivity"
|
<activity android:name=".registration.WelcomeActivity"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
android:theme="@style/TextSecure.LightRegistrationTheme"
|
android:theme="@style/TextSecure.DarkRegistrationTheme"
|
||||||
android:windowSoftInputMode="stateUnchanged"
|
android:windowSoftInputMode="stateUnchanged"
|
||||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||||
|
|
||||||
@ -438,13 +438,13 @@
|
|||||||
<!-- Loki -->
|
<!-- Loki -->
|
||||||
<activity android:name=".loki.AccountDetailsActivity"
|
<activity android:name=".loki.AccountDetailsActivity"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
android:theme="@style/TextSecure.LightRegistrationTheme"
|
android:theme="@style/TextSecure.DarkRegistrationTheme"
|
||||||
android:windowSoftInputMode="stateUnchanged"
|
android:windowSoftInputMode="stateUnchanged"
|
||||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||||
|
|
||||||
<activity android:name=".loki.KeyPairActivity"
|
<activity android:name=".loki.KeyPairActivity"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
android:theme="@style/TextSecure.LightRegistrationTheme"
|
android:theme="@style/TextSecure.DarkRegistrationTheme"
|
||||||
android:windowSoftInputMode="stateUnchanged"
|
android:windowSoftInputMode="stateUnchanged"
|
||||||
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
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="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/white"
|
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
tools:context=".loki.AccountDetailsActivity">
|
tools:context=".loki.AccountDetailsActivity">
|
||||||
|
|
||||||
@ -39,7 +38,6 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="32dp"
|
android:layout_marginTop="32dp"
|
||||||
app:labeledEditText_background="@color/white"
|
|
||||||
app:labeledEditText_label="@string/activity_account_details_name_edit_text_label"/>
|
app:labeledEditText_label="@string/activity_account_details_name_edit_text_label"/>
|
||||||
|
|
||||||
<com.dd.CircularProgressButton
|
<com.dd.CircularProgressButton
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
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="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/white"
|
|
||||||
android:fillViewport="true"
|
android:fillViewport="true"
|
||||||
tools:context=".loki.KeyPairActivity">
|
tools:context=".loki.KeyPairActivity">
|
||||||
|
|
||||||
@ -52,7 +51,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:background="@color/white"
|
android:background="@color/transparent"
|
||||||
android:textColor="@color/signal_primary"
|
android:textColor="@color/signal_primary"
|
||||||
android:text="@string/activity_key_pair_copy_button_title"
|
android:text="@string/activity_key_pair_copy_button_title"
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
@ -75,14 +74,13 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="20dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:labeledEditText_background="@color/white"
|
|
||||||
app:labeledEditText_label="@string/activity_key_pair_mnemonic_edit_text_label"/>
|
app:labeledEditText_label="@string/activity_key_pair_mnemonic_edit_text_label"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/toggleModeButton"
|
android:id="@+id/toggleModeButton"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:background="@color/white"
|
android:background="@color/transparent"
|
||||||
android:textColor="@color/signal_primary"
|
android:textColor="@color/signal_primary"
|
||||||
android:text="@string/activity_key_pair_toggle_mode_button_title_1"
|
android:text="@string/activity_key_pair_toggle_mode_button_title_1"
|
||||||
android:elevation="0dp"
|
android:elevation="0dp"
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<item android:title="@string/conversation_context__menu_message_details"
|
|
||||||
|
<!-- <item android:title="@string/conversation_context__menu_message_details"
|
||||||
android:id="@+id/menu_context_details"
|
android:id="@+id/menu_context_details"
|
||||||
android:icon="?menu_info_icon"
|
android:icon="?menu_info_icon"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" /> -->
|
||||||
|
|
||||||
<item android:title="@string/conversation_context__menu_delete_message"
|
<item android:title="@string/conversation_context__menu_delete_message"
|
||||||
android:id="@+id/menu_context_delete_message"
|
android:id="@+id/menu_context_delete_message"
|
||||||
@ -15,10 +16,10 @@
|
|||||||
android:icon="?menu_copy_icon"
|
android:icon="?menu_copy_icon"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" />
|
||||||
|
|
||||||
<item android:title="@string/conversation_context__menu_forward_message"
|
<!-- <item android:title="@string/conversation_context__menu_forward_message"
|
||||||
android:id="@+id/menu_context_forward"
|
android:id="@+id/menu_context_forward"
|
||||||
android:icon="?menu_forward_icon"
|
android:icon="?menu_forward_icon"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="always" /> -->
|
||||||
|
|
||||||
<item android:title="@string/conversation_context__menu_resend_message"
|
<item android:title="@string/conversation_context__menu_resend_message"
|
||||||
android:id="@+id/menu_context_resend"
|
android:id="@+id/menu_context_resend"
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="signal_primary">#ff2090ea</color>
|
<color name="signal_primary">#ff5bca5b</color>
|
||||||
<color name="signal_primary_dark">#ff1c7ac5</color>
|
<color name="signal_primary_dark">#ff5bca5b</color>
|
||||||
<color name="signal_primary_alpha33">#552090ea</color>
|
<color name="signal_primary_alpha33">#555bca5b</color>
|
||||||
<color name="signal_primary_alpha_focus">#882090ea</color>
|
<color name="signal_primary_alpha_focus">#882090ea</color>
|
||||||
|
|
||||||
<color name="textsecure_primary">@color/signal_primary</color>
|
<color name="textsecure_primary">@color/signal_primary</color>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="core_blue">#2090ea</color>
|
<color name="core_blue">#5bca5b</color>
|
||||||
<color name="core_green">#4caf50</color>
|
<color name="core_green">#4caf50</color>
|
||||||
<color name="core_red">#f44336</color>
|
<color name="core_red">#f44336</color>
|
||||||
<color name="core_red_highlight">#ef5350</color>
|
<color name="core_red_highlight">#ef5350</color>
|
||||||
|
@ -427,8 +427,10 @@ public class ConversationListFragment extends Fragment
|
|||||||
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
|
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
|
||||||
MenuInflater inflater = getActivity().getMenuInflater();
|
MenuInflater inflater = getActivity().getMenuInflater();
|
||||||
|
|
||||||
|
/*
|
||||||
if (archive) inflater.inflate(R.menu.conversation_list_batch_unarchive, menu);
|
if (archive) inflater.inflate(R.menu.conversation_list_batch_unarchive, menu);
|
||||||
else inflater.inflate(R.menu.conversation_list_batch_archive, menu);
|
else inflater.inflate(R.menu.conversation_list_batch_archive, menu);
|
||||||
|
*/
|
||||||
|
|
||||||
inflater.inflate(R.menu.conversation_list_batch, menu);
|
inflater.inflate(R.menu.conversation_list_batch, menu);
|
||||||
|
|
||||||
|
@ -1553,8 +1553,10 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
if (manuallySelected) recordTransportPreference(newTransport);
|
if (manuallySelected) recordTransportPreference(newTransport);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
titleView.setOnClickListener(v -> handleConversationSettings());
|
titleView.setOnClickListener(v -> handleConversationSettings());
|
||||||
titleView.setOnLongClickListener(v -> handleDisplayQuickContact());
|
titleView.setOnLongClickListener(v -> handleDisplayQuickContact());
|
||||||
|
*/
|
||||||
titleView.setOnBackClickedListener(view -> super.onBackPressed());
|
titleView.setOnBackClickedListener(view -> super.onBackPressed());
|
||||||
unblockButton.setOnClickListener(v -> handleUnblock());
|
unblockButton.setOnClickListener(v -> handleUnblock());
|
||||||
makeDefaultSmsButton.setOnClickListener(v -> handleMakeDefaultSms());
|
makeDefaultSmsButton.setOnClickListener(v -> handleMakeDefaultSms());
|
||||||
@ -1850,8 +1852,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||||||
private void setActionBarColor(MaterialColor color) {
|
private void setActionBarColor(MaterialColor color) {
|
||||||
ActionBar supportActionBar = getSupportActionBar();
|
ActionBar supportActionBar = getSupportActionBar();
|
||||||
if (supportActionBar == null) throw new AssertionError();
|
if (supportActionBar == null) throw new AssertionError();
|
||||||
supportActionBar.setBackgroundDrawable(new ColorDrawable(color.toActionBarColor(this)));
|
supportActionBar.setBackgroundDrawable(new ColorDrawable(getResources().getColor(R.color.core_grey_90)));
|
||||||
setStatusBarColor(color.toStatusBarColor(this));
|
setStatusBarColor(getResources().getColor(R.color.black));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setBlockedUserState(Recipient recipient, boolean isSecureText, boolean isDefaultSms) {
|
private void setBlockedUserState(Recipient recipient, boolean isSecureText, boolean isDefaultSms) {
|
||||||
|
@ -370,9 +370,9 @@ public class ConversationFragment extends Fragment
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (messageRecords.size() > 1) {
|
if (messageRecords.size() > 1) {
|
||||||
menu.findItem(R.id.menu_context_forward).setVisible(false);
|
// menu.findItem(R.id.menu_context_forward).setVisible(false);
|
||||||
menu.findItem(R.id.menu_context_reply).setVisible(false);
|
menu.findItem(R.id.menu_context_reply).setVisible(false);
|
||||||
menu.findItem(R.id.menu_context_details).setVisible(false);
|
// menu.findItem(R.id.menu_context_details).setVisible(false);
|
||||||
menu.findItem(R.id.menu_context_save_attachment).setVisible(false);
|
menu.findItem(R.id.menu_context_save_attachment).setVisible(false);
|
||||||
menu.findItem(R.id.menu_context_resend).setVisible(false);
|
menu.findItem(R.id.menu_context_resend).setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
@ -384,8 +384,10 @@ public class ConversationFragment extends Fragment
|
|||||||
!messageRecord.isMmsNotification() &&
|
!messageRecord.isMmsNotification() &&
|
||||||
((MediaMmsMessageRecord)messageRecord).containsMediaSlide());
|
((MediaMmsMessageRecord)messageRecord).containsMediaSlide());
|
||||||
|
|
||||||
|
/*
|
||||||
menu.findItem(R.id.menu_context_forward).setVisible(!actionMessage && !sharedContact);
|
menu.findItem(R.id.menu_context_forward).setVisible(!actionMessage && !sharedContact);
|
||||||
menu.findItem(R.id.menu_context_details).setVisible(!actionMessage);
|
menu.findItem(R.id.menu_context_details).setVisible(!actionMessage);
|
||||||
|
*/
|
||||||
menu.findItem(R.id.menu_context_reply).setVisible(!actionMessage &&
|
menu.findItem(R.id.menu_context_reply).setVisible(!actionMessage &&
|
||||||
!messageRecord.isPending() &&
|
!messageRecord.isPending() &&
|
||||||
!messageRecord.isFailed() &&
|
!messageRecord.isFailed() &&
|
||||||
@ -1047,6 +1049,7 @@ public class ConversationFragment extends Fragment
|
|||||||
handleDeleteMessages(getListAdapter().getSelectedItems());
|
handleDeleteMessages(getListAdapter().getSelectedItems());
|
||||||
actionMode.finish();
|
actionMode.finish();
|
||||||
return true;
|
return true;
|
||||||
|
/*
|
||||||
case R.id.menu_context_details:
|
case R.id.menu_context_details:
|
||||||
handleDisplayDetails(getSelectedMessageRecord());
|
handleDisplayDetails(getSelectedMessageRecord());
|
||||||
actionMode.finish();
|
actionMode.finish();
|
||||||
@ -1055,6 +1058,7 @@ public class ConversationFragment extends Fragment
|
|||||||
handleForwardMessage(getSelectedMessageRecord());
|
handleForwardMessage(getSelectedMessageRecord());
|
||||||
actionMode.finish();
|
actionMode.finish();
|
||||||
return true;
|
return true;
|
||||||
|
*/
|
||||||
case R.id.menu_context_resend:
|
case R.id.menu_context_resend:
|
||||||
handleResendMessage(getSelectedMessageRecord());
|
handleResendMessage(getSelectedMessageRecord());
|
||||||
actionMode.finish();
|
actionMode.finish();
|
||||||
|
@ -55,6 +55,8 @@ public class ConversationTitleView extends RelativeLayout {
|
|||||||
this.subtitleContainer = ViewUtil.findById(this, R.id.subtitle_container);
|
this.subtitleContainer = ViewUtil.findById(this, R.id.subtitle_container);
|
||||||
this.avatar = ViewUtil.findById(this, R.id.contact_photo_image);
|
this.avatar = ViewUtil.findById(this, R.id.contact_photo_image);
|
||||||
|
|
||||||
|
this.avatar.setEnabled(false);
|
||||||
|
|
||||||
ViewUtil.setTextViewGravityStart(this.title, getContext());
|
ViewUtil.setTextViewGravityStart(this.title, getContext());
|
||||||
ViewUtil.setTextViewGravityStart(this.subtitle, getContext());
|
ViewUtil.setTextViewGravityStart(this.subtitle, getContext());
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ class FriendRequestView(context: Context, attrs: AttributeSet?, defStyleAttr: In
|
|||||||
|
|
||||||
private val label by lazy {
|
private val label by lazy {
|
||||||
val result = TextView(context)
|
val result = TextView(context)
|
||||||
result.setTextColor(resources.getColorWithID(R.color.core_grey_90, context.theme))
|
result.setTextColor(resources.getColorWithID(R.color.white, context.theme))
|
||||||
result.textAlignment = TextView.TEXT_ALIGNMENT_CENTER
|
result.textAlignment = TextView.TEXT_ALIGNMENT_CENTER
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,6 @@ import org.thoughtcrime.securesms.R;
|
|||||||
public class DynamicNoActionBarTheme extends DynamicTheme {
|
public class DynamicNoActionBarTheme extends DynamicTheme {
|
||||||
@Override
|
@Override
|
||||||
protected int getSelectedTheme(Activity activity) {
|
protected int getSelectedTheme(Activity activity) {
|
||||||
String theme = TextSecurePreferences.getTheme(activity);
|
return R.style.TextSecure_DarkNoActionBar;
|
||||||
|
|
||||||
if (theme.equals("dark")) return R.style.TextSecure_DarkNoActionBar;
|
|
||||||
|
|
||||||
return R.style.TextSecure_LightNoActionBar;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,6 @@ import org.thoughtcrime.securesms.R;
|
|||||||
public class DynamicRegistrationTheme extends DynamicTheme {
|
public class DynamicRegistrationTheme extends DynamicTheme {
|
||||||
@Override
|
@Override
|
||||||
protected int getSelectedTheme(Activity activity) {
|
protected int getSelectedTheme(Activity activity) {
|
||||||
String theme = TextSecurePreferences.getTheme(activity);
|
return R.style.TextSecure_DarkRegistrationTheme;
|
||||||
|
|
||||||
if (theme.equals("dark")) return R.style.TextSecure_DarkRegistrationTheme;
|
|
||||||
|
|
||||||
return R.style.TextSecure_LightRegistrationTheme;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,11 +28,7 @@ public class DynamicTheme {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected int getSelectedTheme(Activity activity) {
|
protected int getSelectedTheme(Activity activity) {
|
||||||
String theme = TextSecurePreferences.getTheme(activity);
|
return R.style.TextSecure_DarkTheme;
|
||||||
|
|
||||||
if (theme.equals(DARK)) return R.style.TextSecure_DarkTheme;
|
|
||||||
|
|
||||||
return R.style.TextSecure_LightTheme;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class OverridePendingTransition {
|
private static final class OverridePendingTransition {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user