整理工程
8
.gitmodules
vendored
@@ -1,9 +1,9 @@
|
|||||||
[submodule "mod_utils"]
|
[submodule "mod_utils"]
|
||||||
path = mod_utils
|
path = mod_utils
|
||||||
url = git@e.coding.net:slackz/ykbox/mod_utils.git
|
url = git@192.168.196.173:ykbox/mod_utils.git
|
||||||
[submodule "mod_signageapi"]
|
[submodule "mod_signageapi"]
|
||||||
path = mod_signageapi
|
path = mod_signageapi
|
||||||
url = git@e.coding.net:slackz/ykbox/mod_signageapi.git
|
url = git@192.168.196.173:ykbox/mod_signageapi.git
|
||||||
[submodule "mod_serialport"]
|
[submodule "mod_serialport"]
|
||||||
path = mod_serialport
|
path = mod_serialport
|
||||||
url = git@e.coding.net:slackz/ykbox/mod_serialport.git
|
url = git@192.168.196.173:ykbox/mod_serialport.git
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'cn.ykbox.fullshow'
|
namespace 'cn.ykbox.dashboard'
|
||||||
compileSdk 34
|
compileSdk 35
|
||||||
buildToolsVersion "30.0.3"
|
buildToolsVersion "30.0.3"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "cn.ykbox.fullshow"
|
applicationId "cn.ykbox.dashboard"
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 34
|
targetSdk 35
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0"
|
versionName "1.0"
|
||||||
|
|
||||||
@@ -37,18 +37,17 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation libs.appcompat
|
||||||
|
implementation libs.material
|
||||||
|
implementation libs.activity
|
||||||
|
implementation libs.constraintlayout
|
||||||
|
testImplementation libs.junit
|
||||||
|
androidTestImplementation libs.ext.junit
|
||||||
|
androidTestImplementation libs.espresso.core
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.6.1'
|
implementation libs.utilcodex
|
||||||
implementation 'com.google.android.material:material:1.9.0'
|
|
||||||
testImplementation 'junit:junit:4.13.2'
|
|
||||||
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
|
|
||||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
|
|
||||||
|
|
||||||
implementation project(':signageapi')
|
implementation libs.banner
|
||||||
implementation project(':utils')
|
implementation libs.glide
|
||||||
implementation 'com.blankj:utilcodex:1.31.1'
|
annotationProcessor libs.glidecompiler
|
||||||
|
|
||||||
implementation 'io.github.youth5201314:banner:2.2.2'
|
|
||||||
implementation 'com.github.bumptech.glide:glide:4.13.0'
|
|
||||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.13.0'
|
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.ykbox.fullshow;
|
package cn.ykbox.dashboard;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
@@ -7,20 +7,26 @@
|
|||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.Classtv">
|
android:theme="@style/Theme.Dashboard">
|
||||||
<activity
|
<activity
|
||||||
android:name=".FullscreenActivity"
|
android:name=".BuildingDashboardActivity"
|
||||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||||
android:exported="true"
|
android:exported="false"
|
||||||
android:label="@string/app_name"
|
android:label="@string/title_activity_building_dashboard"
|
||||||
android:theme="@style/Theme.Classtv.Fullscreen">
|
android:theme="@style/Theme.Dashboard.Fullscreen" />
|
||||||
|
<activity
|
||||||
|
android:name=".StartActivity"
|
||||||
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.HOME"/>
|
|
||||||
<category android:name="android.intent.category.DEFAULT"/>
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
<activity
|
||||||
|
android:name=".GalleryActivity"
|
||||||
|
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||||
|
android:exported="true"></activity>
|
||||||
|
|
||||||
<receiver
|
<receiver
|
||||||
android:name=".BootBroadcastReceiver"
|
android:name=".BootBroadcastReceiver"
|
||||||
@@ -29,7 +35,6 @@
|
|||||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver>
|
</receiver>
|
||||||
|
|
||||||
</application>
|
</application>
|
||||||
|
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.ykbox.fullshow;
|
package cn.ykbox.dashboard;
|
||||||
|
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -9,7 +9,7 @@ import androidx.annotation.Nullable;
|
|||||||
import androidx.appcompat.app.ActionBar;
|
import androidx.appcompat.app.ActionBar;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import cn.slackz.signageapi.PlatformFactory;
|
//import cn.slackz.signageapi.PlatformFactory;
|
||||||
|
|
||||||
public class BaseActivity extends AppCompatActivity {
|
public class BaseActivity extends AppCompatActivity {
|
||||||
final private String TAG = "BaseActivity";
|
final private String TAG = "BaseActivity";
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
package cn.ykbox.fullshow;
|
package cn.ykbox.dashboard;
|
||||||
|
|
||||||
import android.content.BroadcastReceiver;
|
import android.content.BroadcastReceiver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
import com.blankj.utilcode.util.ServiceUtils;
|
|
||||||
|
|
||||||
import cn.ykbox.utils.Log;
|
|
||||||
|
|
||||||
public class BootBroadcastReceiver extends BroadcastReceiver {
|
public class BootBroadcastReceiver extends BroadcastReceiver {
|
||||||
|
|
||||||
@@ -16,7 +13,7 @@ public class BootBroadcastReceiver extends BroadcastReceiver {
|
|||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
if (intent.getAction().equals(ACTION)) {
|
if (intent.getAction().equals(ACTION)) {
|
||||||
Intent myIntent = new Intent(context, FullscreenActivity.class);
|
Intent myIntent = new Intent(context, StartActivity.class);
|
||||||
myIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
myIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
context.startActivity(myIntent);
|
context.startActivity(myIntent);
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,188 @@
|
|||||||
|
package cn.ykbox.dashboard;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
|
||||||
|
import androidx.appcompat.app.ActionBar;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
import android.os.Build;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
import android.os.Looper;
|
||||||
|
import android.view.MotionEvent;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.WindowInsets;
|
||||||
|
|
||||||
|
import cn.ykbox.dashboard.databinding.ActivityBuildingDashboardBinding;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An example full-screen activity that shows and hides the system UI (i.e.
|
||||||
|
* status bar and navigation/system bar) with user interaction.
|
||||||
|
*/
|
||||||
|
public class BuildingDashboardActivity extends AppCompatActivity {
|
||||||
|
/**
|
||||||
|
* Whether or not the system UI should be auto-hidden after
|
||||||
|
* {@link #AUTO_HIDE_DELAY_MILLIS} milliseconds.
|
||||||
|
*/
|
||||||
|
private static final boolean AUTO_HIDE = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If {@link #AUTO_HIDE} is set, the number of milliseconds to wait after
|
||||||
|
* user interaction before hiding the system UI.
|
||||||
|
*/
|
||||||
|
private static final int AUTO_HIDE_DELAY_MILLIS = 3000;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Some older devices needs a small delay between UI widget updates
|
||||||
|
* and a change of the status and navigation bar.
|
||||||
|
*/
|
||||||
|
private static final int UI_ANIMATION_DELAY = 300;
|
||||||
|
private final Handler mHideHandler = new Handler(Looper.myLooper());
|
||||||
|
private View mContentView;
|
||||||
|
private final Runnable mHidePart2Runnable = new Runnable() {
|
||||||
|
@SuppressLint("InlinedApi")
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
// Delayed removal of status and navigation bar
|
||||||
|
if (Build.VERSION.SDK_INT >= 30) {
|
||||||
|
mContentView.getWindowInsetsController().hide(
|
||||||
|
WindowInsets.Type.statusBars() | WindowInsets.Type.navigationBars());
|
||||||
|
} else {
|
||||||
|
// Note that some of these constants are new as of API 16 (Jelly Bean)
|
||||||
|
// and API 19 (KitKat). It is safe to use them, as they are inlined
|
||||||
|
// at compile-time and do nothing on earlier devices.
|
||||||
|
mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE
|
||||||
|
| View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||||
|
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||||
|
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
|
||||||
|
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||||
|
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
private View mControlsView;
|
||||||
|
private final Runnable mShowPart2Runnable = new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
// Delayed display of UI elements
|
||||||
|
ActionBar actionBar = getSupportActionBar();
|
||||||
|
if (actionBar != null) {
|
||||||
|
actionBar.show();
|
||||||
|
}
|
||||||
|
mControlsView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
private boolean mVisible;
|
||||||
|
private final Runnable mHideRunnable = new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
hide();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* Touch listener to use for in-layout UI controls to delay hiding the
|
||||||
|
* system UI. This is to prevent the jarring behavior of controls going away
|
||||||
|
* while interacting with activity UI.
|
||||||
|
*/
|
||||||
|
private final View.OnTouchListener mDelayHideTouchListener = new View.OnTouchListener() {
|
||||||
|
@Override
|
||||||
|
public boolean onTouch(View view, MotionEvent motionEvent) {
|
||||||
|
switch (motionEvent.getAction()) {
|
||||||
|
case MotionEvent.ACTION_DOWN:
|
||||||
|
if (AUTO_HIDE) {
|
||||||
|
delayedHide(AUTO_HIDE_DELAY_MILLIS);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case MotionEvent.ACTION_UP:
|
||||||
|
view.performClick();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
private ActivityBuildingDashboardBinding binding;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
binding = ActivityBuildingDashboardBinding.inflate(getLayoutInflater());
|
||||||
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
|
mVisible = true;
|
||||||
|
mControlsView = binding.fullscreenContentControls;
|
||||||
|
mContentView = binding.fullscreenContent;
|
||||||
|
|
||||||
|
// Set up the user interaction to manually show or hide the system UI.
|
||||||
|
mContentView.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
toggle();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Upon interacting with UI controls, delay any scheduled hide()
|
||||||
|
// operations to prevent the jarring behavior of controls going away
|
||||||
|
// while interacting with the UI.
|
||||||
|
binding.dummyButton.setOnTouchListener(mDelayHideTouchListener);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPostCreate(Bundle savedInstanceState) {
|
||||||
|
super.onPostCreate(savedInstanceState);
|
||||||
|
|
||||||
|
// Trigger the initial hide() shortly after the activity has been
|
||||||
|
// created, to briefly hint to the user that UI controls
|
||||||
|
// are available.
|
||||||
|
delayedHide(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void toggle() {
|
||||||
|
if (mVisible) {
|
||||||
|
hide();
|
||||||
|
} else {
|
||||||
|
show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void hide() {
|
||||||
|
// Hide UI first
|
||||||
|
ActionBar actionBar = getSupportActionBar();
|
||||||
|
if (actionBar != null) {
|
||||||
|
actionBar.hide();
|
||||||
|
}
|
||||||
|
mControlsView.setVisibility(View.GONE);
|
||||||
|
mVisible = false;
|
||||||
|
|
||||||
|
// Schedule a runnable to remove the status and navigation bar after a delay
|
||||||
|
mHideHandler.removeCallbacks(mShowPart2Runnable);
|
||||||
|
mHideHandler.postDelayed(mHidePart2Runnable, UI_ANIMATION_DELAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void show() {
|
||||||
|
// Show the system bar
|
||||||
|
if (Build.VERSION.SDK_INT >= 30) {
|
||||||
|
mContentView.getWindowInsetsController().show(
|
||||||
|
WindowInsets.Type.statusBars() | WindowInsets.Type.navigationBars());
|
||||||
|
} else {
|
||||||
|
mContentView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||||
|
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
|
||||||
|
}
|
||||||
|
mVisible = true;
|
||||||
|
|
||||||
|
// Schedule a runnable to display UI elements after a delay
|
||||||
|
mHideHandler.removeCallbacks(mHidePart2Runnable);
|
||||||
|
mHideHandler.postDelayed(mShowPart2Runnable, UI_ANIMATION_DELAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Schedules a call to hide() in delay milliseconds, canceling any
|
||||||
|
* previously scheduled calls.
|
||||||
|
*/
|
||||||
|
private void delayedHide(int delayMillis) {
|
||||||
|
mHideHandler.removeCallbacks(mHideRunnable);
|
||||||
|
mHideHandler.postDelayed(mHideRunnable, delayMillis);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,4 @@
|
|||||||
package cn.ykbox.fullshow;
|
package cn.ykbox.dashboard;
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,40 +1,27 @@
|
|||||||
package cn.ykbox.fullshow;
|
package cn.ykbox.dashboard;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.ActionBar;
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
import androidx.fragment.app.FragmentManager;
|
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Build;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
|
||||||
import android.os.SystemClock;
|
import android.os.SystemClock;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
|
||||||
import android.view.WindowInsets;
|
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import com.blankj.utilcode.util.ScreenUtils;
|
import com.blankj.utilcode.util.ScreenUtils;
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
|
||||||
import com.bumptech.glide.request.RequestOptions;
|
|
||||||
import com.youth.banner.adapter.BannerImageAdapter;
|
import com.youth.banner.adapter.BannerImageAdapter;
|
||||||
import com.youth.banner.holder.BannerImageHolder;
|
import com.youth.banner.holder.BannerImageHolder;
|
||||||
import com.youth.banner.indicator.CircleIndicator;
|
import com.youth.banner.indicator.CircleIndicator;
|
||||||
|
|
||||||
import cn.ykbox.fullshow.databinding.ActivityFullscreenBinding;
|
import cn.ykbox.dashboard.databinding.ActivityGalleryBinding;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An example full-screen activity that shows and hides the system UI (i.e.
|
* An example full-screen activity that shows and hides the system UI (i.e.
|
||||||
* status bar and navigation/system bar) with user interaction.
|
* status bar and navigation/system bar) with user interaction.
|
||||||
*/
|
*/
|
||||||
public class FullscreenActivity extends BaseActivity {
|
public class GalleryActivity extends BaseActivity {
|
||||||
|
|
||||||
private ActivityFullscreenBinding binding;
|
private ActivityGalleryBinding binding;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
|
||||||
private Handler mHandler = new Handler();
|
private Handler mHandler = new Handler();
|
||||||
@@ -48,13 +35,11 @@ public class FullscreenActivity extends BaseActivity {
|
|||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
mContext = this;
|
mContext = this;
|
||||||
|
|
||||||
binding = ActivityFullscreenBinding.inflate(getLayoutInflater());
|
binding = ActivityGalleryBinding.inflate(getLayoutInflater());
|
||||||
setContentView(binding.getRoot());
|
setContentView(binding.getRoot());
|
||||||
|
|
||||||
binding.banner.setAdapter(new BannerImageAdapter<DataBean>(DataBean.getTestData()) {
|
binding.banner.setAdapter(new BannerImageAdapter<DataBean>(DataBean.getTestData()) {
|
||||||
@Override
|
@Override
|
||||||
public void onBindView(BannerImageHolder holder, DataBean data, int position, int size) {
|
public void onBindView(BannerImageHolder holder, DataBean data, int position, int size) {
|
||||||
|
|
||||||
Log.d("fullshow", "load" + data.imageRes);
|
Log.d("fullshow", "load" + data.imageRes);
|
||||||
Glide.with(holder.itemView)
|
Glide.with(holder.itemView)
|
||||||
.load(data.imageRes)
|
.load(data.imageRes)
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package cn.ykbox.dashboard;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import androidx.core.graphics.Insets;
|
||||||
|
import androidx.core.view.ViewCompat;
|
||||||
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
|
||||||
|
public class StartActivity extends AppCompatActivity {
|
||||||
|
private Context mContext;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
mContext = this;
|
||||||
|
EdgeToEdge.enable(this);
|
||||||
|
setContentView(R.layout.activity_start);
|
||||||
|
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
|
||||||
|
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
||||||
|
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
|
||||||
|
return insets;
|
||||||
|
});
|
||||||
|
|
||||||
|
new Handler().postDelayed(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
Intent myIntent = new Intent(mContext, BuildingDashboardActivity.class);
|
||||||
|
myIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||||
|
mContext.startActivity(myIntent);
|
||||||
|
}
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 741 KiB After Width: | Height: | Size: 741 KiB |
|
Before Width: | Height: | Size: 530 KiB After Width: | Height: | Size: 530 KiB |
|
Before Width: | Height: | Size: 385 KiB After Width: | Height: | Size: 385 KiB |
|
Before Width: | Height: | Size: 574 KiB After Width: | Height: | Size: 574 KiB |
|
Before Width: | Height: | Size: 631 KiB After Width: | Height: | Size: 631 KiB |
|
Before Width: | Height: | Size: 671 KiB After Width: | Height: | Size: 671 KiB |
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="?attr/fullscreenBackgroundColor"
|
||||||
|
android:theme="@style/ThemeOverlay.DashBoardClient.FullscreenContainer"
|
||||||
|
tools:context=".BuildingDashboardActivity">
|
||||||
|
|
||||||
|
<!-- The primary full-screen view. This can be replaced with whatever view
|
||||||
|
is needed to present your content, e.g. VideoView, SurfaceView,
|
||||||
|
TextureView, etc. -->
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/fullscreen_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:keepScreenOn="true"
|
||||||
|
android:text="@string/dummy_content"
|
||||||
|
android:textColor="?attr/fullscreenTextColor"
|
||||||
|
android:textSize="50sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<!-- This FrameLayout insets its children based on system windows using
|
||||||
|
android:fitsSystemWindows. -->
|
||||||
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/fullscreen_content_controls"
|
||||||
|
style="@style/Widget.Theme.Dashboard.ButtonBar.Fullscreen"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom|center_horizontal"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
tools:ignore="UselessParent">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/dummy_button"
|
||||||
|
style="?android:attr/buttonBarButtonStyle"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/dummy_button" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
@@ -3,9 +3,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?attr/fullscreenBackgroundColor"
|
tools:context=".GalleryActivity">
|
||||||
android:theme="@style/ThemeOverlay.Classtv.FullscreenContainer"
|
|
||||||
tools:context=".FullscreenActivity">
|
|
||||||
|
|
||||||
<com.youth.banner.Banner
|
<com.youth.banner.Banner
|
||||||
android:id="@+id/banner"
|
android:id="@+id/banner"
|
||||||
18
app_dashboard/src/main/res/layout/activity_start.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/main"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context=".StartActivity">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="启动中,请稍后..."
|
||||||
|
android:textSize="30sp">
|
||||||
|
</TextView>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 982 B After Width: | Height: | Size: 982 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
@@ -18,4 +18,9 @@
|
|||||||
<item name="fullscreenBackgroundColor">@color/light_blue_900</item>
|
<item name="fullscreenBackgroundColor">@color/light_blue_900</item>
|
||||||
<item name="fullscreenTextColor">@color/light_blue_A400</item>
|
<item name="fullscreenTextColor">@color/light_blue_A400</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="ThemeOverlay.DashBoardClient.FullscreenContainer" parent="">
|
||||||
|
<item name="fullscreenBackgroundColor">@color/light_blue_900</item>
|
||||||
|
<item name="fullscreenTextColor">@color/light_blue_A400</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">fullshow</string>
|
<string name="app_name">Dashboard</string>
|
||||||
<string name="dummy_button">Dummy Button</string>
|
<string name="dummy_button">Dummy Button</string>
|
||||||
<string name="dummy_content">DUMMY\nCONTENT</string>
|
<string name="dummy_content">DUMMY\nCONTENT</string>
|
||||||
|
<string name="title_activity_building_dashboard">BuildingDashboardActivity</string>
|
||||||
</resources>
|
</resources>
|
||||||
@@ -8,4 +8,13 @@
|
|||||||
<item name="android:background">@color/black_overlay</item>
|
<item name="android:background">@color/black_overlay</item>
|
||||||
<item name="android:buttonBarStyle">?android:attr/buttonBarStyle</item>
|
<item name="android:buttonBarStyle">?android:attr/buttonBarStyle</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Widget.Theme.Dashboard.ActionBar.Fullscreen" parent="Widget.AppCompat.ActionBar">
|
||||||
|
<item name="android:background">@color/black_overlay</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Widget.Theme.Dashboard.ButtonBar.Fullscreen" parent="">
|
||||||
|
<item name="android:background">@color/black_overlay</item>
|
||||||
|
<item name="android:buttonBarStyle">?android:attr/buttonBarStyle</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
21
app_dashboard/src/main/res/values/themes.xml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
<!-- Base application theme. -->
|
||||||
|
<style name="Base.Theme.DashBoardClient" parent="Theme.Material3.Dark.NoActionBar">
|
||||||
|
<!-- Customize your light theme here. -->
|
||||||
|
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.Dashboard" parent="Base.Theme.DashBoardClient" />
|
||||||
|
|
||||||
|
<style name="Theme.Dashboard.Fullscreen" parent="Theme.Dashboard">
|
||||||
|
<item name="android:actionBarStyle">@style/Widget.Theme.Dashboard.ActionBar.Fullscreen
|
||||||
|
</item>
|
||||||
|
<item name="android:windowActionBarOverlay">true</item>
|
||||||
|
<item name="android:windowBackground">@null</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="ThemeOverlay.DashBoardClient.FullscreenContainer" parent="">
|
||||||
|
<item name="fullscreenBackgroundColor">@color/light_blue_600</item>
|
||||||
|
<item name="fullscreenTextColor">@color/light_blue_A200</item>
|
||||||
|
</style>
|
||||||
|
</resources>
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package cn.ykbox.fullshow;
|
package cn.ykbox.dashboard;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@@ -6,7 +6,7 @@ buildscript {
|
|||||||
maven { url 'https://repo1.maven.org/maven2/' }
|
maven { url 'https://repo1.maven.org/maven2/' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.4.2'
|
classpath 'com.android.tools.build:gradle:8.12.2'
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
|
||||||
<!-- Base application theme. -->
|
|
||||||
<style name="Theme.Classtv" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
|
|
||||||
<!-- Primary brand color. -->
|
|
||||||
<item name="colorPrimary">@color/purple_500</item>
|
|
||||||
<item name="colorPrimaryVariant">@color/purple_700</item>
|
|
||||||
<item name="colorOnPrimary">@color/white</item>
|
|
||||||
<!-- Secondary brand color. -->
|
|
||||||
<item name="colorSecondary">@color/teal_200</item>
|
|
||||||
<item name="colorSecondaryVariant">@color/teal_700</item>
|
|
||||||
<item name="colorOnSecondary">@color/black</item>
|
|
||||||
<!-- Status bar color. -->
|
|
||||||
<item name="android:statusBarColor">?attr/colorPrimaryVariant</item>
|
|
||||||
<!-- Customize your theme here. -->
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="Theme.Classtv.Fullscreen" parent="Theme.Classtv">
|
|
||||||
<item name="android:actionBarStyle">@style/Widget.Theme.Classtv.ActionBar.Fullscreen</item>
|
|
||||||
<item name="android:windowActionBarOverlay">true</item>
|
|
||||||
<item name="android:windowBackground">@null</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="ThemeOverlay.Classtv.FullscreenContainer" parent="">
|
|
||||||
<item name="fullscreenBackgroundColor">@color/light_blue_600</item>
|
|
||||||
<item name="fullscreenTextColor">@color/light_blue_A200</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
62
gradle/libs.versions.toml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
[versions]
|
||||||
|
agp = "8.8.2"
|
||||||
|
exoplayer = "2.19.1"
|
||||||
|
banner = "2.2.2"
|
||||||
|
glide = "4.13.0"
|
||||||
|
leakcanaryAndroid = "2.10"
|
||||||
|
lifecycleService = "2.9.0"
|
||||||
|
videocache = "2.7.1"
|
||||||
|
zxing = "3.5.1"
|
||||||
|
annotation = "1.9.1"
|
||||||
|
dialogx = "0.0.49"
|
||||||
|
eventbus = "3.3.1"
|
||||||
|
javaWebsocket = "1.5.3"
|
||||||
|
junit = "4.13.2"
|
||||||
|
junitVersion = "1.2.1"
|
||||||
|
espressoCore = "3.6.1"
|
||||||
|
appcompat = "1.7.0"
|
||||||
|
material = "1.12.0"
|
||||||
|
activity = "1.10.1"
|
||||||
|
constraintlayout = "2.2.1"
|
||||||
|
kotlin = "1.9.24"
|
||||||
|
coreKtx = "1.16.0"
|
||||||
|
okhttp = "4.9.1"
|
||||||
|
recyclerview = "1.3.2"
|
||||||
|
runner = "1.0.2"
|
||||||
|
preference = "1.2.1"
|
||||||
|
utilcodex = "1.31.1"
|
||||||
|
xlog = "1.11.1"
|
||||||
|
|
||||||
|
[libraries]
|
||||||
|
annotation = { module = "androidx.annotation:annotation", version.ref = "annotation" }
|
||||||
|
banner = { module = "io.github.youth5201314:banner", version.ref = "banner" }
|
||||||
|
exoplayer = { module = "com.google.android.exoplayer:exoplayer", version.ref = "exoplayer" }
|
||||||
|
glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" }
|
||||||
|
glidecompiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glide" }
|
||||||
|
leakcanary-android = { module = "com.squareup.leakcanary:leakcanary-android", version.ref = "leakcanaryAndroid" }
|
||||||
|
lifecycle-service = { module = "androidx.lifecycle:lifecycle-service", version.ref = "lifecycleService" }
|
||||||
|
videocache = { module = "com.danikula:videocache", version.ref = "videocache" }
|
||||||
|
zxingcore = { module = "com.google.zxing:core", version.ref = "zxing" }
|
||||||
|
dialogx = { module = "com.kongzue.dialogx:DialogX", version.ref = "dialogx" }
|
||||||
|
eventbus = { module = "org.greenrobot:eventbus", version.ref = "eventbus" }
|
||||||
|
java-websocket = { module = "org.java-websocket:Java-WebSocket", version.ref = "javaWebsocket" }
|
||||||
|
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||||
|
ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
||||||
|
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
||||||
|
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
|
||||||
|
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||||
|
activity = { group = "androidx.activity", name = "activity", version.ref = "activity" }
|
||||||
|
constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
|
||||||
|
core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||||
|
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
|
||||||
|
recyclerview = { module = "androidx.recyclerview:recyclerview", version.ref = "recyclerview" }
|
||||||
|
runner = { group = "com.android.support.test", name = "runner", version.ref = "runner" }
|
||||||
|
preference = { group = "androidx.preference", name = "preference", version.ref = "preference" }
|
||||||
|
utilcodex = { module = "com.blankj:utilcodex", version.ref = "utilcodex" }
|
||||||
|
xlog = { module = "com.elvishew:xlog", version.ref = "xlog" }
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
android-library = { id = "com.android.library", version.ref = "agp" }
|
||||||
|
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin"}
|
||||||
|
|
||||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
#Thu Aug 31 19:52:02 CST 2023
|
#Thu Sep 11 13:33:07 CST 2025
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
include ':fullshow'
|
include ':app_dashboard'
|
||||||
include ':utils'
|
//include ':utils'
|
||||||
project(':utils').projectDir = new File("mod_utils/utils")
|
//project(':utils').projectDir = new File("mod_utils/utils")
|
||||||
include ':signageapi'
|
//include ':signageapi'
|
||||||
project(':signageapi').projectDir = new File("mod_signageapi/signageapi")
|
//project(':signageapi').projectDir = new File("mod_signageapi/signageapi")
|
||||||
include ':serialport'
|
//include ':serialport'
|
||||||
project(':serialport').projectDir = new File("mod_serialport/serialport")
|
//project(':serialport').projectDir = new File("mod_serialport/serialport")
|
||||||
|
//include ':dashboard'
|
||||||
|
|||||||