├── app ├── .gitignore ├── release │ ├── app-release.apk │ └── output.json ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ ├── drawable │ │ │ │ ├── happynewyear.jpg │ │ │ │ └── full_screen_text.jpg │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── layout │ │ │ │ ├── activity_fullscreen_no_text.xml │ │ │ │ ├── fragment_no_have_tool.xml │ │ │ │ ├── activity_toolbar_andstatusbar_same_color.xml │ │ │ │ ├── fragment_have_havetool.xml │ │ │ │ ├── activity_fullscreen_text.xml │ │ │ │ ├── activity_in_fragment_status.xml │ │ │ │ └── activity_main.xml │ │ │ └── values-v21 │ │ │ │ └── styles.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── foking │ │ │ │ └── myapplication │ │ │ │ ├── ChangeStatusBarColorActivity.java │ │ │ │ ├── FullScrrenNoTextActivity.java │ │ │ │ ├── FullScrrenHaveTextActivity.java │ │ │ │ ├── FragmentUtil.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── ToolBarAndStatusBarSameColorActivity.java │ │ │ │ ├── BaseNoStatusBarFragment.java │ │ │ │ └── FragmentStatusAndActionBarActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── example │ │ │ └── foking │ │ │ └── myapplication │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── example │ │ └── foking │ │ └── myapplication │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── gradlew.bat └── gradlew /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/release/app-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/app/release/app-release.apk -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | My Application 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/happynewyear.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/app/src/main/res/drawable/happynewyear.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/full_screen_text.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/app/src/main/res/drawable/full_screen_text.jpg -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FokingGit/StatusBarDemo/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1},"path":"app-release.apk","properties":{"packageId":"com.example.foking.myapplication","split":"","minSdkVersion":"15"}}] -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/libraries 5 | /.idea/modules.xml 6 | /.idea/workspace.xml 7 | .DS_Store 8 | /build 9 | /captures 10 | .externalNativeBuild 11 | /app/build 12 | .idea 13 | 14 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sat Jan 06 19:31:58 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | #ff0000 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_fullscreen_no_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_no_have_tool.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_toolbar_andstatusbar_same_color.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_have_havetool.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_fullscreen_text.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/foking/myapplication/ChangeStatusBarColorActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.foking.myapplication; 2 | 3 | import android.os.Build; 4 | import android.os.Bundle; 5 | import android.support.annotation.Nullable; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.view.View; 8 | 9 | 10 | public class ChangeStatusBarColorActivity extends AppCompatActivity { 11 | @Override 12 | protected void onCreate(@Nullable Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.activity_fullscreen_no_text); 15 | //设置白底黑字 16 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { 17 | getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/foking/myapplication/FullScrrenNoTextActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.foking.myapplication; 2 | 3 | import android.os.Bundle; 4 | import android.support.annotation.Nullable; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.view.View; 7 | import android.view.WindowManager; 8 | 9 | 10 | public class FullScrrenNoTextActivity extends AppCompatActivity { 11 | @Override 12 | protected void onCreate(@Nullable Bundle savedInstanceState) { 13 | super.onCreate(savedInstanceState); 14 | setContentView(R.layout.activity_fullscreen_no_text); 15 | //方式一 16 | //getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); 17 | //方式二 18 | //getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN); 19 | //方式三 style.xml中配置 20 | // 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | defaultConfig { 6 | applicationId "com.example.foking.myapplication" 7 | minSdkVersion 15 8 | targetSdkVersion 24 9 | versionCode 1 10 | versionName "1.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | implementation fileTree(include: ['*.jar'], dir: 'libs') 23 | implementation 'com.android.support:appcompat-v7:25.3.0' 24 | implementation 'com.android.support.constraint:constraint-layout:1.0.2' 25 | testImplementation 'junit:junit:4.12' 26 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 27 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 28 | compile 'com.jakewharton:butterknife:8.6.0' 29 | annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0' 30 | } 31 | -------------------------------------------------------------------------------- /app/src/test/java/com/example/foking/myapplication/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.foking.myapplication; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | 18 | @Test 19 | public void testArray() { 20 | int x = 2; 21 | int i = (x++) / 3; 22 | //先进行其他运算,再进行自增或者自减 23 | System.out.println(i); 24 | } 25 | 26 | @Test 27 | public void testSwitch() { 28 | int x = 4; 29 | int j = 0; 30 | switch (x) { 31 | case 1: 32 | j++; 33 | case 2: 34 | j++; 35 | case 3: 36 | j++; 37 | case 4: 38 | System.out.println("case 4"); 39 | j++; 40 | case 5: 41 | System.out.println("case 5"); 42 | j++; 43 | default: 44 | j++; 45 | } 46 | 47 | System.out.println(j); 48 | } 49 | 50 | } -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 14 | 15 | 17 | 23 | 24 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/example/foking/myapplication/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.foking.myapplication; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | import android.util.Log; 7 | import android.view.ViewGroup; 8 | 9 | import org.junit.Test; 10 | import org.junit.runner.RunWith; 11 | 12 | import static org.junit.Assert.*; 13 | 14 | /** 15 | * Instrumented test, which will execute on an Android device. 16 | * 17 | * @see Testing documentation 18 | */ 19 | @RunWith(AndroidJUnit4.class) 20 | public class ExampleInstrumentedTest { 21 | @Test 22 | public void useAppContext() throws Exception { 23 | // Context of the app under test. 24 | Context appContext = InstrumentationRegistry.getTargetContext(); 25 | } 26 | 27 | private void printChildView(ViewGroup viewGroup) { 28 | Log.i("printView-ViewGroup", viewGroup.getClass().getSimpleName() + "的子View和数量:" + viewGroup.getChildCount()); 29 | for (int i = 0; i < viewGroup.getChildCount(); i++) { 30 | if (viewGroup.getChildAt(i) instanceof ViewGroup) { 31 | printChildView((ViewGroup) viewGroup.getChildAt(i)); 32 | } else { 33 | Log.i("printView", viewGroup.getChildAt(i).getClass().getSimpleName() + "是" + viewGroup.getClass().getSimpleName() + "的子View"); 34 | } 35 | } 36 | } 37 | 38 | private void testRxJava() { 39 | 40 | } 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/foking/myapplication/FullScrrenHaveTextActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.foking.myapplication; 2 | 3 | import android.os.Build; 4 | import android.os.Bundle; 5 | import android.support.annotation.Nullable; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.view.Window; 10 | import android.view.WindowManager; 11 | 12 | 13 | public class FullScrrenHaveTextActivity extends AppCompatActivity { 14 | @Override 15 | protected void onCreate(@Nullable Bundle savedInstanceState) { 16 | super.onCreate(savedInstanceState); 17 | setContentView(R.layout.activity_fullscreen_text); 18 | Window window = getWindow(); 19 | if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR2) { 20 | window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); 21 | ViewGroup contentView = (ViewGroup) window.getDecorView().findViewById(Window.ID_ANDROID_CONTENT); 22 | contentView.getChildAt(0).setFitsSystemWindows(false); 23 | } 24 | /* 25 | 这里fitsSystemWindows是什么意思呢?相信很多人会有疑问? 26 | 注意不是设置 ContentView 的 FitsSystemWindows, 而是设置 ContentView 的第一个子 View . 预留出系统 View 的空间. 27 | 看我们代码流程,首先是设置了FLAG_TRANSLUCENT_STATUS 将状态栏设置为透明的状态 28 | fitsSystemWindows代表的是:当设置SystemBar(包含StatusBar&NavigationBar)透明之后, 29 | 将fitsSystemWindows至为true,则还是为SystemBar预留空间,当设置为false的时候,就是不为SystemBar预留空间 30 | 现在这个业务场景是不为StatusBar预留空间,所以我们先将StatusBar设置为透明,然后不预留空间 31 | 这样就实现了我们的功能,全屏但是不隐藏statusBar文字 32 | */ 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 27 | 31 | 35 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/foking/myapplication/FragmentUtil.java: -------------------------------------------------------------------------------- 1 | package com.example.foking.myapplication; 2 | 3 | import android.content.ContextWrapper; 4 | import android.support.v4.app.Fragment; 5 | import android.support.v4.app.FragmentActivity; 6 | import android.support.v4.app.FragmentTransaction; 7 | import android.support.v7.app.AppCompatActivity; 8 | 9 | public class FragmentUtil { 10 | 11 | /** 12 | * 判断当前Fragment的getActivity是否可用 13 | * 14 | * @param fragment 15 | * @return 16 | */ 17 | public static boolean judgeGetActivityCanUse(Fragment fragment) { 18 | if (null != fragment) { 19 | FragmentActivity activity = fragment.getActivity(); 20 | if (null != activity 21 | && !activity.isFinishing() 22 | && !fragment.isDetached() 23 | && activity instanceof ContextWrapper) { 24 | return true; 25 | } else { 26 | return false; 27 | } 28 | } else { 29 | return false; 30 | } 31 | } 32 | 33 | public static void replaceSupportFragment(AppCompatActivity activity, int containerId, Class fragmentClass, String tag, boolean addToBackStack) { 34 | try { 35 | FragmentTransaction transaction = activity.getSupportFragmentManager().beginTransaction(); 36 | if (addToBackStack) { 37 | transaction.addToBackStack(null); 38 | } 39 | transaction.replace(containerId, fragmentClass.newInstance(), tag); 40 | transaction.commitAllowingStateLoss(); 41 | } catch (InstantiationException e) { 42 | e.printStackTrace(); 43 | } catch (IllegalAccessException e) { 44 | e.printStackTrace(); 45 | } 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/java/com/example/foking/myapplication/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.foking.myapplication; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.view.View; 7 | import android.widget.Button; 8 | 9 | import butterknife.BindView; 10 | import butterknife.ButterKnife; 11 | import butterknife.OnClick; 12 | 13 | public class MainActivity extends AppCompatActivity { 14 | 15 | 16 | @BindView(R.id.bt_fullscreen_notext) 17 | Button btFullscreenNotext; 18 | @BindView(R.id.bt_fullscreen_text) 19 | Button btFullscreenText; 20 | @BindView(R.id.bt_toolbar_status_same_color) 21 | Button btToolbarStatusSameColor; 22 | @BindView(R.id.bt_change_statusbar_text_colr) 23 | Button btChangeStatusbarTextColr; 24 | @BindView(R.id.bt_fragment_status) 25 | Button btFragmentStatus; 26 | 27 | @Override 28 | protected void onCreate(Bundle savedInstanceState) { 29 | super.onCreate(savedInstanceState); 30 | setContentView(R.layout.activity_main); 31 | ButterKnife.bind(this); 32 | } 33 | 34 | @OnClick({R.id.bt_fullscreen_notext, R.id.bt_fullscreen_text, R.id.bt_fragment_status, R.id.bt_toolbar_status_same_color, R.id.bt_change_statusbar_text_colr}) 35 | public void onViewClicked(View view) { 36 | Intent intent = new Intent(); 37 | Class clazz = null; 38 | switch (view.getId()) { 39 | case R.id.bt_fullscreen_notext: 40 | clazz = FullScrrenNoTextActivity.class; 41 | break; 42 | case R.id.bt_fullscreen_text: 43 | clazz = FullScrrenHaveTextActivity.class; 44 | break; 45 | case R.id.bt_toolbar_status_same_color: 46 | clazz = ToolBarAndStatusBarSameColorActivity.class; 47 | break; 48 | case R.id.bt_change_statusbar_text_colr: 49 | clazz = ChangeStatusBarColorActivity.class; 50 | break; 51 | case R.id.bt_fragment_status: 52 | clazz = FragmentStatusAndActionBarActivity.class; 53 | break; 54 | } 55 | intent.setClass(MainActivity.this, clazz); 56 | startActivity(intent); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_in_fragment_status.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 15 | 16 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 36 | 37 | 40 |