Skip to content

Commit

Permalink
Add test flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChadCSong committed Nov 17, 2017
1 parent 08438de commit 9ecb7f0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
11 changes: 6 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
// sourceCompatibility JavaVersion.VERSION_1_8
// targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
Expand All @@ -34,10 +34,11 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// compile 'com.sackcentury:shinebutton:0.1.5'
compile 'com.sackcentury:shinebutton:0.2.0'
compile project(path: ':shinebuttonlib')
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:cardview-v7:23.0.1'
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support:cardview-v7:25.4.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.TextView;
Expand All @@ -25,6 +26,8 @@ protected void onCreate(Bundle savedInstanceState) {

listView = (ListView) findViewById(R.id.list);
listView.setAdapter(new ListAdapter());
getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);

}

List<Data> dataList = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private void showFragmentPage() {
* @param activity
*/
public static void setFullScreen(AppCompatActivity activity) {
activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
// activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
// activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
// activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
Expand All @@ -167,7 +167,7 @@ public static void setFullScreen(AppCompatActivity activity) {
**/
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
// in Activity's onCreate() for instance
// activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
}

}
Expand Down

0 comments on commit 9ecb7f0

Please sign in to comment.