Code example for AtomicReference

Methods: get

0
        new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
 
    private AwTestContainerView createCustomTestContainerViewOnMainSync( 
            final AwContentsClient awContentsClient, final int visibility) throws Exception {
        final AtomicReference<AwTestContainerView> testContainerView =
                new AtomicReference<AwTestContainerView>();
        getInstrumentation().runOnMainSync(new Runnable() {
            @Override 
            public void run() { 
                testContainerView.set(createAwTestContainerView(awContentsClient,
                        new DependencyFactory())); 
                testContainerView.get().setLayoutParams(wrapContentLayoutParams);
                testContainerView.get().setVisibility(visibility);
            } 
        }); 
        return testContainerView.get();
    } 
 
    private AwTestContainerView createDetachedTestContainerViewOnMainSync( 
            final AwContentsClient awContentsClient) {
        final AtomicReference<AwTestContainerView> testContainerView =