Stub account details screen

pull/2/head
Niels Andriesse 5 years ago
parent b77ac07ef5
commit 96efb5d296

@ -435,6 +435,13 @@
android:exported="true"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<activity android:name=".loki.AccountDetailsActivity"
android:launchMode="singleTask"
android:theme="@style/TextSecure.LightRegistrationTheme"
android:windowSoftInputMode="stateUnchanged"
android:configChanges="touchscreen|keyboard|keyboardHidden|orientation|screenLayout|screenSize"/>
<service android:enabled="true" android:name="org.thoughtcrime.securesms.service.WebRtcCallService"/>
<service android:enabled="true" android:name=".service.ApplicationMigrationService"/>
<service android:enabled="true" android:exported="false" android:name=".service.KeyCachingService"/>

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/white"
android:fillViewport="true"
tools:context=".AccountDetailsActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:layout_alignParentTop="true"
android:orientation="vertical">
<TextView
android:id="@+id/titleTextView"
style="@style/Signal.Text.Headline.Registration"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:paddingBottom="16dp"
android:text="@string/activity_account_details_title" />
<TextView
android:id="@+id/subtitleTextView"
style="@style/Signal.Text.Body"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/activity_account_details_subtitle" />
</LinearLayout>
<LinearLayout
android:id="@+id/container"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/header"
android:layout_marginStart="32dp"
android:layout_marginTop="32dp"
android:layout_marginEnd="32dp"
android:animateLayoutChanges="true"
android:orientation="vertical"
android:paddingBottom="0dp"
android:clipToPadding="false"
android:clipChildren="false"
tools:visibility="gone">
<org.thoughtcrime.securesms.components.LabeledEditText
android:id="@+id/nameEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:labeledEditText_background="@color/white"
app:labeledEditText_label="Display Name (Optional)"/>
<com.dd.CircularProgressButton
android:id="@+id/nextButton"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="center_horizontal"
android:layout_marginTop="20dp"
android:background="@color/signal_primary"
android:textColor="@color/white"
app:cpb_colorIndicator="@color/white"
app:cpb_colorProgress="@color/textsecure_primary"
app:cpb_cornerRadius="4dp"
app:cpb_selectorIdle="@drawable/progress_button_state"
app:cpb_textIdle="@string/activity_account_details_button_title" />
</LinearLayout>
</RelativeLayout>
</ScrollView>

@ -1517,4 +1517,9 @@
<string name="recipient_preferences__about">About</string>
<!-- EOF -->
<!-- Loki -->
<string name="activity_account_details_title">Create Your Loki Messenger Account</string>
<string name="activity_account_details_subtitle">Enter a name to be shown to your contacts</string>
<string name="activity_account_details_button_title">Next</string>
</resources>

@ -9,10 +9,11 @@ import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import org.thoughtcrime.securesms.logging.Log;
import org.thoughtcrime.securesms.crypto.MasterSecretUtil;
import org.thoughtcrime.securesms.jobs.PushNotificationReceiveJob;
import org.thoughtcrime.securesms.logging.Log;
import org.thoughtcrime.securesms.loki.AccountDetailsActivity;
import org.thoughtcrime.securesms.push.SignalServiceNetworkAccess;
import org.thoughtcrime.securesms.registration.WelcomeActivity;
import org.thoughtcrime.securesms.service.KeyCachingService;
@ -182,7 +183,7 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
}
private Intent getPushRegistrationIntent() {
return getRoutedIntent(RegistrationActivity.class, getCreateProfileIntent());
return getRoutedIntent(AccountDetailsActivity.class, getCreateProfileIntent());
}
private Intent getCreateProfileIntent() {

@ -0,0 +1,13 @@
package org.thoughtcrime.securesms.loki
import android.os.Bundle
import org.thoughtcrime.securesms.BaseActionBarActivity
import org.thoughtcrime.securesms.R
class AccountDetailsActivity : BaseActionBarActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_account_details)
}
}

@ -111,7 +111,7 @@ class LokiPreKeyBundleDatabase(context: Context, helper: SQLCipherOpenHelper) :
/**
* Remove the `PreKeyBundle` for the given contact.
*
*
* @param pubKey String The hex encoded public key of the contact.
*/
fun removePreKeyBundle(pubKey: String) {

Loading…
Cancel
Save