Question: please give me solution how to scroll two horizont recyclerviews side by side how to scroll two horizontal scrollviews side by side if i scroll any recycleview both will work like single recyclervie

```
    <HorizontalScrollView
                android:id="@+id/nested"
                android:background="@color/Ashh"
  android:fillViewport="true"
            android:measureAllChildren="true"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal">
                <androidx.recyclerview.widget.RecyclerView
                    android:layout_width="wrap_content"
                    android:id="@+id/serverlist"
                    android:background="@color/Ashh"
                    android:nestedScrollingEnabled="false"
                    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
                    android:orientation="horizontal"
                    android:layout_height="wrap_content"/>
                    <androidx.recyclerview.widget.RecyclerView
                    android:layout_width="wrap_content"
                    android:id="@+id/locallist"
                    android:background="@color/Ashh"
                        android:nestedScrollingEnabled="false"
                    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
                    android:orientation="horizontal"
                    android:layout_height="wrap_content"/>
                </LinearLayout>
            </HorizontalScrollView>

```

Answer: 
If the `signUp` method is blocking (i.e. it returns once the signup is finished), your code should work as expected. So I suspect it is asynchronous.

In that case, on top of using a boolean, you could also use a `CountDownLatch` to wait until the async method completes:

```
AtomicBoolean success = new AtomicBoolean(false);
CountDownLatch done = new CountDownLatch(1);
Amplify.Auth.signUp(
        email,
        password,
        AuthSignUpOptions.builder().userAttribute(AuthUserAttributeKey.email(), email).build(),
        result -> { success.set(true); done.countDown(); },
        error -> { Log.e("AuthQuickStart", "Sign up failed", error); done.countDown(); }
);
done.await(); //you may want to add a timeout here
Log.d("success", String.valueOf(success.get()));

```
An `AtomicBoolean` variable (`success`) is used correctly. Most probably,

```
Log.d("success", String.valueOf(success.get()));

```

is called before

```
result -> success.set(true)

```

because of asynchronous execution of callback. Alternatively result callback is not called at all.

**You can test it by changing callback body to:**

```
 result -> {
     Log.d("callback test", "callback start");
     result -> success.set(true);
     Log.d("callback test", "callback end");
}

```

If `"callback test"` doesn't appear in the logs then callback is not called.  

If `"callback test"` appear after `"success"` then callback body is called after `Log.d("success", String.valueOf(success.get()));` due to asynchronous execution.