Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

CircleLayerActivity with style toggle - #8274

Merged
tobrun merged 1 commit into
masterfrom
tvn-circlelayeractivity-update
Mar 30, 2017
Merged

tobrun merged 1 commit into
masterfrom
tvn-circlelayeractivity-update

Conversation

@tobrun

@tobrun tobrun commented Mar 3, 2017 •

Copy link
Copy Markdown
Member

Refs #8200, this PR adds the possibility to toggle between styles for the CircleLayerActivity.
Closes #8546

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Mar 3, 2017
@tobrun tobrun self-assigned this Mar 3, 2017
@tobrun tobrun mentioned this pull request Mar 3, 2017
@tobrun
tobrun changed the base branch from release-ios-v3.5.0-android-v5.0.0 to master March 28, 2017 08:56
@tobrun
tobrun requested a review from Guardiola31337 March 28, 2017 08:56

@Guardiola31337 Guardiola31337 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about extracting the blocks of code preceded by a comment into private well named methods and remove the comments?

public void onMapReady(@NonNull final MapboxMap map) {
mapboxMap = map;

// add source

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about extracting this block of code into a private well named method and remove the comment?

}
mapboxMap.addSource(source);

// add layer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
fab.setColorFilter(ContextCompat.getColor(CircleLayerActivity.this, R.color.primary));
fab.setOnClickListener(new View.OnClickListener() {
// init FAB's

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same.

public void onClick(View view) {
if (!isLoadinStyle) {
if (view.getId() == R.id.fab_route) {
// remove buttons

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same.

@tobrun
tobrun force-pushed the tvn-circlelayeractivity-update branch 2 times, most recently from df755dc to 934e9b4 Compare March 29, 2017 13:33
@tobrun
tobrun force-pushed the tvn-circlelayeractivity-update branch from 934e9b4 to 8a4321c Compare March 30, 2017 08:24

@Guardiola31337 Guardiola31337 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great :shipit:

@tobrun
tobrun merged commit 74bf366 into master Mar 30, 2017
@tobrun
tobrun deleted the tvn-circlelayeractivity-update branch March 30, 2017 11:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Android Mapbox Maps SDK for Android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants