Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
Widget
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Android Widget
Widget
Commits
e39c45b3
Commit
e39c45b3
authored
Nov 06, 2019
by
王韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[new] 优化pop base
parent
99653783
Changes
32
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
2254 additions
and
42 deletions
+2254
-42
build.gradle
app/build.gradle
+2
-0
CommomPopActivity.kt
...c/main/java/com/qimai/android/widget/CommomPopActivity.kt
+43
-19
MainActivity.kt
app/src/main/java/com/qimai/android/widget/MainActivity.kt
+15
-1
TestWindow.kt
app/src/main/java/com/qimai/android/widget/TestWindow.kt
+36
-0
build.gradle
build.gradle
+1
-0
.gitignore
fragmentcontroller/.gitignore
+1
-0
build.gradle
fragmentcontroller/build.gradle
+41
-0
consumer-rules.pro
fragmentcontroller/consumer-rules.pro
+0
-0
complete_android_fragment_lifecycle.png
...entcontroller/img/complete_android_fragment_lifecycle.png
+0
-0
proguard-rules.pro
fragmentcontroller/proguard-rules.pro
+21
-0
ExampleInstrumentedTest.java
...i/android/fragmentcontroller/ExampleInstrumentedTest.java
+27
-0
AndroidManifest.xml
fragmentcontroller/src/main/AndroidManifest.xml
+2
-0
LifeFragment.kt
.../java/com/qmai/android/fragmentcontroller/LifeFragment.kt
+40
-0
strings.xml
fragmentcontroller/src/main/res/values/strings.xml
+3
-0
ExampleUnitTest.java
.../com/qmai/android/fragmentcontroller/ExampleUnitTest.java
+17
-0
settings.gradle
settings.gradle
+1
-1
build.gradle
tools/build.gradle
+1
-1
TimeFormat.kt
tools/src/main/java/com/qimai/android/tools/TimeFormat.kt
+34
-0
Pop.MD
widgetlib/Pop.MD
+25
-0
build.gradle
widgetlib/build.gradle
+3
-1
SpanUtils.java
...etlib/src/main/java/com/qimai/android/span/SpanUtils.java
+1414
-0
SectionItemView.java
...ain/java/com/qimai/android/widgetlib/SectionItemView.java
+60
-0
AbsQMBasePopup.kt
.../java/com/qimai/android/widgetlib/popup/AbsQMBasePopup.kt
+172
-0
CommonPopWindow.kt
...java/com/qimai/android/widgetlib/popup/CommonPopWindow.kt
+21
-7
Loading.kt
...rc/main/java/com/qimai/android/widgetlib/popup/Loading.kt
+39
-0
QMBasePopup.kt
...ain/java/com/qimai/android/widgetlib/popup/QMBasePopup.kt
+1
-1
QmAlertDialog.kt
...n/java/com/qimai/android/widgetlib/popup/QmAlertDialog.kt
+27
-11
HolderContext.java
...java/com/qimai/android/widgetlib/toast/HolderContext.java
+38
-0
ToastUtils.java
...in/java/com/qimai/android/widgetlib/toast/ToastUtils.java
+125
-0
loading.xml
widgetlib/src/main/res/layout/loading.xml
+29
-0
section_itemview.xml
widgetlib/src/main/res/layout/section_itemview.xml
+7
-0
attrs.xml
widgetlib/src/main/res/values/attrs.xml
+8
-0
No files found.
app/build.gradle
View file @
e39c45b3
...
@@ -35,4 +35,6 @@ dependencies {
...
@@ -35,4 +35,6 @@ dependencies {
// implementation 'com.qmai.android.sdk:widgetlib:1.1.2-SNAPSHOT'
// implementation 'com.qmai.android.sdk:widgetlib:1.1.2-SNAPSHOT'
implementation
project
(
path:
':tools'
)
implementation
project
(
path:
':tools'
)
implementation
'androidx.recyclerview:recyclerview:1.0.0'
implementation
'androidx.recyclerview:recyclerview:1.0.0'
}
}
app/src/main/java/com/qimai/android/widget/CommomPopActivity.kt
View file @
e39c45b3
...
@@ -4,10 +4,13 @@ import android.os.Bundle
...
@@ -4,10 +4,13 @@ import android.os.Bundle
import
android.widget.Button
import
android.widget.Button
import
android.widget.Toast
import
android.widget.Toast
import
androidx.appcompat.app.AppCompatActivity
import
androidx.appcompat.app.AppCompatActivity
import
com.qimai.android.tools.V
import
com.qimai.android.widgetlib.popup.CommonPopWindow
import
com.qimai.android.widgetlib.popup.QmAlertDialog
import
com.qimai.android.widgetlib.popup.QmAlertDialog
class
CommomPopActivity
:
AppCompatActivity
()
{
class
CommomPopActivity
:
AppCompatActivity
()
{
var
dialog
:
QmAlertDialog
?
=
null
var
i
=
0L
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_commom_pop
)
setContentView
(
R
.
layout
.
activity_commom_pop
)
...
@@ -26,9 +29,20 @@ class CommomPopActivity : AppCompatActivity() {
...
@@ -26,9 +29,20 @@ class CommomPopActivity : AppCompatActivity() {
// .build()
// .build()
// commonPopWindow.show(findViewById(R.id.root))
// commonPopWindow.show(findViewById(R.id.root))
// commonPopWindow.dimBehind(0.5f)
// commonPopWindow.dimBehind(0.5f)
//
i
=
System
.
currentTimeMillis
()
"$i"
.
V
()
// i.hashCode().toString().V()
if
(
dialog
==
null
)
{
val
right
:
(
CommonPopWindow
:
CommonPopWindow
)
->
Unit
=
{
Toast
.
makeText
(
this
,
"确定"
,
Toast
.
LENGTH_SHORT
).
show
()
it
.
dismiss
()
"$i"
.
V
()
// "---------${i.hashCode()}".V()
QmAlertDialog
}
dialog
=
QmAlertDialog
.
Builder
()
.
Builder
()
.
withContext
(
this
)
.
withContext
(
this
)
.
withLeftButton
(
leftButtonText
=
"取消"
,
clickListener
=
{
.
withLeftButton
(
leftButtonText
=
"取消"
,
clickListener
=
{
...
@@ -36,20 +50,30 @@ class CommomPopActivity : AppCompatActivity() {
...
@@ -36,20 +50,30 @@ class CommomPopActivity : AppCompatActivity() {
it
.
dismiss
()
it
.
dismiss
()
})
})
.
withRightButton
(
rightButtonText
=
"确定"
,
clickListener
=
{
.
withRightButton
(
rightButtonText
=
"确定"
,
clickListener
=
right
).
withRootView
(
Toast
.
makeText
(
this
,
"确定"
,
Toast
.
LENGTH_SHORT
).
show
()
it
.
dismiss
()
}).
withRootView
(
findViewById
(
R
.
id
.
root
)
findViewById
(
R
.
id
.
root
)
)
)
.
withTitle
(
"订单1111"
)
.
withTitle
(
"订单1111"
)
.
withSubTitle
(
"子标题"
)
.
withSubTitle
(
"子标题"
)
.
withWidth
(
400
)
.
build
()
.
build
()
.
show
()
}
dialog
?.
show
()
}
}
}
}
fun
test
(
b
:
Int
):
()
->
Int
{
var
a
=
3
return
fun
():
Int
{
a
++
return
a
+
b
}
}
}
}
app/src/main/java/com/qimai/android/widget/MainActivity.kt
View file @
e39c45b3
...
@@ -4,15 +4,29 @@ import android.content.Intent
...
@@ -4,15 +4,29 @@ import android.content.Intent
import
android.os.Bundle
import
android.os.Bundle
import
android.widget.Button
import
android.widget.Button
import
androidx.appcompat.app.AppCompatActivity
import
androidx.appcompat.app.AppCompatActivity
import
com.qimai.android.widgetlib.toast.HolderContext
class
MainActivity
:
AppCompatActivity
()
{
class
MainActivity
:
AppCompatActivity
()
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
activity_main
)
setContentView
(
R
.
layout
.
activity_main
)
HolderContext
.
getInstance
().
register
{
MainActivity
@
this
}
findViewById
<
Button
>(
R
.
id
.
commonPop
).
setOnClickListener
{
findViewById
<
Button
>(
R
.
id
.
commonPop
).
setOnClickListener
{
startActivity
(
Intent
(
MainActivity
@
this
,
CommomPopActivity
::
class
.
java
))
// ToastUtils.getInstance().showCenter("测试测试")
// ToastUtils.getInstance().setMsgColor(Color.RED).showTaost("测试出的的")
//
//// startActivity(Intent(MainActivity@ this, CommomPopActivity::class.java))
//// val loding = Loading()
//// loding.isCancelable =false
//// loding.show(supportFragmentManager, "loading")
TestWindow
(
this
,
findViewById
<
Button
>(
R
.
id
.
commonPop
)).
build
().
show
()
}
}
findViewById
<
Button
>(
R
.
id
.
tip
).
setOnClickListener
{
findViewById
<
Button
>(
R
.
id
.
tip
).
setOnClickListener
{
...
...
app/src/main/java/com/qimai/android/widget/TestWindow.kt
0 → 100644
View file @
e39c45b3
package
com.qimai.android.widget
import
android.content.Context
import
android.graphics.Point
import
android.view.Gravity
import
android.view.LayoutInflater
import
android.view.View
import
com.qimai.android.tools.dpTopx
import
com.qimai.android.tools.getScreenWidth
import
com.qimai.android.widgetlib.popup.AbsQMBasePopup
/**
* created by wangwei ON 2019-11-06 email:wangwei_5521@163.com
* @version 1.1.1
* @Description
**/
class
TestWindow
constructor
(
var
ctx
:
Context
,
var
anchor
:
View
)
:
AbsQMBasePopup
(
ctx
)
{
override
fun
onShowEnd
()
{
dimBehind
(
0.5f
)
}
override
fun
config
():
WindowConfig
{
return
AbsQMBasePopup
.
WindowConfig
().
apply
{
mContentView
=
LayoutInflater
.
from
(
ctx
).
inflate
(
R
.
layout
.
qm_alert_content
,
null
)
mAnchorView
=
anchor
mWindowWidth
=
getScreenWidth
(
ctx
)
-
ctx
.
dpTopx
(
30.0f
)
mGravity
=
Gravity
.
CENTER
}
}
override
fun
onShowBegin
(
contentView
:
View
):
Point
{
return
Point
(
0
,
0
)
}
}
\ No newline at end of file
build.gradle
View file @
e39c45b3
// Top-level build file where you can add configuration options common to all sub-projects/modules.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript
{
buildscript
{
ext
.
kotlin_version
=
'1.3.50'
ext
.
kotlin_version
=
'1.3.41'
ext
.
kotlin_version
=
'1.3.41'
repositories
{
repositories
{
maven
{
url
'http://maven.aliyun.com/nexus/content/groups/public/'
}
// 阿里云镜像
maven
{
url
'http://maven.aliyun.com/nexus/content/groups/public/'
}
// 阿里云镜像
...
...
fragmentcontroller/.gitignore
0 → 100644
View file @
e39c45b3
/build
fragmentcontroller/build.gradle
0 → 100644
View file @
e39c45b3
apply
plugin:
'com.android.library'
apply
plugin:
'kotlin-android-extensions'
apply
plugin:
'kotlin-android'
android
{
compileSdkVersion
29
buildToolsVersion
"29.0.2"
defaultConfig
{
minSdkVersion
19
targetSdkVersion
29
versionCode
1
versionName
"1.0"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles
'consumer-rules.pro'
}
buildTypes
{
release
{
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
}
}
}
dependencies
{
implementation
fileTree
(
dir:
'libs'
,
include:
[
'*.jar'
])
implementation
'androidx.appcompat:appcompat:1.1.0'
testImplementation
'junit:junit:4.12'
androidTestImplementation
'androidx.test.ext:junit:1.1.0'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.2.0'
compile
"androidx.core:core-ktx:+"
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
repositories
{
mavenCentral
()
}
fragmentcontroller/consumer-rules.pro
0 → 100644
View file @
e39c45b3
fragmentcontroller/img/complete_android_fragment_lifecycle.png
0 → 100644
View file @
e39c45b3
390 KB
fragmentcontroller/proguard-rules.pro
0 → 100644
View file @
e39c45b3
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
fragmentcontroller/src/androidTest/java/com/qmai/android/fragmentcontroller/ExampleInstrumentedTest.java
0 → 100644
View file @
e39c45b3
package
com
.
qmai
.
android
.
fragmentcontroller
;
import
android.content.Context
;
import
androidx.test.platform.app.InstrumentationRegistry
;
import
androidx.test.ext.junit.runners.AndroidJUnit4
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
static
org
.
junit
.
Assert
.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith
(
AndroidJUnit4
.
class
)
public
class
ExampleInstrumentedTest
{
@Test
public
void
useAppContext
()
{
// Context of the app under test.
Context
appContext
=
InstrumentationRegistry
.
getInstrumentation
().
getTargetContext
();
assertEquals
(
"com.qmai.android.fragmentcontroller.test"
,
appContext
.
getPackageName
());
}
}
fragmentcontroller/src/main/AndroidManifest.xml
0 → 100644
View file @
e39c45b3
<manifest
xmlns:android=
"http://schemas.android.com/apk/res/android"
package=
"com.qmai.android.fragmentcontroller"
/>
fragmentcontroller/src/main/java/com/qmai/android/fragmentcontroller/LifeFragment.kt
0 → 100644
View file @
e39c45b3
package
com.qmai.android.fragmentcontroller
import
android.content.Context
import
android.os.Bundle
import
android.util.AttributeSet
import
android.view.View
import
androidx.fragment.app.Fragment
/**
* created by wangwei ON 2019-10-29 email:wangwei_5521@163.com
* @version 1.1.1
* @Description
**/
class
LifeFragment
:
Fragment
(){
override
fun
onAttach
(
context
:
Context
)
{
super
.
onAttach
(
context
)
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
}
override
fun
onInflate
(
context
:
Context
,
attrs
:
AttributeSet
,
savedInstanceState
:
Bundle
?)
{
super
.
onInflate
(
context
,
attrs
,
savedInstanceState
)
}
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
}
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
super
.
onViewCreated
(
view
,
savedInstanceState
)
}
override
fun
onActivityCreated
(
savedInstanceState
:
Bundle
?)
{
super
.
onActivityCreated
(
savedInstanceState
)
}
}
\ No newline at end of file
fragmentcontroller/src/main/res/values/strings.xml
0 → 100644
View file @
e39c45b3
<resources>
<string
name=
"app_name"
>
FragmentController
</string>
</resources>
fragmentcontroller/src/test/java/com/qmai/android/fragmentcontroller/ExampleUnitTest.java
0 → 100644
View file @
e39c45b3
package
com
.
qmai
.
android
.
fragmentcontroller
;
import
org.junit.Test
;
import
static
org
.
junit
.
Assert
.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public
class
ExampleUnitTest
{
@Test
public
void
addition_isCorrect
()
{
assertEquals
(
4
,
2
+
2
);
}
}
\ No newline at end of file
settings.gradle
View file @
e39c45b3
include
':app'
,
':widgetlib'
,
':tools'
include
':app'
,
':widgetlib'
,
':tools'
,
':fragmentcontroller'
tools/build.gradle
View file @
e39c45b3
...
@@ -42,7 +42,7 @@ repositories {
...
@@ -42,7 +42,7 @@ repositories {
group
'com.qmai.android.tools'
group
'com.qmai.android.tools'
version
'1.1.
6
-SNAPSHOT'
version
'1.1.
7
-SNAPSHOT'
gradlePublish
{
gradlePublish
{
...
...
tools/src/main/java/com/qimai/android/tools/TimeFormat.kt
0 → 100644
View file @
e39c45b3
package
com.qimai.android.tools
import
java.text.SimpleDateFormat
import
java.util.*
/**
* created by wangwei ON 2019-09-23 email:wangwei_5521@163.com
* @version 1.1.1
* @Description
**/
fun
formatCurrentDate
(
pattern
:
String
)
=
getTimeFormatStr
(
pattern
)
private
fun
getTimeFormatStr
(
pattern
:
String
,
original
:
Any
=
Date
())
=
SimpleDateFormat
(
pattern
,
Locale
.
getDefault
()).
format
(
original
)
?:
""
/**获取当前年份**/
val
currentYear
:
Int
get
()
=
Calendar
.
getInstance
().
get
(
Calendar
.
YEAR
)
/**获取当前月份**/
val
currentMonth
get
()
=
Calendar
.
getInstance
().
get
(
Calendar
.
MONTH
)
+
1
/**获取当前日**/
val
currentDay
:
Int
get
()
=
Calendar
.
getInstance
().
get
(
Calendar
.
DATE
)
/**获取当前时间戳**/
val
currentTimeMillis
:
Long
get
()
=
System
.
currentTimeMillis
()
widgetlib/Pop.MD
0 → 100644
View file @
e39c45b3
````
class TestWindow constructor(var ctx: Context, var anchor: View) : AbsQMBasePopup(ctx) {
override fun onShowEnd() {
dimBehind(0.5f)
}
override fun config(): WindowConfig {
return AbsQMBasePopup.WindowConfig().apply {
mContentView = LayoutInflater.from(ctx).inflate(R.layout.qm_alert_content, null)
mAnchorView = anchor
mWindowWidth = getScreenWidth(ctx) - ctx.dpTopx(30.0f)
mGravity = Gravity.CENTER
}
}
override fun onShowBegin(contentView: View): Point {
return Point(0, 0)
}
}
````
` 显示 TestWindow(this, anchorView).build().show()
`
\ No newline at end of file
widgetlib/build.gradle
View file @
e39c45b3
...
@@ -37,6 +37,8 @@ dependencies {
...
@@ -37,6 +37,8 @@ dependencies {
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation
project
(
path:
':tools'
)
implementation
project
(
path:
':tools'
)
implementation
'androidx.recyclerview:recyclerview:1.0.0'
implementation
'androidx.recyclerview:recyclerview:1.0.0'
implementation
'com.github.ybq:Android-SpinKit:1.4.0'
// implementation 'com.qmai.android.tools:tools:1.1.1-SNAPSHOT'
// implementation 'com.qmai.android.tools:tools:1.1.1-SNAPSHOT'
}
}
repositories
{
repositories
{
...
@@ -45,7 +47,7 @@ repositories {
...
@@ -45,7 +47,7 @@ repositories {
group
'com.qmai.android.sdk'
group
'com.qmai.android.sdk'
version
'1.1.1
2
-SNAPSHOT'
version
'1.1.1
8
-SNAPSHOT'
gradlePublish
{
gradlePublish
{
...
...
widgetlib/src/main/java/com/qimai/android/span/SpanUtils.java
0 → 100644
View file @
e39c45b3
This diff is collapsed.
Click to expand it.
widgetlib/src/main/java/com/qimai/android/widgetlib/SectionItemView.java
0 → 100644
View file @
e39c45b3
package
com
.
qimai
.
android
.
widgetlib
;
import
android.content.Context
;
import
android.content.res.TypedArray
;
import
android.util.AttributeSet
;
import
android.widget.RelativeLayout
;
/**
* created by wangwei ON 2019-11-04 email:wangwei_5521@163.com
*
* @version 1.1.1
* @Description
**/
public
class
SectionItemView
extends
RelativeLayout
{
public
static
final
int
TYPE_ARROW
=
0
;
public
static
final
int
TYPE_CHECK
=
1
;
public
static
final
int
TYPE_RADIO
=
2
;
public
SectionItemView
(
Context
context
)
{
this
(
context
,
null
);
}
public
SectionItemView
(
Context
context
,
AttributeSet
attrs
)
{
this
(
context
,
attrs
,
0
);
}
public
SectionItemView
(
Context
context
,
AttributeSet
attrs
,
int
defStyleAttr
)
{
super
(
context
,
attrs
,
defStyleAttr
);
TypedArray
a
=
context
.
getTheme
().
obtainStyledAttributes
(
/** layout 布局配置**/
attrs
,
R
.
styleable
.
SectionItemView
,
/** 通过attr 设置**/
defStyleAttr
,
/** 默认样式 **/
0
);
int
type
=
a
.
getInteger
(
R
.
styleable
.
SectionItemView_type
,
0
);
switch
(
type
)
{
case
TYPE_ARROW:
{
}
case
TYPE_CHECK:
{
}
case
TYPE_RADIO:
{
}
}
a
.
recycle
();
}
}
widgetlib/src/main/java/com/qimai/android/widgetlib/popup/AbsQMBasePopup.kt
0 → 100644
View file @
e39c45b3
package
com.qimai.android.widgetlib.popup
import
android.content.Context
import
android.graphics.Color
import
android.graphics.Point
import
android.graphics.drawable.ColorDrawable
import
android.graphics.drawable.Drawable
import
android.os.Build
import
android.view.*
import
android.widget.FrameLayout
import
android.widget.PopupWindow
/**
* created by wangwei ON 2019-08-22 email:wangwei_5521@163.com
* @version 1.1.1
* @Description
**/
abstract
class
AbsQMBasePopup
(
open
var
context
:
Context
)
{
private
var
mWindow
=
PopupWindow
()
private
lateinit
var
mRootViewWrapper
:
FrameLayout
private
lateinit
var
mWindowManager
:
WindowManager
protected
open
var
mDismissListener
:
PopupWindow
.
OnDismissListener
?
=
null
abstract
fun
config
():
WindowConfig
var
touchOutside
=
true
set
(
value
)
{
field
=
value
mWindow
.
isOutsideTouchable
=
value
}
fun
isShowing
():
Boolean
{
return
mWindow
.
isShowing
}
fun
build
():
AbsQMBasePopup
{
val
config
=
config
()
setContentView
(
contentView
=
config
.
mContentView
)
mWindow
.
width
=
config
.
mWindowWidth
mWindow
.
height
=
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
LOLLIPOP_MR1
)
{
mWindow
.
isAttachedInDecor
=
false
}
if
(
config
.
mBackground
==
null
)
{
mWindow
.
setBackgroundDrawable
(
ColorDrawable
(
Color
.
TRANSPARENT
))
}
else
{
mWindow
.
setBackgroundDrawable
(
config
.
mBackground
)
}
mWindow
.
isTouchable
=
true
mWindow
.
isFocusable
=
true
mWindow
.
isOutsideTouchable
=
config
.
isOutsideTouchable
// 在相关的View被移除时,window也自动移除。避免当Fragment退出后,Fragment中弹出的PopupWindow还存在于界面上。
config
.
mAnchorView
.
addOnAttachStateChangeListener
(
object
:
View
.
OnAttachStateChangeListener
{
override
fun
onViewAttachedToWindow
(
v
:
View
)
{
}
override
fun
onViewDetachedFromWindow
(
v
:
View
)
{
if
(
isShowing
())
{
dismiss
()
}
}
})
return
this
}
fun
dimBehind
(
dim
:
Float
)
{
if
(!
::
mWindowManager
.
isInitialized
)
mWindowManager
=
context
.
getSystemService
(
Context
.
WINDOW_SERVICE
)
as
WindowManager
if
(!
isShowing
())
{
throw
RuntimeException
(
"should call after method show() or in onShowEnd()"
)
}
val
decorView
=
getDecorView
()
if
(
decorView
!=
null
)
{
val
p
=
decorView
.
layoutParams
as
WindowManager
.
LayoutParams
p
.
flags
=
p
.
flags
or
WindowManager
.
LayoutParams
.
FLAG_DIM_BEHIND
p
.
dimAmount
=
dim
mWindowManager
.
updateViewLayout
(
decorView
,
p
)
}
}
protected
abstract
fun
onShowBegin
(
contentView
:
View
):
Point
protected
abstract
fun
onShowEnd
()
fun
dismiss
()
{
if
(
isShowing
())
mWindow
.
dismiss
()
}
fun
show
()
{
if
(!
isShowing
())
{
val
point
=
onShowBegin
(
config
().
mContentView
)
mWindow
.
showAtLocation
(
config
().
mAnchorView
,
config
().
mGravity
,
point
.
x
,
point
.
y
)
onShowEnd
()
}
}
fun
setContentView
(
contentView
:
View
)
{
mRootViewWrapper
=
FrameLayout
(
contentView
.
context
)
mRootViewWrapper
.
layoutParams
=
ViewGroup
.
LayoutParams
(
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
mRootViewWrapper
.
addView
(
contentView
)
mWindow
.
contentView
=
mRootViewWrapper
mWindow
.
setTouchInterceptor
(
View
.
OnTouchListener
{
v
,
event
->
if
(
event
.
action
==
MotionEvent
.
ACTION_OUTSIDE
)
{
mWindow
.
dismiss
()
return
@OnTouchListener
false
}
false
})
mWindow
.
setOnDismissListener
{
this
@AbsQMBasePopup
.
onDismiss
()
if
(
mDismissListener
!=
null
)
{
mDismissListener
!!
.
onDismiss
()
}
}
}
protected
fun
onDismiss
()
{}
private
fun
getDecorView
():
View
?
{
var
decorView
:
View
?
=
null
try
{
decorView
=
if
(
mWindow
.
background
==
null
)
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
M
)
{
mWindow
.
contentView
.
parent
as
View
}
else
{
mWindow
.
contentView
}
}
else
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
M
)
{
mWindow
.
contentView
.
parent
.
parent
as
View
}
else
{
mWindow
.
contentView
.
parent
as
View
}
}
}
catch
(
ignore
:
Exception
)
{
}
return
decorView
}
class
WindowConfig
{
var
mWindowWidth
=
ViewGroup
.
LayoutParams
.
MATCH_PARENT
var
mWindowHeight
=
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
var
mAnimationStyle
:
Int
=
-
1
var
mGravity
:
Int
=
Gravity
.
CENTER
var
mBackground
:
Drawable
?
=
null
lateinit
var
mContentView
:
View
lateinit
var
mAnchorView
:
View
var
isOutsideTouchable
=
true
}
}
\ No newline at end of file
widgetlib/src/main/java/com/qimai/android/widgetlib/popup/CommonPopWindow.kt
View file @
e39c45b3
...
@@ -4,7 +4,6 @@ import android.content.Context
...
@@ -4,7 +4,6 @@ import android.content.Context
import
android.graphics.Point
import
android.graphics.Point
import
android.view.Gravity
import
android.view.Gravity
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.widget.PopupWindow
import
android.widget.PopupWindow
import
com.qimai.android.tools.dpTopx
import
com.qimai.android.tools.dpTopx
import
com.qimai.android.tools.getScreenWidth
import
com.qimai.android.tools.getScreenWidth
...
@@ -17,7 +16,7 @@ import com.qimai.android.tools.getScreenWidth
...
@@ -17,7 +16,7 @@ import com.qimai.android.tools.getScreenWidth
class
CommonPopWindow
private
constructor
(
class
CommonPopWindow
private
constructor
(
override
var
context
:
Context
,
override
var
context
:
Context
,
private
val
contentView
:
View
,
private
val
contentView
:
View
,
private
var
animationStyle
:
Int
,
private
var
animationStyle
s
:
Int
,
override
var
gravity
:
Int
,
override
var
gravity
:
Int
,
override
var
mDismissListener
:
PopupWindow
.
OnDismissListener
?
override
var
mDismissListener
:
PopupWindow
.
OnDismissListener
?
...
@@ -28,13 +27,20 @@ class CommonPopWindow private constructor(
...
@@ -28,13 +27,20 @@ class CommonPopWindow private constructor(
private
constructor
(
builder
:
Builder
)
:
this
(
private
constructor
(
builder
:
Builder
)
:
this
(
context
=
builder
.
mContentView
.
context
,
context
=
builder
.
mContentView
.
context
,
contentView
=
builder
.
mContentView
,
contentView
=
builder
.
mContentView
,
animationStyle
=
builder
.
animationStyle
,
animationStyle
s
=
builder
.
animationStyle
,
gravity
=
builder
.
gravity
,
gravity
=
builder
.
gravity
,
mDismissListener
=
builder
.
dismissListener
mDismissListener
=
builder
.
dismissListener
)
{
)
{
this
.
setContentView
(
contentView
)
this
.
setContentView
(
contentView
)
this
.
setAnimatonStyle
(
animationStyle
)
this
.
setAnimationStyle
(
animationStyles
)
if
(
builder
.
windowWidth
<
0
)
setWindowWidth
(
getScreenWidth
(
contentView
.
context
)
-
context
.
dpTopx
(
30.0f
))
setWindowWidth
(
getScreenWidth
(
contentView
.
context
)
-
context
.
dpTopx
(
30.0f
))
else
setWindowWidth
(
builder
.
windowWidth
)
if
(
builder
.
windowHeight
>
0
)
{
setWindowHeight
(
builder
.
windowHeight
)
}
}
}
...
@@ -48,14 +54,22 @@ class CommonPopWindow private constructor(
...
@@ -48,14 +54,22 @@ class CommonPopWindow private constructor(
internal
var
dismissListener
:
PopupWindow
.
OnDismissListener
?
=
null
internal
var
dismissListener
:
PopupWindow
.
OnDismissListener
?
=
null
internal
var
windowWidth
=
ViewGroup
.
LayoutParams
.
MATCH_PARENT
var
windowWidth
=
-
1
internal
var
windowHeight
=
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
var
windowHeight
=
-
1
fun
configContentView
(
contentView
:
View
)
=
apply
{
fun
configContentView
(
contentView
:
View
)
=
apply
{
this
.
mContentView
=
contentView
this
.
mContentView
=
contentView
}
}
fun
configWidowWith
(
windowWidth
:
Int
)
=
apply
{
this
.
windowWidth
=
windowWidth
}
fun
configWidowHeight
(
windowHeight
:
Int
)
=
apply
{
this
.
windowHeight
=
windowHeight
}
fun
configGravity
(
gravity
:
Int
)
=
apply
{
fun
configGravity
(
gravity
:
Int
)
=
apply
{
this
.
gravity
=
gravity
this
.
gravity
=
gravity
...
...
widgetlib/src/main/java/com/qimai/android/widgetlib/popup/Loading.kt
0 → 100644
View file @
e39c45b3
package
com.qimai.android.widgetlib.popup
import
android.os.Bundle
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
com.qimai.android.widgetlib.R
import
kotlinx.android.synthetic.main.loading.view.*
/**
* created by wangwei ON 2019-10-21 email:wangwei_5521@163.com
* @version 1.1.1
* @Description
**/
class
Loading
:
androidx
.
fragment
.
app
.
DialogFragment
()
{
private
lateinit
var
rootView
:
View
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
?
{
super
.
onCreateView
(
inflater
,
container
,
savedInstanceState
)
val
root
=
inflater
.
inflate
(
R
.
layout
.
loading
,
container
,
false
)
rootView
=
root
return
root
}
fun
changeLoadText
(
loadingText
:
String
)
{
rootView
.
text
.
text
=
loadingText
}
fun
show
(
manager
:
androidx
.
fragment
.
app
.
FragmentManager
)
{
show
(
manager
,
"loading"
)
}
}
\ No newline at end of file
widgetlib/src/main/java/com/qimai/android/widgetlib/popup/QMBasePopup.kt
View file @
e39c45b3
...
@@ -39,7 +39,7 @@ abstract class QMBasePopup(open var context: Context) {
...
@@ -39,7 +39,7 @@ abstract class QMBasePopup(open var context: Context) {
this
.
mWindowHeight
=
windowHeight
this
.
mWindowHeight
=
windowHeight
}
}
fun
setAnimatonStyle
(
style
:
Int
)
{
fun
setAnimat
i
onStyle
(
style
:
Int
)
{
mWindow
.
animationStyle
=
style
mWindow
.
animationStyle
=
style
}
}
...
...
widgetlib/src/main/java/com/qimai/android/widgetlib/popup/QmAlertDialog.kt
View file @
e39c45b3
package
com.qimai.android.widgetlib.popup
package
com.qimai.android.widgetlib.popup
import
android.content.Context
import
android.content.Context
import
android.graphics.drawable.ColorDrawable
import
android.graphics.drawable.Drawable
import
android.text.TextUtils
import
android.text.TextUtils
import
android.view.Gravity
import
android.view.Gravity
import
android.view.LayoutInflater
import
android.view.LayoutInflater
...
@@ -25,10 +23,11 @@ class QmAlertDialog private constructor(
...
@@ -25,10 +23,11 @@ class QmAlertDialog private constructor(
private
val
subTitle
:
CharSequence
,
private
val
subTitle
:
CharSequence
,
private
val
leftButtonText
:
String
,
private
val
leftButtonText
:
String
,
private
val
rightButtonText
:
String
,
private
val
rightButtonText
:
String
,
private
val
leftButtonClickListener
:
(
CommonPopWindow
:
CommonPopWindow
)
->
Unit
,
private
val
leftButtonClickListener
:
(
CommonPopWindow
:
CommonPopWindow
)
->
Unit
,
private
val
rightButtonClickListener
:
(
CommonPopWindow
:
CommonPopWindow
)
->
Unit
,
private
val
rightButtonClickListener
:
(
CommonPopWindow
:
CommonPopWindow
)
->
Unit
,
private
val
rootView
:
ViewGroup
,
private
val
rootView
:
ViewGroup
,
private
val
dismissListener
:
PopupWindow
.
OnDismissListener
?
private
val
dismissListener
:
PopupWindow
.
OnDismissListener
?
,
private
val
width
:
Int
)
{
)
{
private
lateinit
var
commonPopWindow
:
CommonPopWindow
private
lateinit
var
commonPopWindow
:
CommonPopWindow
...
@@ -41,7 +40,8 @@ class QmAlertDialog private constructor(
...
@@ -41,7 +40,8 @@ class QmAlertDialog private constructor(
leftButtonClickListener
=
builder
.
leftButtonClick
,
leftButtonClickListener
=
builder
.
leftButtonClick
,
rightButtonClickListener
=
builder
.
rightButtonClick
,
rightButtonClickListener
=
builder
.
rightButtonClick
,
rootView
=
builder
.
rootView
,
rootView
=
builder
.
rootView
,
dismissListener
=
builder
.
dismissListener
dismissListener
=
builder
.
dismissListener
,
width
=
builder
.
width
)
)
fun
show
()
{
fun
show
()
{
...
@@ -76,13 +76,17 @@ class QmAlertDialog private constructor(
...
@@ -76,13 +76,17 @@ class QmAlertDialog private constructor(
this
.
rightButtonClickListener
.
invoke
(
commonPopWindow
)
this
.
rightButtonClickListener
.
invoke
(
commonPopWindow
)
}
}
commonPopWindow
=
CommonPopWindow
.
Builder
()
val
builder
=
CommonPopWindow
.
Builder
()
.
configGravity
(
Gravity
.
CENTER
)
.
configGravity
(
Gravity
.
CENTER
)
.
configContentView
(
contentView
)
.
configContentView
(
contentView
)
.
dismissListener
(
PopupWindow
.
OnDismissListener
{
.
dismissListener
(
PopupWindow
.
OnDismissListener
{
dismissListener
?.
onDismiss
()
dismissListener
?.
onDismiss
()
})
})
.
build
()
if
(
width
>
0
){
builder
.
configWidowWith
(
width
)
}
commonPopWindow
=
builder
.
build
()
}
}
commonPopWindow
.
show
(
rootView
)
commonPopWindow
.
show
(
rootView
)
commonPopWindow
.
dimBehind
(
0.5f
)
commonPopWindow
.
dimBehind
(
0.5f
)
...
@@ -104,11 +108,12 @@ class QmAlertDialog private constructor(
...
@@ -104,11 +108,12 @@ class QmAlertDialog private constructor(
internal
var
leftButtonText
=
"取消"
internal
var
leftButtonText
=
"取消"
internal
var
rightButtonText
=
"确定"
internal
var
rightButtonText
=
"确定"
internal
lateinit
var
leftButtonClick
:
(
CommonPopWindow
:
CommonPopWindow
)
->
Unit
internal
lateinit
var
leftButtonClick
:
(
CommonPopWindow
:
CommonPopWindow
)
->
Unit
internal
lateinit
var
rightButtonClick
:
(
CommonPopWindow
:
CommonPopWindow
)
->
Unit
internal
lateinit
var
rightButtonClick
:
(
CommonPopWindow
:
CommonPopWindow
)
->
Unit
private
lateinit
var
context
:
Context
private
lateinit
var
context
:
Context
internal
lateinit
var
rootView
:
ViewGroup
internal
lateinit
var
rootView
:
ViewGroup
internal
var
dismissListener
:
PopupWindow
.
OnDismissListener
?
=
null
internal
var
dismissListener
:
PopupWindow
.
OnDismissListener
?
=
null
internal
var
width
:
Int
=
0
fun
withTitle
(
title
:
CharSequence
)
=
apply
{
fun
withTitle
(
title
:
CharSequence
)
=
apply
{
...
@@ -132,13 +137,21 @@ class QmAlertDialog private constructor(
...
@@ -132,13 +137,21 @@ class QmAlertDialog private constructor(
this
.
rootView
=
rootView
this
.
rootView
=
rootView
}
}
fun
withWidth
(
windowWidth
:
Int
)
=
apply
{
this
.
width
=
windowWidth
}
fun
build
():
QmAlertDialog
{
fun
build
():
QmAlertDialog
{
return
QmAlertDialog
(
this
)
return
QmAlertDialog
(
this
)
}
}
fun
withLeftButton
(
leftButtonText
:
String
,
clickListener
:
(
CommonPopWindow
:
CommonPopWindow
)
->
Unit
)
=
fun
withLeftButton
(
leftButtonText
:
String
,
clickListener
:
(
CommonPopWindow
:
CommonPopWindow
)
->
Unit
)
=
apply
{
apply
{
this
.
leftButtonText
=
leftButtonText
this
.
leftButtonText
=
leftButtonText
...
@@ -146,7 +159,10 @@ class QmAlertDialog private constructor(
...
@@ -146,7 +159,10 @@ class QmAlertDialog private constructor(
}
}
fun
withRightButton
(
rightButtonText
:
String
,
clickListener
:
(
CommonPopWindow
:
CommonPopWindow
)
->
Unit
)
=
apply
{
fun
withRightButton
(
rightButtonText
:
String
,
clickListener
:
(
CommonPopWindow
:
CommonPopWindow
)
->
Unit
)
=
apply
{
this
.
rightButtonText
=
rightButtonText
this
.
rightButtonText
=
rightButtonText
this
.
rightButtonClick
=
clickListener
this
.
rightButtonClick
=
clickListener
...
...
widgetlib/src/main/java/com/qimai/android/widgetlib/toast/HolderContext.java
0 → 100644
View file @
e39c45b3
package
com
.
qimai
.
android
.
widgetlib
.
toast
;
import
android.content.Context
;
/**
* created by wangwei ON 2019-11-04 email:wangwei_5521@163.com
*
* @version 1.1.1
* @Description
**/
public
class
HolderContext
{
private
static
volatile
HolderContext
instance
;
public
static
HolderContext
getInstance
()
{
if
(
instance
==
null
)
{
synchronized
(
HolderContext
.
class
)
{
if
(
instance
==
null
)
{
instance
=
new
HolderContext
();
}
}
}
return
instance
;
}
public
static
Context
getContext
()
{
return
getInstance
().
holder
.
getContext
();
}
public
Holder
holder
;
public
void
register
(
Holder
holder
)
{
this
.
holder
=
holder
;
}
public
interface
Holder
{
Context
getContext
();
}
}
widgetlib/src/main/java/com/qimai/android/widgetlib/toast/ToastUtils.java
0 → 100644
View file @
e39c45b3
package
com
.
qimai
.
android
.
widgetlib
.
toast
;
import
android.graphics.PorterDuff
;
import
android.graphics.PorterDuffColorFilter
;
import
android.graphics.drawable.ColorDrawable
;
import
android.graphics.drawable.Drawable
;
import
android.os.Build
;
import
android.view.Gravity
;
import
android.view.View
;
import
android.widget.TextView
;
import
android.widget.Toast
;
/**
* created by wangwei ON 2019-11-04 email:wangwei_5521@163.com
*
* @version 1.1.1
* @Description
**/
public
class
ToastUtils
{
private
static
volatile
ToastUtils
instance
;
private
static
final
int
COLOR_DEFAULT
=
0xFEFFFFFF
;
private
static
volatile
Toast
mToast
;
private
int
sMsgTextSize
=
-
1
;
private
int
sMsgColor
=
COLOR_DEFAULT
;
private
int
sGravity
=
-
1
;
private
int
sBgColor
=
COLOR_DEFAULT
;
private
int
sBgResource
=
-
1
;
public
static
ToastUtils
getInstance
()
{
if
(
instance
==
null
)
{
synchronized
(
ToastUtils
.
class
)
{
if
(
instance
==
null
)
{
instance
=
new
ToastUtils
();
}
}
}
return
instance
;
}
public
void
showCenter
(
String
msg
)
{
getToast
().
setText
(
msg
);
mToast
.
setGravity
(
Gravity
.
CENTER
,
0
,
0
);
mToast
.
show
();
}
public
void
showTaost
(
CharSequence
msg
)
{
getToast
();
View
toastView
=
mToast
.
getView
();
TextView
message
=
toastView
.
findViewById
(
android
.
R
.
id
.
message
);
message
.
setText
(
msg
);
if
(
sMsgTextSize
!=
-
1
)
{
message
.
setTextSize
(
sMsgTextSize
);
}
if
(
sMsgColor
!=
COLOR_DEFAULT
)
{
message
.
setTextColor
(
sMsgColor
);
}
if
(
sGravity
!=
-
1
)
{
mToast
.
setGravity
(
sGravity
,
0
,
0
);
}
if
(
sBgResource
!=
-
1
)
{
toastView
.
setBackgroundResource
(
sBgResource
);
}
else
if
(
sBgColor
!=
COLOR_DEFAULT
)
{
Drawable
background
=
toastView
.
getBackground
();
if
(
background
!=
null
)
{
background
.
setColorFilter
(
new
PorterDuffColorFilter
(
sBgColor
,
PorterDuff
.
Mode
.
SRC_IN
)
);
}
else
{
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
JELLY_BEAN
)
{
toastView
.
setBackground
(
new
ColorDrawable
(
sBgColor
));
}
else
{
toastView
.
setBackgroundDrawable
(
new
ColorDrawable
(
sBgColor
));
}
}
}
mToast
.
show
();
}
public
ToastUtils
setsMsgTextSize
(
int
msgTextSize
)
{
sMsgTextSize
=
msgTextSize
;
return
this
;
}
public
ToastUtils
setMsgColor
(
int
color
)
{
this
.
sMsgColor
=
color
;
return
this
;
}
public
ToastUtils
setGravity
(
int
gravity
)
{
this
.
sGravity
=
gravity
;
return
this
;
}
public
ToastUtils
setBgColor
(
int
color
)
{
this
.
sBgColor
=
color
;
return
this
;
}
public
ToastUtils
setBgResouce
(
int
bgResouce
)
{
this
.
sBgColor
=
bgResouce
;
return
this
;
}
private
static
Toast
getToast
()
{
if
(
mToast
==
null
)
{
synchronized
(
ToastUtils
.
class
)
{
if
(
mToast
==
null
)
{
mToast
=
Toast
.
makeText
(
HolderContext
.
getContext
(),
""
,
Toast
.
LENGTH_LONG
);
}
}
}
return
mToast
;
}
}
widgetlib/src/main/res/layout/loading.xml
0 → 100644
View file @
e39c45b3
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"vertical"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"wrap_content"
android:background=
"@drawable/shape_alert_bg"
android:layout_gravity=
"center"
android:padding=
"16dp"
android:layout_height=
"wrap_content"
>
<com.github.ybq.android.spinkit.SpinKitView
android:id=
"@+id/spin_kit"
style=
"@style/SpinKitView.Large.FadingCircle"
android:layout_width=
"90dp"
android:layout_height=
"90dp"
android:layout_gravity=
"center"
app:SpinKit_Color=
"#E2CE22"
/>
<TextView
android:id=
"@+id/text"
android:text=
"加载中..."
android:textColor=
"@color/color_222222"
android:textSize=
"15sp"
android:layout_marginTop=
"16dp"
android:layout_gravity=
"center"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
\ No newline at end of file
widgetlib/src/main/res/layout/section_itemview.xml
0 → 100644
View file @
e39c45b3
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
</LinearLayout>
\ No newline at end of file
widgetlib/src/main/res/values/attrs.xml
View file @
e39c45b3
...
@@ -36,4 +36,12 @@
...
@@ -36,4 +36,12 @@
<attr
name=
"overlay_borderColor"
format=
"color"
/>
<attr
name=
"overlay_borderColor"
format=
"color"
/>
<attr
name=
"overlay_borderWidth"
format=
"dimension"
/>
<attr
name=
"overlay_borderWidth"
format=
"dimension"
/>
</declare-styleable>
</declare-styleable>
<declare-styleable
name=
"SectionItemView"
>
<attr
name=
"type"
format=
"enum"
>
<enum
name=
"arrow"
value=
"0"
/>
<enum
name=
"check"
value=
"1"
/>
<enum
name=
"radio"
value=
"2"
/>
</attr>
</declare-styleable>
</resources>
</resources>
\ No newline at end of file
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