Android implementation of the platform plugin.
Definition at line 36 of file PlatformPlugin.java.
◆ PlatformPlugin() [1/2]
io.flutter.plugin.platform.PlatformPlugin.PlatformPlugin |
( |
@NonNull Activity |
activity, |
|
|
@NonNull PlatformChannel |
platformChannel |
|
) |
| |
|
inline |
◆ PlatformPlugin() [2/2]
Definition at line 162 of file PlatformPlugin.java.
165 {
166 this.activity = activity;
167 this.platformChannel = platformChannel;
169 this.platformPluginDelegate = delegate;
170
172 }
◆ destroy()
void io.flutter.plugin.platform.PlatformPlugin.destroy |
( |
| ) |
|
|
inline |
Releases all resources held by this PlatformPlugin
.
Do not invoke any methods on a PlatformPlugin
after invoking this method.
Definition at line 179 of file PlatformPlugin.java.
◆ updateSystemUiOverlays()
void io.flutter.plugin.platform.PlatformPlugin.updateSystemUiOverlays |
( |
| ) |
|
|
inline |
Refreshes Android's window system UI (AKA system chrome) to match Flutter's desired PlatformChannel.SystemChromeStyle
.
Updating the system UI Overlays is accomplished by altering the decor view of the Window
associated with the android.app.Activity
that was provided to this
PlatformPlugin
.
Definition at line 372 of file PlatformPlugin.java.
372 {
373 activity.getWindow().getDecorView().setSystemUiVisibility(mEnabledOverlays);
374 if (currentTheme != null) {
375 setSystemChromeSystemUIOverlayStyle(currentTheme);
376 }
377 }
◆ vibrateHapticFeedback()
void io.flutter.plugin.platform.PlatformPlugin.vibrateHapticFeedback |
( |
@NonNull PlatformChannel.HapticFeedbackType |
feedbackType | ) |
|
|
inlinepackage |
Definition at line 191 of file PlatformPlugin.java.
192 {
193 View view = activity.getWindow().getDecorView();
194 switch (feedbackType) {
195 case STANDARD:
196 view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
197 break;
198 case LIGHT_IMPACT:
199 view.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY);
200 break;
201 case MEDIUM_IMPACT:
202 view.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP);
203 break;
204 case HEAVY_IMPACT:
205 if (
Build.VERSION.SDK_INT >= API_LEVELS.API_23) {
206 view.performHapticFeedback(HapticFeedbackConstants.CONTEXT_CLICK);
207 }
208 break;
209 case SELECTION_CLICK:
210 view.performHapticFeedback(HapticFeedbackConstants.CLOCK_TICK);
211 break;
212 }
213 }
def Build(configs, env, options)
◆ DEFAULT_SYSTEM_UI
final int io.flutter.plugin.platform.PlatformPlugin.DEFAULT_SYSTEM_UI |
|
static |
Initial value:=
View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
Definition at line 37 of file PlatformPlugin.java.
◆ mPlatformMessageHandler
final PlatformChannel.PlatformMessageHandler io.flutter.plugin.platform.PlatformPlugin.mPlatformMessageHandler |
|
package |
The documentation for this class was generated from the following file: