[android] LocationComponent animator throttling tests and examples

This commit is contained in:
Łukasz Paczos
2019-01-28 18:32:31 +01:00
committed by Łukasz Paczos
parent 953e6dca5b
commit f897f128e6
11 changed files with 451 additions and 185 deletions

View File

@@ -174,6 +174,10 @@ public class LocationModesActivity extends AppCompatActivity implements OnMapRea
} else if (id == R.id.action_gestures_management_enabled) {
enableGesturesManagement();
return true;
} else if (id == R.id.action_component_throttling_enabled) {
locationComponent.setMaxAnimationFps(5);
} else if (id == R.id.action_component_throttling_disabled) {
locationComponent.setMaxAnimationFps(Integer.MAX_VALUE);
}
return super.onOptionsItemSelected(item);

View File

@@ -24,4 +24,12 @@
<item android:id="@+id/action_gestures_management_disabled"
android:title="Disable Gestures Management"
app:showAsAction="never"/>
<item android:id="@+id/action_component_throttling_enabled"
android:title="Enable animation throttling (5 FPS)"
app:showAsAction="never"/>
<item android:id="@+id/action_component_throttling_disabled"
android:title="Disable animation throttling"
app:showAsAction="never"/>
</menu>