-Change the buttons style to the buttons to material one in the import_seed.xml and java source
-Add the new buttons push animation to the buttons in the import_seed.xml and java source -Include layout in the buttons to fix orientación and correct size with the new properties
This commit is contained in:
parent
012aea807e
commit
b4cc708970
3 changed files with 43 additions and 15 deletions
|
@ -7,10 +7,13 @@ import android.os.Bundle;
|
|||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.text.Editable;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.thekhaeng.pushdownanim.PushDownAnim;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
|
@ -58,6 +61,9 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator
|
|||
|
||||
final Activity activity = this;
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
@ -65,6 +71,24 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator
|
|||
|
||||
ButterKnife.bind(this);
|
||||
|
||||
/*
|
||||
* Integration of library with button efects
|
||||
* */
|
||||
PushDownAnim.setPushDownAnimTo(btnCancel)
|
||||
.setOnClickListener( new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick( View view ){
|
||||
cancel();
|
||||
}
|
||||
} );
|
||||
PushDownAnim.setPushDownAnimTo(btnImport)
|
||||
.setOnClickListener( new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick( View view ){
|
||||
importSeed();
|
||||
}
|
||||
} );
|
||||
|
||||
/*
|
||||
* Initially the button CREATE WALLET should be disabled
|
||||
* */
|
||||
|
@ -354,7 +378,7 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator
|
|||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
btnImport.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||
//btnImport.setBackgroundColor(getResources().getColor(R.color.colorPrimary));
|
||||
btnImport.setEnabled(true);
|
||||
}
|
||||
});
|
||||
|
@ -368,7 +392,7 @@ public class ImportSeedActivity extends AppCompatActivity implements UIValidator
|
|||
@Override
|
||||
public void run() {
|
||||
btnImport.setEnabled(false);
|
||||
btnImport.setBackground(getDrawable(R.drawable.disable_style));
|
||||
//btnImport.setBackground(getDrawable(R.drawable.disable_style));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
android:id="@+id/btnDisAgree"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="0.50"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:theme="@style/RedButton"
|
||||
|
|
|
@ -90,33 +90,36 @@
|
|||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearlayoutButtons"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_below="@+id/tilAccountName"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="40dp">
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnCancel"
|
||||
android:layout_width="140dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginRight="5dp"
|
||||
android:background="@color/redColor"
|
||||
android:text="@string/cancel"
|
||||
android:layout_weight="0.50"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:theme="@style/RedButton"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold" />
|
||||
|
||||
android:textSize="14sp"
|
||||
android:text="@string/cancel" />
|
||||
<Button
|
||||
android:id="@+id/btnImport"
|
||||
android:layout_width="140dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:layout_weight="0.50"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:theme="@style/BlueButton"
|
||||
android:text="@string/create_wallet"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold" />
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
Loading…
Reference in a new issue