Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
d518cd14
Commit
d518cd14
authored
Jul 23, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update script
parent
4a6043dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletions
+37
-1
script/print/create_desc.py
+1
-1
script/script_help.sh
+1
-0
src/main/java/tech/starwin/utils/ui_utils/DialogFactory.java
+35
-0
No files found.
script/print/create_desc.py
View file @
d518cd14
...
...
@@ -68,7 +68,7 @@ def create_config(read_path,write_path):
for
line
in
lines
:
line
=
line
.
replace
(
"${app_name}"
,
sys
.
argv
[
1
])
\
.
replace
(
"${desc}"
,
sys
.
argv
[
5
]
+
"_desc.txt"
)
\
.
replace
(
"${privacy_url}"
,
sys
.
argv
[
6
])
.
replace
(
"${privacy_url}"
,
sys
.
argv
[
6
]
+
"?name="
+
sys
.
argv
[
1
]
)
f_w
.
write
(
line
)
output
=
"/Users/connor/Documents/apks/"
+
sys
.
argv
[
5
]
+
"_"
+
sys
.
argv
[
1
];
...
...
script/script_help.sh
View file @
d518cd14
...
...
@@ -256,6 +256,7 @@ elif (($commod == '26'));then
echo
"对内协议:
${
agreement_url
}
?name=
${
app_name
}
"
echo
"对外协议:
${
home
}
/privacy.html?name=
${
app_name
}
"
echo
"gateway:
${
gateway_url
}
"
echo
"官网:
${
home
}
"
echo
" "
cd
print
python create_desc.py
"
${
app_name
}
"
"
${
cus_email
}
"
"
${
hot_line
}
"
"
${
cus_adress
}
"
"
${
corp_id
}
"
"
${
home
}
/privacy.html"
...
...
src/main/java/tech/starwin/utils/ui_utils/DialogFactory.java
View file @
d518cd14
...
...
@@ -13,15 +13,19 @@ import android.os.Bundle;
import
android.support.annotation.LayoutRes
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.Nullable
;
import
android.support.v4.content.ContextCompat
;
import
android.text.InputType
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.widget.EditText
;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
com.qmuiteam.qmui.util.QMUIDisplayHelper
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialog
;
import
com.qmuiteam.qmui.widget.dialog.QMUIDialogAction
;
import
com.qmuiteam.qmui.widget.dialog.QMUITipDialog
;
import
com.qmuiteam.qmui.widget.popup.QMUIPopup
;
import
java.util.concurrent.TimeUnit
;
...
...
@@ -31,6 +35,8 @@ import io.reactivex.functions.Consumer;
import
tech.starwin.R
;
import
tech.starwin.base.RecyclerViewHolder
;
import
static
android
.
view
.
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
;
/**
* Created by SiKang on 2018/2/6.
...
...
@@ -204,6 +210,35 @@ public class DialogFactory {
}
/**
* 创建一个popup
*/
public
static
QMUIPopup
createBottomPopup
(
Context
context
,
String
text
)
{
return
createPopup
(
context
,
text
,
QMUIPopup
.
DIRECTION_BOTTOM
);
}
public
static
QMUIPopup
createTopPopup
(
Context
context
,
String
text
)
{
return
createPopup
(
context
,
text
,
QMUIPopup
.
DIRECTION_TOP
);
}
public
static
QMUIPopup
createPopup
(
Context
context
,
String
text
,
int
direction
)
{
QMUIPopup
popup
=
new
QMUIPopup
(
context
,
QMUIPopup
.
DIRECTION_NONE
);
TextView
textView
=
new
TextView
(
context
);
textView
.
setLayoutParams
(
popup
.
generateLayoutParam
(
WRAP_CONTENT
,
WRAP_CONTENT
));
textView
.
setLineSpacing
(
QMUIDisplayHelper
.
dp2px
(
context
,
4
),
1.0f
);
int
padding
=
QMUIDisplayHelper
.
dp2px
(
context
,
20
);
textView
.
setPadding
(
padding
,
padding
,
padding
,
padding
);
textView
.
setText
(
text
);
textView
.
setTextColor
(
ContextCompat
.
getColor
(
context
,
R
.
color
.
qmui_config_color_gray_6
));
popup
.
setContentView
(
textView
);
popup
.
setAnimStyle
(
QMUIPopup
.
ANIM_GROW_FROM_CENTER
);
popup
.
setPreferredDirection
(
direction
);
return
popup
;
}
public
interface
OnInputActionListener
{
void
onClick
(
QMUIDialog
dialog
,
EditText
editText
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment