Fix transparency

This commit is contained in:
neslihanturan 2017-12-12 22:37:51 +03:00 committed by maskara
parent 57dc1cf5ed
commit 88cf1bdcd7

View file

@ -57,6 +57,8 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
LinearLayout bottomSheet; LinearLayout bottomSheet;
@BindView(R.id.fab_list) @BindView(R.id.fab_list)
FloatingActionButton fabList; FloatingActionButton fabList;
@BindView(R.id.transparentView)
View transparentView;
@Inject @Inject
LocationServiceManager locationManager; LocationServiceManager locationManager;
@ -103,6 +105,8 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
} }
private void initBottomSheetBehaviour() { private void initBottomSheetBehaviour() {
transparentView.setAlpha(0);
bottomSheet.getLayoutParams().height = getWindowManager() bottomSheet.getLayoutParams().height = getWindowManager()
.getDefaultDisplay().getHeight() / 16 * 9; .getDefaultDisplay().getHeight() / 16 * 9;
bottomSheetBehavior = BottomSheetBehavior.from(bottomSheet); bottomSheetBehavior = BottomSheetBehavior.from(bottomSheet);
@ -330,7 +334,7 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
progressBar.setVisibility(View.VISIBLE); progressBar.setVisibility(View.VISIBLE);
placesDisposable = Observable.fromCallable(() -> nearbyController placesDisposable = Observable.fromCallable(() -> nearbyController
.loadAttractionsFromLocation(curLatLang, this)) .loadAttractionsFromLocation(curLatLang))
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(this::populatePlaces); .subscribe(this::populatePlaces);
@ -355,13 +359,19 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
lockNearbyView(true); lockNearbyView(true);
// Begin the transaction // Begin the transaction
if (viewMode.isMap()) { // Begin the transaction
/*if (viewMode.isMap()) {
setMapFragment(); setMapFragment();
} else { } else {
setListFragment(); setListFragment();
} }
swipeLayout.setRefreshing(false); swipeLayout.setRefreshing(false);
}*/
setMapFragment();
setListFragment();
hideProgressBar(); hideProgressBar();
swipeLayout.setRefreshing(false);
} }
private void lockNearbyView(boolean lock) { private void lockNearbyView(boolean lock) {