mWeakActivity;
15 |
16 | public SafeAsyncTask(Activity activity) {
17 | mWeakActivity = new WeakReference<>(activity);
18 | }
19 |
20 | @SafeVarargs
21 | @Override
22 | protected final Result doInBackground(Params... params) {
23 | return onRun(params);
24 | }
25 |
26 | @SafeVarargs
27 | @Override
28 | protected final void onProgressUpdate(Progress... values) {
29 | onProgress(values);
30 | }
31 |
32 | @Override
33 | protected final void onPostExecute(Result result) {
34 | if(canContinue()) {
35 | onSuccess(result);
36 | }
37 | }
38 |
39 | private boolean canContinue() {
40 | Activity activity = mWeakActivity.get();
41 | return activity != null && !activity.isFinishing();
42 | }
43 |
44 | @SuppressWarnings("unchecked")
45 | protected void onProgress(Progress... values) {}
46 |
47 | @SuppressWarnings("unchecked")
48 | protected abstract Result onRun(Params... params);
49 |
50 | @SuppressWarnings("unchecked")
51 | protected abstract void onSuccess(Result result);
52 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ms_square/android/design/overlay/util/ImageUtil.java:
--------------------------------------------------------------------------------
1 | package com.ms_square.android.design.overlay.util;
2 |
3 | import android.graphics.Bitmap;
4 | import android.graphics.BitmapFactory;
5 |
6 | import java.io.BufferedInputStream;
7 | import java.io.IOException;
8 | import java.io.InputStream;
9 |
10 | import timber.log.Timber;
11 |
12 | public class ImageUtil {
13 |
14 | public static int calculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight) {
15 |
16 | // Raw height and width of image
17 | final int height = options.outHeight;
18 | final int width = options.outWidth;
19 | int inSampleSize = 1;
20 |
21 | if (height > reqHeight || width > reqWidth) {
22 |
23 | final int halfHeight = height / 2;
24 | final int halfWidth = width / 2;
25 |
26 | // Calculate the largest inSampleSize value that is a power of 2 and keeps both
27 | // height and width larger than the requested height and width.
28 | while ((halfHeight / inSampleSize) > reqHeight
29 | && (halfWidth / inSampleSize) > reqWidth) {
30 | inSampleSize *= 2;
31 | }
32 | }
33 |
34 | return inSampleSize;
35 | }
36 |
37 | public static Bitmap decodeSampledBitmapFromStream(InputStream inputStream,
38 | int reqWidth, int reqHeight) {
39 | final BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream);
40 | bufferedInputStream.mark(Integer.MAX_VALUE);
41 |
42 | // First decode with inJustDecodeBounds = true to check dimensions
43 | final BitmapFactory.Options options = new BitmapFactory.Options();
44 | options.inJustDecodeBounds = true;
45 | BitmapFactory.decodeStream(bufferedInputStream, null, options);
46 |
47 | // Calculate inSampleSize
48 | options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight);
49 |
50 | try {
51 | bufferedInputStream.reset();
52 | } catch (IOException e) {
53 | Timber.w("Could not reposition the stream:" + e);
54 | }
55 |
56 | // Decode bitmap with inSampleSize set
57 | options.inJustDecodeBounds = false;
58 | return BitmapFactory.decodeStream(bufferedInputStream, null, options);
59 | }
60 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ms_square/android/design/overlay/util/PrefUtil.java:
--------------------------------------------------------------------------------
1 | package com.ms_square.android.design.overlay.util;
2 |
3 | import android.content.Context;
4 | import android.content.SharedPreferences;
5 | import android.net.Uri;
6 | import android.preference.PreferenceManager;
7 |
8 | import com.ms_square.android.util.DimenUtil;
9 |
10 | public class PrefUtil {
11 |
12 | public static final String PREF_FULLSCREEN = "pref_fullscreen";
13 |
14 | public static final String PREF_DESIGN_IMAGE_ENABLED = "pref_design_image_enabled";
15 |
16 | public static final String PREF_DESIGN_IMAGE_URI = "pref_design_image_uri";
17 |
18 | public static final String PREF_DESIGN_IMAGE_ALPHA = "pref_design_image_alpha";
19 |
20 | public static final String PREF_GRID_ENABLED = "pref_grid_enabled";
21 |
22 | public static final String PREF_ALIGN_RIGHT = "pref_align_right";
23 |
24 | public static final String PREF_ALIGN_BOTTOM = "pref_align_bottom";
25 |
26 | public static final String PREF_GRID_SIZE = "pref_grid_size";
27 |
28 | public static final String PREF_GRID_COLOR = "pref_grid_color";
29 |
30 | /** Long indicating when a preference was last updated */
31 | private static final String PREF_TIME_STAMP = "pref_time_stamp";
32 |
33 | public static boolean isFullScreen(Context context) {
34 | return getSharedPrefs(context).getBoolean(PREF_FULLSCREEN, false);
35 | }
36 |
37 | public static boolean isDesignImageEnabled(Context context) {
38 | return getSharedPrefs(context).getBoolean(PREF_DESIGN_IMAGE_ENABLED, true);
39 | }
40 |
41 | public static Uri getDesignImageUri(Context context) {
42 | String uriString = getSharedPrefs(context).getString(PREF_DESIGN_IMAGE_URI, null);
43 | if (uriString != null) {
44 | return Uri.parse(uriString);
45 | }
46 | return null;
47 | }
48 |
49 | public static void setDesignImageUri(Context context, Uri uri) {
50 | SharedPreferences.Editor editor = getEditor(context);
51 | if (uri != null) {
52 | editor.putString(PREF_DESIGN_IMAGE_URI, uri.toString());
53 | } else {
54 | editor.remove(PREF_DESIGN_IMAGE_URI);
55 | }
56 | apply(editor);
57 | }
58 |
59 | public static int getDesignImageAlpha(Context context) {
60 | return getSharedPrefs(context).getInt(PREF_DESIGN_IMAGE_ALPHA, 100);
61 | }
62 |
63 | public static boolean isGridEnabled(Context context) {
64 | return getSharedPrefs(context).getBoolean(PREF_GRID_ENABLED, true);
65 | }
66 |
67 | public static int getGridSize(Context context) {
68 | return (int) DimenUtil.convertToPixelFromDip(context,
69 | Float.parseFloat(getSharedPrefs(context).getString(PREF_GRID_SIZE, "4")));
70 | }
71 |
72 | public static boolean isAlignRight(Context context) {
73 | return getSharedPrefs(context).getBoolean(PREF_ALIGN_RIGHT, false);
74 | }
75 |
76 | public static boolean isAlignBottom(Context context) {
77 | return getSharedPrefs(context).getBoolean(PREF_ALIGN_BOTTOM, false);
78 | }
79 |
80 | public static int getGridColor(Context context) {
81 | return getSharedPrefs(context).getInt(PREF_GRID_COLOR, 0x7732cd32);
82 | }
83 |
84 | public static void registerOnSharedPreferenceChangeListener(Context context,
85 | SharedPreferences.OnSharedPreferenceChangeListener listener) {
86 | getSharedPrefs(context).registerOnSharedPreferenceChangeListener(listener);
87 | }
88 |
89 | public static void unregisterOnSharedPreferenceChangeListener(Context context,
90 | SharedPreferences.OnSharedPreferenceChangeListener listener) {
91 | getSharedPrefs(context).unregisterOnSharedPreferenceChangeListener(listener);
92 | }
93 |
94 | private static SharedPreferences getSharedPrefs(Context context) {
95 | return PreferenceManager.getDefaultSharedPreferences(context);
96 | }
97 |
98 | private static SharedPreferences.Editor getEditor(Context context) {
99 | return getSharedPrefs(context).edit();
100 | }
101 |
102 | // if you do not care about the result and calling from the main thread
103 | private static void apply(SharedPreferences.Editor editor) {
104 | editor.putLong(PREF_TIME_STAMP, getCurrentTime());
105 | editor.apply();
106 | }
107 |
108 | private static void commit(SharedPreferences.Editor editor) {
109 | editor.putLong(PREF_TIME_STAMP, getCurrentTime());
110 | editor.commit();
111 | }
112 |
113 | private static long getCurrentTime() {
114 | return System.currentTimeMillis();
115 | }
116 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ms_square/android/design/overlay/view/GridView.java:
--------------------------------------------------------------------------------
1 | package com.ms_square.android.design.overlay.view;
2 |
3 | import android.content.Context;
4 | import android.content.res.TypedArray;
5 | import android.graphics.Canvas;
6 | import android.graphics.Paint;
7 | import android.util.AttributeSet;
8 | import android.view.View;
9 |
10 | import com.ms_square.android.design.overlay.R;
11 | import com.ms_square.android.util.DimenUtil;
12 |
13 | import timber.log.Timber;
14 |
15 | public class GridView extends View {
16 |
17 | private final Paint mPaint = new Paint();
18 |
19 | private int mGridSize;
20 |
21 | private float[] mPoints;
22 | private boolean mAlignBottom;
23 | private boolean mAlignRight;
24 |
25 | public GridView(Context context) {
26 | this(context, null);
27 | }
28 |
29 | public GridView(Context context, AttributeSet attrs) {
30 | this(context, attrs, 0);
31 | }
32 |
33 | public GridView(Context context, AttributeSet attrs, int defStyleAttr) {
34 | super(context, attrs, defStyleAttr);
35 |
36 | final float defaultLineWidth = DimenUtil.convertToPixelFromDip(context, 1f); // 1dp
37 |
38 | TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.GridView);
39 | mPaint.setColor(typedArray.getColor(R.styleable.GridView_lineColor, 0x7732cd32));
40 | mPaint.setStrokeWidth(typedArray.getDimension(R.styleable.GridView_lineWidth, defaultLineWidth));
41 | typedArray.recycle();
42 |
43 | mPaint.setStyle(Paint.Style.STROKE);
44 | }
45 |
46 | /**
47 | *
48 | * @param newGridSize - in pixels
49 | */
50 | public void updateGridSize(int newGridSize, boolean alignRight, boolean alignBottom) {
51 | mGridSize = newGridSize;
52 | mAlignRight = alignRight;
53 | mAlignBottom = alignBottom;
54 |
55 | updateGrid(getWidth(), getHeight());
56 | invalidate();
57 | }
58 |
59 | public void updateGridColor(int newColor) {
60 | mPaint.setColor(newColor);
61 | invalidate();
62 | }
63 |
64 | private void updateGrid(int width, int height) {
65 | int numHorizontalLines = height / mGridSize;
66 | int numVerticalLines = width / mGridSize;
67 |
68 | int numHorizontalPoints = numHorizontalLines > 0 ? (numHorizontalLines + 1) * 4 : 0;
69 | int numVerticalPoints = numVerticalLines > 0 ? (numVerticalLines + 1) * 4 : 0;
70 |
71 | if (numHorizontalPoints + numVerticalPoints > 0) {
72 | mPoints = new float[numHorizontalPoints + numVerticalPoints];
73 |
74 | int positionShift = 0;
75 | if (mAlignBottom) {
76 | positionShift = - (mGridSize - height % mGridSize);
77 | }
78 |
79 | // set up horizontal lines
80 | float gap = mGridSize;
81 | for (int i = 0; i <= numHorizontalLines; i++) {
82 | int base = i * 4;
83 | mPoints[base] = 0f;
84 | mPoints[base + 1] = gap + positionShift;
85 | mPoints[base + 2] = (float) width;
86 | mPoints[base + 3] = gap + positionShift;
87 | gap = gap + mGridSize;
88 | }
89 |
90 | positionShift = 0;
91 | if (mAlignRight) {
92 | positionShift = - (mGridSize - width % mGridSize);
93 | }
94 |
95 | // set up vertical lines
96 | gap = mGridSize;
97 | for (int i = 0; i <= numVerticalLines; i++) {
98 | int base = i * 4 + numHorizontalPoints;
99 | mPoints[base] = gap + positionShift;
100 | mPoints[base + 1] = 0f;
101 | mPoints[base + 2] = gap + positionShift;
102 | mPoints[base + 3] = (float) height;
103 | gap = gap + mGridSize;
104 | }
105 | } else {
106 | mPoints = null;
107 | }
108 | }
109 |
110 | @Override
111 | protected void onSizeChanged(int w, int h, int oldw, int oldh) {
112 | super.onSizeChanged(w, h, oldw, oldh);
113 | Timber.d("SizeChanged: %d, %d, %d, %d", w, h, oldw, oldh);
114 | updateGrid(w, h);
115 | }
116 |
117 | @Override
118 | public void onDraw(Canvas canvas) {
119 | if (mPoints != null) {
120 | canvas.drawLines(mPoints, mPaint);
121 | }
122 | }
123 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ms_square/android/design/overlay/view/ImagePreference.java:
--------------------------------------------------------------------------------
1 | package com.ms_square.android.design.overlay.view;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.preference.Preference;
6 | import android.util.AttributeSet;
7 | import android.view.View;
8 | import android.widget.ImageView;
9 |
10 | import com.ms_square.android.design.overlay.R;
11 |
12 | public class ImagePreference extends Preference {
13 |
14 | private ImageView mImageView;
15 |
16 | private Bitmap mBitmap;
17 |
18 | // this is the one used when inflating preference from XML
19 | public ImagePreference(Context context, AttributeSet attrs) {
20 | super(context, attrs);
21 | }
22 |
23 | @Override
24 | protected void onBindView(View view) {
25 | super.onBindView(view);
26 | mImageView = (ImageView) view.findViewById(R.id.image_view);
27 | mImageView.setImageBitmap(mBitmap);
28 | }
29 |
30 | public void updateImage(Bitmap bitmap) {
31 | // onBindView might not have been called
32 | if (mImageView != null) {
33 | mImageView.setImageBitmap(bitmap);
34 | }
35 | mBitmap = bitmap;
36 | }
37 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/ms_square/android/design/overlay/view/SeekBarPreference.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.ms_square.android.design.overlay.view;
18 |
19 | import android.content.Context;
20 | import android.content.res.TypedArray;
21 | import android.os.Parcel;
22 | import android.os.Parcelable;
23 | import android.preference.Preference;
24 | import android.util.AttributeSet;
25 | import android.view.View;
26 | import android.widget.SeekBar;
27 | import android.widget.SeekBar.OnSeekBarChangeListener;
28 |
29 | import com.ms_square.android.design.overlay.R;
30 |
31 | public class SeekBarPreference extends Preference
32 | implements OnSeekBarChangeListener {
33 |
34 | private static final int SEEK_MAX = 230;
35 |
36 | private int mProgress;
37 | private int mMax;
38 | private boolean mTrackingTouch;
39 |
40 | public SeekBarPreference(Context context, AttributeSet attrs) {
41 | super(context, attrs);
42 |
43 | setLayoutResource(R.layout.pref_layout_seekbar);
44 |
45 | setProgress(getPersistedInt(100));
46 | setMax(SEEK_MAX);
47 | }
48 |
49 | @Override
50 | protected void onBindView(View view) {
51 | super.onBindView(view);
52 | SeekBar seekBar = (SeekBar) view.findViewById(R.id.seekbar);
53 | seekBar.setOnSeekBarChangeListener(this);
54 | seekBar.setMax(mMax);
55 | seekBar.setProgress(mProgress);
56 | seekBar.setEnabled(isEnabled());
57 | }
58 |
59 | @Override
60 | public CharSequence getSummary() {
61 | return null;
62 | }
63 |
64 | @Override
65 | protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {
66 | setProgress(restoreValue ? getPersistedInt(mProgress)
67 | : (Integer) defaultValue);
68 | }
69 |
70 | @Override
71 | protected Object onGetDefaultValue(TypedArray a, int index) {
72 | return a.getInt(index, 0);
73 | }
74 |
75 | public void setMax(int max) {
76 | if (max != mMax) {
77 | mMax = max;
78 | notifyChanged();
79 | }
80 | }
81 |
82 | public void setProgress(int progress) {
83 | setProgress(progress, true);
84 | }
85 |
86 | private void setProgress(int progress, boolean notifyChanged) {
87 | if (progress > mMax) {
88 | progress = mMax;
89 | }
90 | if (progress < 0) {
91 | progress = 0;
92 | }
93 | if (progress != mProgress) {
94 | mProgress = progress;
95 | persistInt(progress);
96 | if (notifyChanged) {
97 | notifyChanged();
98 | }
99 | }
100 | }
101 |
102 | public int getProgress() {
103 | return mProgress;
104 | }
105 |
106 | /**
107 | * Persist the seekBar's progress value if callChangeListener
108 | * returns true, otherwise set the seekBar's progress to the stored value
109 | */
110 | void syncProgress(SeekBar seekBar) {
111 | int progress = seekBar.getProgress();
112 | if (progress != mProgress) {
113 | if (callChangeListener(progress)) {
114 | setProgress(progress, false);
115 | } else {
116 | seekBar.setProgress(mProgress);
117 | }
118 | }
119 | }
120 |
121 | @Override
122 | public void onProgressChanged(
123 | SeekBar seekBar, int progress, boolean fromUser) {
124 | if (fromUser && !mTrackingTouch) {
125 | syncProgress(seekBar);
126 | }
127 | }
128 |
129 | @Override
130 | public void onStartTrackingTouch(SeekBar seekBar) {
131 | mTrackingTouch = true;
132 | }
133 |
134 | @Override
135 | public void onStopTrackingTouch(SeekBar seekBar) {
136 | mTrackingTouch = false;
137 | if (seekBar.getProgress() != mProgress) {
138 | syncProgress(seekBar);
139 | }
140 | }
141 |
142 | @Override
143 | protected Parcelable onSaveInstanceState() {
144 | /*
145 | * Suppose a client uses this preference type without persisting. We
146 | * must save the instance state so it is able to, for example, survive
147 | * orientation changes.
148 | */
149 |
150 | final Parcelable superState = super.onSaveInstanceState();
151 | if (isPersistent()) {
152 | // No need to save instance state since it's persistent
153 | return superState;
154 | }
155 |
156 | // Save the instance state
157 | final SavedState myState = new SavedState(superState);
158 | myState.progress = mProgress;
159 | myState.max = mMax;
160 | return myState;
161 | }
162 |
163 | @Override
164 | protected void onRestoreInstanceState(Parcelable state) {
165 | if (!state.getClass().equals(SavedState.class)) {
166 | // Didn't save state for us in onSaveInstanceState
167 | super.onRestoreInstanceState(state);
168 | return;
169 | }
170 |
171 | // Restore the instance state
172 | SavedState myState = (SavedState) state;
173 | super.onRestoreInstanceState(myState.getSuperState());
174 | mProgress = myState.progress;
175 | mMax = myState.max;
176 | notifyChanged();
177 | }
178 |
179 | /**
180 | * SavedState, a subclass of {@link BaseSavedState}, will store the state
181 | * of MyPreference, a subclass of Preference.
182 | *
183 | * It is important to always call through to super methods.
184 | */
185 | private static class SavedState extends BaseSavedState {
186 | int progress;
187 | int max;
188 |
189 | public SavedState(Parcel source) {
190 | super(source);
191 |
192 | // Restore the click counter
193 | progress = source.readInt();
194 | max = source.readInt();
195 | }
196 |
197 | @Override
198 | public void writeToParcel(Parcel dest, int flags) {
199 | super.writeToParcel(dest, flags);
200 |
201 | // Save the click counter
202 | dest.writeInt(progress);
203 | dest.writeInt(max);
204 | }
205 |
206 | public SavedState(Parcelable superState) {
207 | super(superState);
208 | }
209 |
210 | @SuppressWarnings("unused")
211 | public static final Parcelable.Creator CREATOR =
212 | new Parcelable.Creator() {
213 | public SavedState createFromParcel(Parcel in) {
214 | return new SavedState(in);
215 | }
216 |
217 | public SavedState[] newArray(int size) {
218 | return new SavedState[size];
219 | }
220 | };
221 | }
222 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_action_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manabu-GT/DesignOverlay-Android/43e7171395b2ca48d03120bc56a7e32206512bea/app/src/main/res/drawable-xhdpi/ic_action_clear.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manabu-GT/DesignOverlay-Android/43e7171395b2ca48d03120bc56a7e32206512bea/app/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xhdpi/ic_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manabu-GT/DesignOverlay-Android/43e7171395b2ca48d03120bc56a7e32206512bea/app/src/main/res/drawable-xhdpi/ic_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_action_clear.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manabu-GT/DesignOverlay-Android/43e7171395b2ca48d03120bc56a7e32206512bea/app/src/main/res/drawable-xxhdpi/ic_action_clear.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manabu-GT/DesignOverlay-Android/43e7171395b2ca48d03120bc56a7e32206512bea/app/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxhdpi/ic_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manabu-GT/DesignOverlay-Android/43e7171395b2ca48d03120bc56a7e32206512bea/app/src/main/res/drawable-xxhdpi/ic_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manabu-GT/DesignOverlay-Android/43e7171395b2ca48d03120bc56a7e32206512bea/app/src/main/res/drawable-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable-xxxhdpi/ic_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manabu-GT/DesignOverlay-Android/43e7171395b2ca48d03120bc56a7e32206512bea/app/src/main/res/drawable-xxxhdpi/ic_notification.png
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
26 |
33 |
40 |
41 |
42 |
47 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/pref_layout_seekbar.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
24 |
25 |
31 |
32 |
38 |
39 |
40 |
50 |
51 |
60 |
61 |
71 |
72 |
73 |
83 |
84 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/pref_widget_layout_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/service_design_overlay.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
10 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/values-ja/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DesignOverlay
5 |
6 | DesignOverlay
7 | タップするとアプリの設定画面に遷移します
8 | タップするとアプリの設定画面に遷移します
9 | 終了
10 |
11 | デザイン
12 | グリッド線
13 | このアプリについて
14 |
15 | 全画面表示
16 |
17 | 表示
18 | 画像
19 | オーバーレイ表示する画像を選択
20 | 透明度
21 | 透明度: %1$s %
22 |
23 | 表示
24 | サイズ
25 | サイズ: %1$s dp
26 |
27 | 右に揃える
28 | 下に揃える
29 |
30 | 色
31 | グリッド線の色を選択
32 |
33 | 作者
34 | Manabu
35 |
36 | バージョン
37 |
38 | オーバーレイ表示する画像を選択してください
39 |
40 | エラー!画像が取得できませんでした。
41 | このアプリはデザイン画像やグリッド線をAndroidのシステムレイヤ上にオーバーレイ表示することで、開発者がデザインイメージにアプリのレイアウトを合わせる作業を助けてくれます
42 |
--------------------------------------------------------------------------------
/app/src/main/res/values-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 72dp
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values-large/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 56dp
5 |
--------------------------------------------------------------------------------
/app/src/main/res/values-sw720dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | 56dp
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | - 4dp
5 | - 8dp
6 | - 16dp
7 | - 32dp
8 |
9 |
10 | - 4
11 | - 8
12 | - 16
13 | - 32
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #2c363f
5 | #000000
6 |
7 | #7732cd32
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 | 0dp
7 |
8 | 48dp
9 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | DesignOverlay
5 | DesignOverlay will show design and grid overlay over application windows to help you verify your application layout and design.
6 |
7 | DesignOverlay
8 | Touch for Settings
9 | Touch for Settings
10 | Dismiss
11 |
12 | Design
13 | Grid
14 | About
15 |
16 | FullScreen
17 |
18 | Enabled
19 | Image
20 | Choose a design image to overlay
21 | Alpha
22 | Alpha: %1$s %
23 |
24 | Enabled
25 | Size
26 | Size: %1$s dp
27 | Align right
28 | Align bottom
29 | Color
30 | Choose grid line color
31 |
32 | Author
33 | Manabu
34 |
35 | Version
36 |
37 | Choose an image to overlay
38 |
39 | Error! Could not retrieve image.
40 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/values/template-dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 | 16dp
9 | 16dp
10 |
11 |
12 | 24dp
13 |
14 |
15 | 8dp
16 | 20sp
17 |
18 |
22 | 304dp
23 |
24 |
25 | 56dp
26 | 8dp
27 | 9dp
28 |
29 |
30 | 12sp
31 | 14sp
32 | 16sp
33 | 20sp
34 | 34sp
35 |
36 |
37 |
38 |
39 | 48dp
40 | 56dp
41 | 16dp
42 | 8dp
43 | 72dp
44 |
45 |
46 | 24dp
47 | 16dp
48 |
49 |
50 | 2dp
51 | 8dp
52 | 8dp
53 | 16dp
54 | 6dp
55 | 2dp
56 |
57 |
58 | 1dp
59 |
60 |
61 | 4dp
62 | 4dp
63 | 8dp
64 | 8dp
65 | 16dp
66 | 16dp
67 | 24dp
68 | 24dp
69 |
70 | 4dp
71 | 4dp
72 | 8dp
73 | 8dp
74 | 16dp
75 | 16dp
76 | 24dp
77 | 24dp
78 |
79 | 6dp
80 |
81 |
--------------------------------------------------------------------------------
/app/src/main/res/xml/preferences.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
16 |
20 |
21 |
22 |
26 |
32 |
36 |
40 |
46 |
47 |
48 |
51 |
53 |
54 |
59 |
60 |
--------------------------------------------------------------------------------
/appium/README.md:
--------------------------------------------------------------------------------
1 | # DesignOverlay UI Test
2 |
3 | ## Set up
4 |
5 | Install sauce labs client library:
6 |
7 | ```shell
8 | pip install sauceclient
9 | ```
10 |
11 | Install appium client library:
12 |
13 | ```shell
14 | pip install Appium-Python-Client
15 | pip install pytest
16 | ```
17 |
18 | ## how to run (SauceLabs)
19 | For configuration, look at the config_sauce_labs.json.
20 |
21 | ```shell
22 | ./gradlew sauceLabsDebug
23 | ```
--------------------------------------------------------------------------------
/appium/android_sauce_labs.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | """
5 |
6 | Author : Manabu Shimobe
7 |
8 | """
9 | __author__ = "Manabu Shimobe"
10 |
11 | from appium import webdriver
12 | from appium import SauceTestCase, on_platforms
13 |
14 | from time import sleep
15 | from logging import getLogger, StreamHandler, Formatter, DEBUG
16 | from os import environ
17 | import json
18 |
19 | # load default platform configurations
20 | json_file = open('appium/config_sauce_labs.json')
21 | platforms = json.load(json_file)
22 | for platform in platforms:
23 | platform['app'] = "sauce-storage:%s" % environ.get('SAUCE_APK_FILE')
24 | platform['customData'] = {'commit': environ.get('TRAVIS_COMMIT', environ.get('SAUCE_COMMIT')),
25 | 'versionName': environ.get('SAUCE_APK_VERSION_NAME'),
26 | 'versionCode': environ.get('SAUCE_APK_VERSION_CODE')}
27 | platform['build'] = "build-%s" % environ.get('TRAVIS_BUILD_NUMBER', 'local')
28 | json_file.close()
29 |
30 | # set up logger
31 | logger = getLogger(__name__)
32 | logger.setLevel(DEBUG)
33 | handler = StreamHandler()
34 | handler.setFormatter(Formatter('%(asctime)s- %(name)s - %(levelname)s - %(message)s'))
35 | handler.setLevel(DEBUG)
36 | logger.addHandler(handler)
37 |
38 | # the emulator is sometimes slow
39 | SLEEP_TIME = 1
40 |
41 | @on_platforms(platforms)
42 | class SimpleAndroidSauceTests(SauceTestCase):
43 |
44 | def test_settings(self):
45 | sleep(SLEEP_TIME)
46 |
47 | # Check if successfully started SettingsActivity
48 | self.assertEqual('.activity.SettingsActivity_', self.driver.current_activity)
49 |
50 | el_switch = self.driver.find_element_by_accessibility_id('Grid Switch')
51 | self.assertIsNotNone(el_switch)
52 |
53 | # Grid should be shown now
54 | el_switch.click()
55 | logger.info('Clicked Grid Switch')
56 |
57 | sleep(SLEEP_TIME)
--------------------------------------------------------------------------------
/appium/config_sauce_labs.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "platformName":"Android",
4 | "platformVersion":"4.2",
5 | "deviceName":"Android Emulator",
6 | "appPackage":"com.ms_square.android.design.overlay",
7 | "appActivity":".activity.SettingsActivity_",
8 | "appiumVersion":"1.3.6"
9 | },
10 | {
11 | "platformName":"Android",
12 | "platformVersion":"4.3",
13 | "deviceName":"Android Emulator",
14 | "appPackage":"com.ms_square.android.design.overlay",
15 | "appActivity":".activity.SettingsActivity_",
16 | "appiumVersion":"1.3.6"
17 | },
18 | {
19 | "platformName":"Android",
20 | "platformVersion":"4.4",
21 | "deviceName":"Android Emulator",
22 | "appPackage":"com.ms_square.android.design.overlay",
23 | "appActivity":".activity.SettingsActivity_",
24 | "appiumVersion":"1.3.6"
25 | },
26 | {
27 | "platformName":"Android",
28 | "platformVersion":"5.0",
29 | "deviceName":"Android Emulator",
30 | "appPackage":"com.ms_square.android.design.overlay",
31 | "appActivity":".activity.SettingsActivity_",
32 | "appiumVersion":"1.3.6"
33 | }
34 | ]
--------------------------------------------------------------------------------
/art/app_screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manabu-GT/DesignOverlay-Android/43e7171395b2ca48d03120bc56a7e32206512bea/art/app_screenshot.png
--------------------------------------------------------------------------------
/art/screenshot_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manabu-GT/DesignOverlay-Android/43e7171395b2ca48d03120bc56a7e32206512bea/art/screenshot_1.png
--------------------------------------------------------------------------------
/art/screenshot_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manabu-GT/DesignOverlay-Android/43e7171395b2ca48d03120bc56a7e32206512bea/art/screenshot_2.png
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:1.1.0'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4+'
13 |
14 | classpath 'com.ms-square:saucelabs-gradle-plugin:1.0.0'
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | jcenter()
21 | }
22 | }
23 |
24 | // http://www.gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html
25 | project.ext {
26 | ANDROID_BUILD_SDK_VERSION = 22
27 | ANDROID_BUILD_TOOLS_VERSION = "22.0.1"
28 |
29 | ANDROID_BUILD_MIN_SDK_VERSION = 14
30 | ANDROID_BUILD_TARGET_SDK_VERSION = 22
31 |
32 | // Google Stuffs
33 | supportPackageVersion = "22.0.0"
34 |
35 | // APT plugin and Android Annotations
36 | daggerVersion = "1.2.1"
37 | androidAnnotationsVersion = "3.2"
38 |
39 | // EventBus
40 | eventBusVersion = "2.4.0"
41 |
42 | // Timber
43 | timberVersion = "2.5.1"
44 |
45 | androidUtilVersion = "0.1.1"
46 |
47 | // http://tools.android.com/tech-docs/new-build-system/tips
48 | preDexLibs = !project.hasProperty('disablePreDex')
49 | }
50 |
51 | task wrapper(type: Wrapper) {
52 | gradleVersion = '2.21'
53 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Manabu-GT/DesignOverlay-Android/43e7171395b2ca48d03120bc56a7e32206512bea/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Apr 10 15:27:10 PDT 2013
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-2.2.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # For Cygwin, ensure paths are in UNIX format before anything is touched.
46 | if $cygwin ; then
47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
48 | fi
49 |
50 | # Attempt to set APP_HOME
51 | # Resolve links: $0 may be a link
52 | PRG="$0"
53 | # Need this for relative symlinks.
54 | while [ -h "$PRG" ] ; do
55 | ls=`ls -ld "$PRG"`
56 | link=`expr "$ls" : '.*-> \(.*\)$'`
57 | if expr "$link" : '/.*' > /dev/null; then
58 | PRG="$link"
59 | else
60 | PRG=`dirname "$PRG"`"/$link"
61 | fi
62 | done
63 | SAVED="`pwd`"
64 | cd "`dirname \"$PRG\"`/" >&-
65 | APP_HOME="`pwd -P`"
66 | cd "$SAVED" >&-
67 |
68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
69 |
70 | # Determine the Java command to use to start the JVM.
71 | if [ -n "$JAVA_HOME" ] ; then
72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
73 | # IBM's JDK on AIX uses strange locations for the executables
74 | JAVACMD="$JAVA_HOME/jre/sh/java"
75 | else
76 | JAVACMD="$JAVA_HOME/bin/java"
77 | fi
78 | if [ ! -x "$JAVACMD" ] ; then
79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
80 |
81 | Please set the JAVA_HOME variable in your environment to match the
82 | location of your Java installation."
83 | fi
84 | else
85 | JAVACMD="java"
86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
87 |
88 | Please set the JAVA_HOME variable in your environment to match the
89 | location of your Java installation."
90 | fi
91 |
92 | # Increase the maximum file descriptors if we can.
93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
94 | MAX_FD_LIMIT=`ulimit -H -n`
95 | if [ $? -eq 0 ] ; then
96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
97 | MAX_FD="$MAX_FD_LIMIT"
98 | fi
99 | ulimit -n $MAX_FD
100 | if [ $? -ne 0 ] ; then
101 | warn "Could not set maximum file descriptor limit: $MAX_FD"
102 | fi
103 | else
104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
105 | fi
106 | fi
107 |
108 | # For Darwin, add options to specify how the application appears in the dock
109 | if $darwin; then
110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
111 | fi
112 |
113 | # For Cygwin, switch paths to Windows format before running java
114 | if $cygwin ; then
115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
158 | function splitJvmOpts() {
159 | JVM_OPTS=("$@")
160 | }
161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
163 |
164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
165 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | # requirements.txt for pip install
2 | sauceclient
3 | Appium-Python-Client
4 | pytest
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':ColorPickerPreference'
2 | project(':ColorPickerPreference').projectDir = new File('app/libs/android-ColorPickerPreference/ColorPickerPreference')
--------------------------------------------------------------------------------