Skip to content

Instantly share code, notes, and snippets.

View shuanghua's full-sized avatar
🍃
I

Sam.Mo shuanghua

🍃
I
  • Android Engineer
  • CN
View GitHub Profile
@shuanghua
shuanghua / RestartAppUtil.java
Created April 21, 2023 01:44 — forked from imhet/RestartAppUtil.java
Android 重启应用的5种方式
/**
* 多种方式重启应用自身
*/
public class RestartAppUtil
{
/**
* 使用 AlarmManager 来帮助重启

Prerequisites

  • Ensure you're running OxygenOS 11.1.2.2 firmware on your current slot.
    If you do not have that firmware installed, grab it for you device from the following links:
    enchilada (OnePlus 6)
    fajita (OnePlus 6T)

Required Files

  • Download the latest platform-tools.
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
import androidx.compose.animation.*
import androidx.compose.animation.core.tween
import androidx.compose.material.*
import androidx.compose.runtime.Composable
import androidx.compose.runtime.onCommit
import androidx.compose.ui.Modifier
@OptIn(ExperimentalAnimationApi::class, ExperimentalMaterialApi::class)
@Composable
fun <T> AnimatedSwipeDismiss(
@chrisbanes
chrisbanes / ForegroundLinearLayout.java
Created February 19, 2014 13:16
ForegroundLinearLayout
/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software