diff --git a/1/MainActivity.java b/1/MainActivity.java
new file mode 100644
index 0000000..6a64aa4
--- /dev/null
+++ b/1/MainActivity.java
@@ -0,0 +1,173 @@
+package com.sbw.atrue.Order.Activity;
+
+import android.animation.Animator;
+import android.content.Context;
+import android.graphics.Color;
+import android.os.Build;
+import android.os.Bundle;
+import android.view.View;
+import android.view.ViewAnimationUtils;
+import android.view.animation.AccelerateDecelerateInterpolator;
+import android.widget.ImageView;
+import android.widget.RadioGroup;
+
+import androidx.annotation.RequiresApi;
+import androidx.appcompat.app.AppCompatActivity;
+
+import com.franzliszt.SP;
+import com.franzliszt.foodturntable.AnimatedCircleLoadingView;
+import com.franzliszt.foodturntable.Turntable;
+import com.sbw.atrue.Order.R;
+
+//import com.sbw.atrue.Order.Activity.Turntable;
+
+public class MainActivity extends AppCompatActivity {
+ private AnimatedCircleLoadingView loadingView;
+ protected Turntable turntable;
+ private int count = 0;
+ private ImageView ChangeStatus;
+ private RadioGroup RG;
+ private SP sp;
+ private Context context = null;
+
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate( savedInstanceState );
+ if (Build.VERSION.SDK_INT >= 21) {
+ View decorView = getWindow().getDecorView();
+ decorView.setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE );
+ getWindow().setStatusBarColor( Color.TRANSPARENT );
+ }
+ setContentView( R.layout.activity_tmain );
+ InitView();
+ SelectNumber();
+ }
+
+ private void InitView() {
+ turntable = findViewById( R.id.TurnTable );
+ loadingView = findViewById( R.id.loadingView );
+ ChangeStatus = findViewById( R.id.StartAndEnd );
+ RG = findViewById( R.id.RG );
+ /*默认设置8等份*/
+ turntable.InitNumber( 8 );
+ if (context == null) {
+ context = MainActivity.this;
+ }
+ sp = new SP( context );
+ }
+
+ public void Start(View view) {
+ count++;
+ /*暂停*/
+ if (count % 2 == 0) {
+ turntable.Stop();
+ StartIcon();
+ } else {
+ /*开始*/
+ turntable.Start( -1 );
+ StopIcon();
+ }
+ }
+
+ private void StartIcon() {
+ ChangeStatus.setImageDrawable( getResources().getDrawable( R.drawable.start ) );
+ }
+
+ private void StopIcon() {
+ ChangeStatus.setImageDrawable( getResources().getDrawable( R.drawable.stop ) );
+ }
+
+ @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
+ public void Confirm(View view) {
+ RevealAnim( view );
+ loadingView.setVisibility( View.VISIBLE );
+ startLoading();
+ startPercentMockThread();
+ int num = (int) sp.GetData( context, "num", 0 );
+ turntable.InitNumber( num );
+ }
+
+ @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
+ public void Reset(View view) {
+ RevealAnim( view );
+ loadingView.setVisibility( View.GONE );
+ resetLoading();
+ }
+
+ private void startLoading() {
+ loadingView.startIndeterminate();
+ }
+
+ private void startPercentMockThread() {
+ Runnable runnable = new Runnable() {
+ @Override
+ public void run() {
+ try {
+ Thread.sleep( 500 );
+ for (int i = 0; i <= 100; i++) {
+ Thread.sleep( 40 );
+ changePercent( i );
+ }
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+ };
+ new Thread(runnable).start();
+ }
+
+ private void changePercent(final int percent) {
+ runOnUiThread( new Runnable() {
+ @Override
+ public void run() {
+ loadingView.setPercent( percent );
+ }
+ } );
+ }
+
+ public void resetLoading() {
+ runOnUiThread( new Runnable() {
+ @Override
+ public void run() {
+ loadingView.resetLoading();
+ }
+ } );
+ }
+
+ @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
+ private void RevealAnim(View view) {
+ Animator animator = ViewAnimationUtils.createCircularReveal(
+ view, view.getWidth() / 2, view.getHeight() / 2, view.getWidth(), 0
+ );
+ animator.setInterpolator( new AccelerateDecelerateInterpolator() );
+ animator.setDuration( 2000 );
+ animator.start();
+
+ }
+
+ private void SelectNumber() {
+ RG.setOnCheckedChangeListener( new RadioGroup.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(RadioGroup group, int checkedId) {
+ switch (checkedId) {
+ case R.id.threeParts:
+ sp.PutData( context, "num", 3 );
+ break;
+ /*
+ case R.id.fourParts:
+ sp.PutData( context, "num", 4 );
+ break;
+ case R.id.sixParts:
+ sp.PutData( context, "num", 6 );
+ break;
+
+ */
+ case R.id.eightParts:
+ sp.PutData( context, "num", 8 );
+ break;
+ }
+ }
+ } );
+ }
+}
diff --git a/1/MyApplication.java b/1/MyApplication.java
new file mode 100644
index 0000000..4096562
--- /dev/null
+++ b/1/MyApplication.java
@@ -0,0 +1,21 @@
+package com.sbw.atrue.Order.Activity;
+
+
+import com.yanzhenjie.nohttp.InitializationConfig;
+import com.yanzhenjie.nohttp.NoHttp;
+
+import org.litepal.LitePalApplication;
+
+public class MyApplication extends LitePalApplication {
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ InitializationConfig config = InitializationConfig.newBuilder(this)
+ .connectionTimeout(30 * 1000)
+ .readTimeout(30 * 1000)
+ .retry(10)
+ .build();
+ NoHttp.initialize(config);
+ Connection.mymysql();
+ }
+}
diff --git a/1/TmainActivity.java b/1/TmainActivity.java
new file mode 100644
index 0000000..166771e
--- /dev/null
+++ b/1/TmainActivity.java
@@ -0,0 +1,24 @@
+package com.sbw.atrue.Order.Activity;
+
+
+import android.app.Activity;
+import android.os.Bundle;
+
+import androidx.annotation.Nullable;
+
+import com.sbw.atrue.Order.R;
+
+public class TmainActivity extends Activity {
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.activity_tmain);
+ initViews(); //初始化页面控件
+ //initEvents(); //初始化控件事件
+ }
+
+ private void initViews() {
+
+ }
+}
diff --git a/1/activity_tmain.xml b/1/activity_tmain.xml
new file mode 100644
index 0000000..bd2c410
--- /dev/null
+++ b/1/activity_tmain.xml
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/1/activity_turntable.xml b/1/activity_turntable.xml
new file mode 100644
index 0000000..7d1b9aa
--- /dev/null
+++ b/1/activity_turntable.xml
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/1/bg_turntableleft.xml b/1/bg_turntableleft.xml
new file mode 100644
index 0000000..a4bf46f
--- /dev/null
+++ b/1/bg_turntableleft.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/1/bg_turntableright.xml b/1/bg_turntableright.xml
new file mode 100644
index 0000000..da6644a
--- /dev/null
+++ b/1/bg_turntableright.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/1/ninglibrary.jpg b/1/ninglibrary.jpg
new file mode 100644
index 0000000..e84f2b5
Binary files /dev/null and b/1/ninglibrary.jpg differ
diff --git a/1/turntable.png b/1/turntable.png
new file mode 100644
index 0000000..43498f9
Binary files /dev/null and b/1/turntable.png differ