question

rthor avatar image
rthor asked Mark Mullan Deactivated edited

Disappearing Soft Navigation

When launching the intent for ACTION_CUSTOMER_ADD_TIP and then exiting out of it, the bottom soft navigation (back, home, tasks) does not reappear, as well as not being able to get the swipe down menu to show. However, it works when launching other intents such as ACTION_SECURE_PAY. Is this intentional or a bug? If it's intentional, how to I re-enable to bottom soft navigation and the swipe down menu?

Below is an example activity to illustrate the issue
public class MainActivity extends Activity {
    private static final int COLLECT_TIP_REQUEST = 1;
    private static final int COLLECT_PAYMENT_REQUEST = 2;
    private static final String TEST_ORDER_ID = "A1C0YDR316FQC";
    private static final long TEST_TIP_AMOUNT = 101L;
    private static final long TEST_PAYMENT_AMOUNT = 222L;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


        findViewById(R.id.btnTip).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                final Intent intent = new Intent(ACTION_CUSTOMER_ADD_TIP);
                intent.putExtra(com.clover.sdk.v1.Intents.EXTRA_ORDER_ID, TEST_ORDER_ID);
                intent.putExtra(com.clover.sdk.v1.Intents.EXTRA_AMOUNT, 222L);
                startActivityForResult(intent, COLLECT_TIP_REQUEST);
            }
        });


        findViewById(R.id.btnPay).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                final Intent intent = new Intent(ACTION_SECURE_PAY);
                intent.putExtra(com.clover.sdk.v1.Intents.EXTRA_ORDER_ID, TEST_ORDER_ID);
                intent.putExtra(com.clover.sdk.v1.Intents.EXTRA_AMOUNT, TEST_PAYMENT_AMOUNT);
                intent.putExtra(com.clover.sdk.v1.Intents.EXTRA_TIP_AMOUNT, TEST_TIP_AMOUNT);
                startActivityForResult(intent, COLLECT_PAYMENT_REQUEST);
            }
        });
    }
}
And layout file
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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="match_parent"
    android:layout_height="match_parent"
    tools:context="com.mypackage.disappearingnavbar.MainActivity">
    <Button
        android:id="@+id/btnTip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Launch Tip"/>

    <Button
        android:id="@+id/btnPay"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintLeft_toRightOf="@id/btnTip"
        android:text="Launch Payment"/>

</android.support.constraint.ConstraintLayout>
Thanks in advance
Clover Android SDK
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

Welcome to the
Clover Developer Community