-Change the style of the window back up brainkey as in palmpay style

-Show the buttons centered in back up brainkey window
This commit is contained in:
dtvv 2018-10-14 01:14:15 -05:00
parent f705de8c60
commit 3d9d57d0fa
2 changed files with 33 additions and 30 deletions

View file

@ -11,6 +11,7 @@ import android.os.Bundle;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import android.widget.Button; import android.widget.Button;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
@ -76,7 +77,10 @@ public class BackupSeedActivity extends AppCompatActivity {
Bundle b = getIntent().getExtras(); Bundle b = getIntent().getExtras();
boolean newAccount = b.getBoolean("newAccount"); boolean newAccount = b.getBoolean("newAccount");
if(newAccount ){ if(newAccount ){
btnOk.setVisibility(View.INVISIBLE); ViewGroup layout = (ViewGroup) btnOk.getParent();
if(null!=layout) //for safety only as you are doing onClick
layout.removeView(btnOk);
//btnOk.setVisibility(View.INVISIBLE);
} }
long seedId = getIntent().getLongExtra("SEED_ID",-1); long seedId = getIntent().getLongExtra("SEED_ID",-1);

View file

@ -60,41 +60,40 @@
android:textColor="@color/black" android:textColor="@color/black"
android:textSize="14dp" /> android:textSize="14dp" />
<Button <LinearLayout
android:id="@+id/btnCancel" android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/backup_seed_textview_leyend_backup" android:layout_below="@+id/backup_seed_textview_leyend_backup"
android:layout_marginLeft="20dp" android:layout_marginTop="30dp"
android:layout_marginTop="35dp" android:orientation="horizontal">
android:layout_toLeftOf="@+id/btnCopy"
android:theme="@style/BlueButton" <Button
android:id="@+id/btnCancel"
android:layout_width="match_parent"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="@string/close" android:text="@string/close"
android:textColor="@color/white" /> android:textColor="@color/colorPrimary" />
<Button <Button
android:id="@+id/btnCopy" android:id="@+id/btnCopy"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_toLeftOf="@+id/btnOK" android:layout_weight="1"
android:layout_below="@+id/backup_seed_textview_leyend_backup"
android:layout_marginTop="35dp"
android:text="@string/window_seed_copy" android:text="@string/window_seed_copy"
android:textColor="@color/white" android:textColor="@color/colorPrimary"/>
android:theme="@style/BlueButton"/>
<Button <Button
android:id="@+id/btnOK" android:id="@+id/btnOK"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentRight="true" android:layout_weight="1"
android:layout_below="@+id/backup_seed_textview_leyend_backup"
android:layout_marginTop="35dp"
android:text="@string/ok" android:text="@string/ok"
android:textColor="@color/white" android:textColor="@color/colorPrimary" />
android:theme="@style/BlueButton"/>
</LinearLayout>
</RelativeLayout> </RelativeLayout>
</RelativeLayout> </RelativeLayout>