245 ol-245"> 245
+
246
+        public Builder setHeight(int height) {
247
+            this.mHeight = height;
248
+            return this;
249
+        }
250
+
251
+        public Builder setStrokeWidth(int strokeWidth) {
252
+            this.mStrokeWidth = strokeWidth;
253
+            return this;
254
+        }
255
+
256
+        public Builder setCenterRadius(int centerRadius) {
257
+            this.mCenterRadius = centerRadius;
258
+            return this;
259
+        }
260
+
261
+        public Builder setDuration(int duration) {
262
+            this.mDuration = duration;
263
+            return this;
264
+        }
265
+
266
+        public Builder setColor(int color) {
267
+            this.mColor = color;
268
+            return this;
269
+        }
270
+
271
+        public Builder setGearCount(int gearCount) {
272
+            this.mGearCount = gearCount;
273
+            return this;
274
+        }
275
+
276
+        public Builder setGearSwipeDegrees(@IntRange(from = 0, to = 360) int gearSwipeDegrees) {
277
+            this.mGearSwipeDegrees = gearSwipeDegrees;
278
+            return this;
279
+        }
280
+
281
+        public GearLoadingRenderer build() {
282
+            GearLoadingRenderer loadingRenderer = new GearLoadingRenderer(mContext);
283
+            loadingRenderer.apply(this);
284
+            return loadingRenderer;
285
+        }
286
+    }
287
+}

+ 27 - 0
views/src/main/res/values/attrs.xml

@@ -121,4 +121,31 @@
121 121
         <attr name="hasStickyHeaders" format="boolean" />
122 122
         <attr name="isDrawingListUnderStickyHeader" format="boolean" />
123 123
     </declare-styleable>
124
+
125
+    <declare-styleable name="LoadingView">
126
+        <attr name="loading_renderer">
127
+            <!--circle rotate-->
128
+            <enum name="MaterialLoadingRenderer" value="0"/>
129
+            <enum name="LevelLoadingRenderer" value="1"/>
130
+            <enum name="WhorlLoadingRenderer" value="2"/>
131
+            <enum name="GearLoadingRenderer" value="3"/>
132
+            <!--circle jump-->
133
+            <enum name="SwapLoadingRenderer" value="4"/>
134
+            <enum name="GuardLoadingRenderer" value="5"/>
135
+            <enum name="DanceLoadingRenderer" value="6"/>
136
+            <enum name="CollisionLoadingRenderer" value="7"/>
137
+            <!--Scenery-->
138
+            <enum name="DayNightLoadingRenderer" value="8"/>
139
+            <enum name="ElectricFanLoadingRenderer" value="9"/>
140
+            <!--Animal-->
141
+            <enum name="FishLoadingRenderer" value="10"/>
142
+            <enum name="GhostsEyeLoadingRenderer" value="11"/>
143
+            <!--Goods-->
144
+            <enum name="BalloonLoadingRenderer" value="12"/>
145
+            <enum name="WaterBottleLoadingRenderer" value="13"/>
146
+            <!--ShapeChange-->
147
+            <enum name="CircleBroodLoadingRenderer" value="14"/>
148
+            <enum name="CoolWaitLoadingRenderer" value="15"/>
149
+        </attr>
150
+    </declare-styleable>
124 151
 </resources>

摄影师端app的工作目录不被扫码 · fa8c649fd8 - Gogs: Go Git Service

摄影师端app的工作目录不被扫码

chengzhenyu 9 lat temu
rodzic
commit
fa8c649fd8
2 zmienionych plików z 17 dodań i 3 usunięć
  1. 2 2
      app/build.gradle
  2. 15 1
      app/src/main/java/ai/pai/lensman/App.java

+ 2 - 2
app/build.gradle

@@ -20,8 +20,8 @@ android {
20 20
         applicationId "ai.pai.lensman"
21 21
         minSdkVersion MIN_SDK_VERSION as int
22 22
         targetSdkVersion TARGET_SDK_VERSION as int
23
-        versionCode 1012
24
-        versionName "1.0.12"
23
+        versionCode 1013
24
+        versionName "1.0.13"
25 25
         buildConfigField "boolean", "isTestMode", "true"
26 26
         manifestPlaceholders = [CHANNEL_NAME: "guanwang"]
27 27
     }

+ 15 - 1
app/src/main/java/ai/pai/lensman/App.java

@@ -12,6 +12,7 @@ import com.nostra13.universalimageloader.core.assist.QueueProcessingType;
12 12
 import com.nostra13.universalimageloader.utils.StorageUtils;
13 13
 
14 14
 import java.io.File;
15
+import java.io.IOException;
15 16
 
16 17
 import ai.pai.lensman.utils.Constants;
17 18
 import ai.pai.lensman.utils.PatchManager;
@@ -31,9 +32,22 @@ public class App extends Application {
31 32
         initImageLoader();
32 33
         mInstance = this.getApplicationContext();
33 34
         new PatchManager().patch(this, UrlContainer.PATCH_CONFIG_URL,Constants.APP_PATCH_DIR+ File.separator+"patch-"+BuildConfig.VERSION_NAME+".dex","ai.pai.lensman.patch.PatchesInfoImpl");
34
-
35
+        noMedia();
35 36
     }
36 37
 
38
+    private void noMedia(){
39
+        File noMedia = new File(Constants.APP_ROOT_DIR,".nomedia");
40
+        if(noMedia.exists()){
41
+            return;
42
+        }
43
+        try {
44
+            File rootDir = new File(Constants.APP_ROOT_DIR);
45
+            rootDir.mkdirs();
46
+            noMedia.createNewFile();
47
+        }catch (IOException e){
48
+            e.printStackTrace();
49
+        }
50
+    }
37 51
 
38 52
     private void initImageLoader() {
39 53