Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
marquee
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
bixing
marquee
Commits
979e6844
Commit
979e6844
authored
Nov 21, 2023
by
bixing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
a9959f3c
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
292 additions
and
22 deletions
+292
-22
compiler.xml
.idea/compiler.xml
+1
-1
build.gradle
app/build.gradle
+25
-1
proguard-rules.pro
app/proguard-rules.pro
+220
-1
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+2
-0
MarqueeMActivity.java
app/src/main/java/com/ads/cal/marquee/MarqueeMActivity.java
+36
-15
OpenActivity.java
app/src/main/java/com/ads/cal/marquee/OpenActivity.java
+6
-0
marquee_main_activity.xml
app/src/main/res/layout/marquee_main_activity.xml
+1
-4
set_activity.xml
app/src/main/res/layout/set_activity.xml
+1
-0
No files found.
.idea/compiler.xml
View file @
979e6844
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"CompilerConfiguration"
>
<bytecodeTargetLevel
target=
"1
1
"
/>
<bytecodeTargetLevel
target=
"1
7
"
/>
</component>
</project>
\ No newline at end of file
app/build.gradle
View file @
979e6844
...
...
@@ -22,9 +22,15 @@ android {
buildTypes
{
release
{
minifyEnabled
false
debuggable
false
minifyEnabled
true
proguardFiles
getDefaultProguardFile
(
'proguard-android-optimize.txt'
),
'proguard-rules.pro'
}
debug
{
debuggable
true
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android.txt'
),
'app-proguard-rules.pro'
}
}
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
...
@@ -44,6 +50,24 @@ android {
excludes
+=
'/META-INF/{AL2.0,LGPL2.1}'
}
}
signingConfigs
{
toolsTest
{
storeFile
file
(
"../marqueeTest.jks"
)
storePassword
'123456'
keyAlias
'key0'
keyPassword
'123456'
}
}
flavorDimensions
"versionName"
productFlavors
{
marquee
{
applicationId
"com.ads.cal.marquee"
versionName
"1.0.0.0"
signingConfig
signingConfigs
.
toolsTest
}
}
}
dependencies
{
...
...
app/proguard-rules.pro
View file @
979e6844
...
...
@@ -19,3 +19,222 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-
dontpreverify
-
flattenpackagehierarchy
-
optimizationpasses
5
-
dontusemixedcaseclassnames
-
dontskipnonpubliclibraryclasses
-
verbose
-
useuniqueclassmembernames
-
ignorewarnings
#基础模板开始
# 保护注解
-
keepattributes
*
Annotation
*
-
keepattributes
*
JavascriptInterface
*
# Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and
# EnclosingMethod is required to use InnerClasses.
#泛型 内部类 反射
-
keepattributes
Signature
,
InnerClasses
,
EnclosingMethod
#显示代码行数
-
keepattributes
Exceptions
,
SourceFile
,
LineNumberTable
-
keep
public
class
*
$
JavaScriptInterface
-
keepattributes
*
$
JavaScriptInterface
-
keepclassmembers
class
*
{
@
android
.
webkit
.
JavascriptInterface
<
methods
>
;
}
-
keepclassmembers
class
*
extends
android
.
webkit
.
WebViewClient
{
*
;
}
# Understand the @Keep support annotation.
-
keep
class
android
.
support
.
annotation
.
Keep
-
keep
@
android
.
support
.
annotation
.
Keep
class
*
{
*
;}
-
keepclasseswithmembers
class
*
{
@
android
.
support
.
annotation
.
Keep
<
methods
>
;
}
-
keepclasseswithmembers
class
*
{
@
android
.
support
.
annotation
.
Keep
<
fields
>
;
}
-
keepclasseswithmembers
class
*
{
@
android
.
support
.
annotation
.
Keep
<
init
>
(...);
}
#【不进行混淆保持原样】
-
keep
public
class
*
extends
android
.
view
.
View
-
keep
public
class
*
extends
android
.
app
.
Fragment
-
keep
public
class
*
extends
android
.
app
.
Activity
-
keep
public
class
*
extends
android
.
app
.
Application
-
keep
public
class
*
extends
android
.
app
.
Service
-
keep
public
class
*
extends
android
.
content
.
BroadcastReceiver
-
keep
public
class
*
extends
android
.
content
.
ContentProvider
-
keep
public
class
*
extends
android
.
app
.
backup
.
BackupAgentHelper
-
keep
public
class
*
extends
android
.
preference
.
Preference
#commom
-
keep
public
class
com
.
google
.
vending
.
licensing
.
ILicensingService
-
keep
public
class
com
.
android
.
vending
.
licensing
.
ILicensingService
-
keep
public
class
*
extends
android
.
support
.
**
-
keep
class
com
.
google
.
**
{
*
;
}
-
keep
class
android
.
webkit
.
**
{
*
;}
-
keep
class
org
.
apache
.
**
{
*
;
}
-
keep
public
class
android
.
**
{
*
;
}
-
keepclassmembers
public
class
android
.
**
{
*
;
}
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-
keepclasseswithmembernames
class
*
{
native
<
methods
>
;
}
# keep setters in Views so that animations can still work.
# see http://proguard.sourceforge.net/manual/examples.html#beans
-
keepclassmembers
public
class
*
extends
android
.
view
.
View
{
void
set
*
(
***
);
***
get
*
();
public
<
init
>
(
android
.
content
.
Context
);
public
<
init
>
(
android
.
content
.
Context
,
android
.
util
.
AttributeSet
);
public
<
init
>
(
android
.
content
.
Context
,
android
.
util
.
AttributeSet
,
int
);
}
# We want to keep methods in Activity that could be used in the XML attribute onClick
-
keepclassmembers
class
*
extends
android
.
app
.
Activity
{
public
void
*
(
android
.
view
.
View
);
}
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-
keepclassmembers
enum
*
{
public
static
**
[]
values
();
public
static
**
valueOf
(
java
.
lang
.
String
);
}
-
keep
class
*
implements
android
.
os
.
Parcelable
{
*
;}
-
keepclassmembers
class
*
implements
android
.
os
.
Parcelable
{
*
;}
-
keep
class
*
implements
java
.
io
.
Serializable
{
*
;}
-
keepclassmembers
class
*
implements
java
.
io
.
Serializable
{
*
;}
-
keepclassmembers
enum
*
{
public
static
**
[]
values
();
public
static
**
valueOf
(
java
.
lang
.
String
);
}
-
keepclassmembers
class
**.
R
$
*
{
public
static
<
fields
>
;
}
#基础模板结束
#utilcode
-
keep
class
com
.
blankj
.
utilcode
.
**
{
*
;
}
-
keepclassmembers
class
com
.
blankj
.
utilcode
.
**
{
*
;
}
-
keepclassmembers
class
*
{
@
com
.
blankj
.
utilcode
.
util
.
BusUtils
$
Bus
<
methods
>
;
}
-
dontwarn
com
.
blankj
.
utilcode
.
**
-
dontwarn
javax
.
annotation
.
**
-
dontwarn
javax
.
inject
.
**
# OkHttp3
-
dontwarn
okhttp3
.
**
-
dontwarn
okio
.
**
-
dontwarn
javax
.
annotation
.
**
# A resource is loaded with a relative path so the package of this class must be preserved.
-
keepnames
class
okhttp3
.
internal
.
publicsuffix
.
PublicSuffixDatabase
#okhttp
-
dontwarn
okhttp3
.
**
-
keep
class
okhttp3
.
*
{
*
;}
#okio
-
dontwarn
okio
.
**
-
keep
class
okio
.
*
{
*
;}
# Retrofit
-
dontwarn
retrofit2
.
**
-
keep
class
retrofit2
.
**
{
*
;
}
-
keepattributes
Signature
-
keepattributes
# Gson
-
keep
class
com
.
google
.
gson
.
stream
.
**
{
*
;
}
-
keepattributes
EnclosingMethod
-
keep
class
org
.
xz_sale
.
entity
.
**
{
*
;}
# agentWeb
-
keep
class
com
.
just
.
agentweb
.
**
{
*
;
}
-
keepclassmembers
class
*
implements
java
.
io
.
Serializable
{
static
final
long
serialVersionUID
;
private
static
final
java
.
io
.
ObjectStreamField
[]
serialPersistentFields
;
!
static
!
transient
<
fields
>
;
private
void
writeObject
(
java
.
io
.
ObjectOutputStream
);
private
void
readObject
(
java
.
io
.
ObjectInputStream
);
java
.
lang
.
Object
writeReplace
();
java
.
lang
.
Object
readResolve
();
}
##Glide
-
keep
class
com
.
bumptech
.
glide
.
**
{
*
;}
-
keep
public
enum
com
.
bumptech
.
glide
.
load
.
ImageHeaderParser
$
**
{
**
[]
$
VALUES
;
public
*
;
}
-
keep
public
class
*
implements
com
.
bumptech
.
glide
.
module
.
GlideModule
-
keep
public
enum
com
.
bumptech
.
glide
.
load
.
resource
.
bitmap
.
ImageHeaderParser
$
**
{
**
[]
$
VALUES
;
public
*
;
}
-
keep
public
class
*
extends
com
.
bumptech
.
glide
.
module
.
AppGlideModule
-
keep
class
com
.
bumptech
.
glide
.
GeneratedAppGlideModuleImpl
{
*
;
}
#alibaba arouter start
-
keep
public
class
com
.
alibaba
.
android
.
arouter
.
routes
.
**
{
*
;}
-
keep
public
class
com
.
alibaba
.
android
.
arouter
.
facade
.
**
{
*
;}
-
keep
class
*
implements
com
.
alibaba
.
android
.
arouter
.
facade
.
template
.
ISyringe
{
*
;}
# 如果使用了 byType 的方式获取 Service,需添加下面规则,保护接口
-
keep
interface
*
implements
com
.
alibaba
.
android
.
arouter
.
facade
.
template
.
IProvider
# 如果使用了 单类注入,即不定义接口实现 IProvider,需添加下面规则,保护实现
-
keep
class
*
implements
com
.
alibaba
.
android
.
arouter
.
facade
.
template
.
IProvider
#alibaba arouter end
#kotlinx start
-
keep
class
kotlinx
.
**
{
*
;
}
-
keep
class
kotlin
.
**
{
*
;
}
-
keepclassmembers
class
**
$
WhenMappings
{
<
fields
>
;
}
-
keepclassmembers
class
kotlin
.
Metadata
{
public
<
methods
>
;
}
-
assumenosideeffects
class
kotlin
.
jvm
.
internal
.
Intrinsics
{
static
void
checkParameterIsNotNull
(
java
.
lang
.
Object
,
java
.
lang
.
String
);
}
#kotlinx end
#9.22版本新增加混淆
-
keep
class
android
.
support
.
v7
.
widget
.
RecyclerView
{
*
;}
-
keepnames
class
android
.
support
.
v7
.
widget
.
RecyclerView
$
*
{
public
<
fields
>
;
public
<
methods
>
;
}
#android
-
keep
class
android
.
**
{
*
;}
-
keep
class
androidx
.
**
{
*
;}
-
keep
class
android
.
support
.
**
{
*
;}
-
keep
class
android
.
content
.
**
{
*
;}
-
keep
class
android
.
app
.
**
{
*
;}
-
keep
class
android
.
os
.
**
{
*
;}
-
keep
class
android
.
net
.
**
{
*
;}
-
keep
class
android
.
provider
.
**
{
*
;}
#com.github
-
keep
class
com
.
github
.
**
{
*
;}
#com.google
-
keep
class
com
.
google
.
**
{
*
;}
#org.
-
keep
class
org
.
**
{
*
;
}
app/src/main/AndroidManifest.xml
View file @
979e6844
...
...
@@ -20,6 +20,7 @@
android:exported=
"true"
android:hardwareAccelerated=
"true"
android:screenOrientation=
"landscape"
android:configChanges=
"orientation|screenSize|screenLayout|keyboardHidden"
android:theme=
"@style/MarqueeTheme"
android:label=
"@string/app_name"
>
<intent-filter>
...
...
@@ -31,6 +32,7 @@
<activity
android:name=
"com.ads.cal.marquee.MarqueeMActivity"
android:exported=
"true"
android:configChanges=
"orientation|screenSize|screenLayout|keyboardHidden"
android:hardwareAccelerated=
"true"
android:screenOrientation=
"landscape"
android:theme=
"@style/MarqueeTheme"
>
...
...
app/src/main/java/com/ads/cal/marquee/MarqueeMActivity.java
View file @
979e6844
...
...
@@ -9,8 +9,6 @@ import android.content.res.Configuration;
import
android.graphics.Color
;
import
android.os.Bundle
;
import
android.util.DisplayMetrics
;
import
android.util.Log
;
import
android.view.GestureDetector
;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
import
android.view.LayoutInflater
;
...
...
@@ -53,11 +51,39 @@ public class MarqueeMActivity extends Activity {
marqueeView
=
findViewById
(
R
.
id
.
mq
);
marqueeView
.
setLayerType
(
View
.
LAYER_TYPE_HARDWARE
,
null
);
marqueeView
.
startRun
(
1.8f
);
f
=
findViewById
(
R
.
id
.
f
);
FrameLayout
f
=
findViewById
(
R
.
id
.
f
);
marqueeView
.
setOnTouchListener
(
new
View
.
OnTouchListener
()
{
private
float
x
,
y
;
@Override
public
boolean
onTouch
(
View
view
,
MotionEvent
motionEvent
)
{
switch
(
motionEvent
.
getAction
())
{
case
MotionEvent
.
ACTION_DOWN
:
x
=
motionEvent
.
getX
();
y
=
motionEvent
.
getY
();
break
;
case
MotionEvent
.
ACTION_UP
:
if
(
isClick
(
x
,
y
,
motionEvent
.
getX
(),
motionEvent
.
getY
()))
{
showSetting
(
f
);
}
break
;
}
return
false
;
}
});
marqueeView
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
public
void
onClick
(
View
view
)
{
}
});
}
private
FrameLayout
f
;
private
boolean
isClick
(
float
startX
,
float
startY
,
float
endX
,
float
endY
)
{
// 设置一个点击范围,这里假设点击范围是10像素
float
touchSlop
=
20
;
// 判断起始点和抬起点的距离是否在点击范围内
return
Math
.
abs
(
endX
-
startX
)
<
touchSlop
&&
Math
.
abs
(
endY
-
startY
)
<
touchSlop
;
}
private
View
view
;
...
...
@@ -96,16 +122,6 @@ public class MarqueeMActivity extends Activity {
}
@Override
public
boolean
onTouchEvent
(
MotionEvent
event
)
{
return
true
;
}
@Override
public
boolean
dispatchTouchEvent
(
MotionEvent
ev
)
{
showSetting
(
f
);
return
true
;
}
private
void
initPopupWindowView
()
{
EditText
editText
=
view
.
findViewById
(
R
.
id
.
ed
);
...
...
@@ -220,6 +236,11 @@ public class MarqueeMActivity extends Activity {
});
}
@Override
public
void
onBackPressed
()
{
super
.
onBackPressed
();
}
@Override
public
void
onConfigurationChanged
(
@NonNull
Configuration
newConfig
)
{
super
.
onConfigurationChanged
(
newConfig
);
...
...
app/src/main/java/com/ads/cal/marquee/OpenActivity.java
View file @
979e6844
...
...
@@ -2,6 +2,7 @@ package com.ads.cal.marquee;
import
android.app.Activity
;
import
android.content.Intent
;
import
android.content.res.Configuration
;
import
android.os.Bundle
;
import
android.os.Handler
;
import
android.os.Message
;
...
...
@@ -46,6 +47,11 @@ public class OpenActivity extends Activity {
}
@Override
public
void
onConfigurationChanged
(
@NonNull
Configuration
newConfig
)
{
super
.
onConfigurationChanged
(
newConfig
);
}
Handler
handler
=
new
Handler
(
new
Handler
.
Callback
()
{
@Override
public
boolean
handleMessage
(
@NonNull
Message
message
)
{
...
...
app/src/main/res/layout/marquee_main_activity.xml
View file @
979e6844
...
...
@@ -10,9 +10,6 @@
<com.ads.cal.marquee.MarqueeView
android:id=
"@+id/mq"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:focusableInTouchMode=
"false"
android:focusable=
"false"
android:clickable=
"false"
/>
android:layout_height=
"match_parent"
/>
</FrameLayout>
\ No newline at end of file
app/src/main/res/layout/set_activity.xml
View file @
979e6844
...
...
@@ -150,6 +150,7 @@
android:gravity=
"center"
android:text=
"Privacy Policy"
android:textColor=
"#575151"
android:visibility=
"gone"
android:textSize=
"13sp"
/>
<TextView
...
...
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