Add the new buttons push animation to the buttons in the fragment_import_account_options.xml
This commit is contained in:
parent
bd6a27f15b
commit
0928a5bc81
2 changed files with 39 additions and 6 deletions
|
@ -6,6 +6,7 @@ import android.arch.lifecycle.ViewModelProviders;
|
|||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
@ -17,6 +18,7 @@ import android.support.v4.content.ContextCompat;
|
|||
import android.support.v7.app.AlertDialog;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
|
@ -24,6 +26,7 @@ import android.widget.Button;
|
|||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.thekhaeng.pushdownanim.PushDownAnim;
|
||||
import com.vincent.filepicker.ToastUtil;
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
|
@ -31,6 +34,7 @@ import java.net.URISyntaxException;
|
|||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import butterknife.OnTouch;
|
||||
import cy.agorise.crystalwallet.R;
|
||||
import cy.agorise.crystalwallet.activities.BoardActivity;
|
||||
import cy.agorise.crystalwallet.activities.ImportSeedActivity;
|
||||
|
@ -56,6 +60,8 @@ public class ImportAccountOptionsFragment extends DialogFragment {
|
|||
Button btnClose;
|
||||
@BindView(R.id.btnImportBackup)
|
||||
Button btnImportBackup;
|
||||
@BindView(R.id.btnImportSeed)
|
||||
Button btnImportSeed;
|
||||
|
||||
private static final int PERMISSION_REQUEST_CODE = 1;
|
||||
|
||||
|
@ -98,6 +104,34 @@ public class ImportAccountOptionsFragment extends DialogFragment {
|
|||
View view = inflater.inflate(R.layout.fragment_import_account_options, null);
|
||||
ButterKnife.bind(this, view);
|
||||
|
||||
/*
|
||||
* Integration of library with button efects
|
||||
* */
|
||||
PushDownAnim.setPushDownAnimTo(btnClose)
|
||||
.setOnClickListener( new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick( View view ){
|
||||
cancel();
|
||||
}
|
||||
|
||||
} );
|
||||
PushDownAnim.setPushDownAnimTo(btnImportBackup)
|
||||
.setOnClickListener( new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick( View view ){
|
||||
importBackup();
|
||||
}
|
||||
|
||||
} );
|
||||
PushDownAnim.setPushDownAnimTo(btnImportSeed)
|
||||
.setOnClickListener( new View.OnClickListener(){
|
||||
@Override
|
||||
public void onClick( View view ){
|
||||
importSeed();
|
||||
}
|
||||
|
||||
} );
|
||||
|
||||
return builder.setView(view).create();
|
||||
}
|
||||
|
||||
|
|
|
@ -57,17 +57,16 @@
|
|||
<Button
|
||||
android:id="@+id/btnCancel"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:background="@color/redColor"
|
||||
android:text="@string/dialog_cancel"
|
||||
android:layout_height="59dp"
|
||||
android:layout_marginTop="22dp"
|
||||
android:theme="@style/RedButton"
|
||||
android:text="@string/dialog_cancel"
|
||||
android:textAllCaps="false"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@id/btnImportSeed"
|
||||
app:layout_constraintEnd_toEndOf="@id/btnImportSeed"
|
||||
app:layout_constraintStart_toStartOf="@id/btnImportSeed"
|
||||
app:layout_constraintEnd_toEndOf="@id/btnImportSeed"/>
|
||||
app:layout_constraintTop_toBottomOf="@id/btnImportSeed" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
Loading…
Reference in a new issue