Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_freeworld
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
android_freeworld
Commits
39843456
Commit
39843456
authored
Jul 09, 2021
by
张释方
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码提交
parent
584c5bec
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
705 additions
and
147 deletions
+705
-147
AboutusActivity.kt
...src/main/java/com/mints/street/main/my/AboutusActivity.kt
+15
-0
AboutusViewModel.kt
...rc/main/java/com/mints/street/main/my/AboutusViewModel.kt
+7
-0
MoresettingsActivity.kt
...ain/java/com/mints/street/main/my/MoresettingsActivity.kt
+16
-0
MoresettingsViewModel.kt
...in/java/com/mints/street/main/my/MoresettingsViewModel.kt
+8
-0
MyFragment.kt
app/src/main/java/com/mints/street/main/my/MyFragment.kt
+72
-2
pophidden.xml
app/src/main/res/anim/pophidden.xml
+11
-0
popshow_anim.xml
app/src/main/res/anim/popshow_anim.xml
+12
-0
activity_aboutus.xml
app/src/main/res/layout/activity_aboutus.xml
+10
-0
activity_moresettings.xml
app/src/main/res/layout/activity_moresettings.xml
+8
-0
fragment_my.xml
app/src/main/res/layout/fragment_my.xml
+100
-12
item_fragment_main_my_title.xml
app/src/main/res/layout/item_fragment_main_my_title.xml
+261
-0
layout_popupwindow.xml
app/src/main/res/layout/layout_popupwindow.xml
+47
-0
bg_right.png
app/src/main/res/mipmap-xhdpi/bg_right.png
+0
-0
iv_about_us.png
app/src/main/res/mipmap-xhdpi/iv_about_us.png
+0
-0
iv_more_settings.png
app/src/main/res/mipmap-xhdpi/iv_more_settings.png
+0
-0
styles.xml
app/src/main/res/values/styles.xml
+6
-1
version.properties
library_base/version.properties
+2
-2
compile-file-map.properties
...emental/packageDebugResources/compile-file-map.properties
+62
-62
merger.xml
...ntermediates/incremental/packageDebugResources/merger.xml
+68
-68
No files found.
app/src/main/java/com/mints/street/main/my/AboutusActivity.kt
0 → 100644
View file @
39843456
package
com.mints.street.main.my
import
android.os.Bundle
import
com.mints.street.databinding.ActivityAboutusBinding
import
com.fry.base.base.BaseActivity
import
com.mints.street.BR
import
com.mints.street.R
class
AboutusActivity
:
BaseActivity
<
ActivityAboutusBinding
,
AboutusViewModel
>()
{
override
fun
initVariableId
()
=
BR
.
viewModel
override
fun
initContentView
(
savedInstanceState
:
Bundle
?)=
R
.
layout
.
activity_aboutus
}
app/src/main/java/com/mints/street/main/my/AboutusViewModel.kt
0 → 100644
View file @
39843456
package
com.mints.street.main.my
import
android.app.Application
import
me.goldze.mvvmhabit.base.BaseViewModel
class
AboutusViewModel
(
application
:
Application
):
BaseViewModel
(
application
)
{
}
\ No newline at end of file
app/src/main/java/com/mints/street/main/my/MoresettingsActivity.kt
0 → 100644
View file @
39843456
package
com.mints.street.main.my
import
android.os.Bundle
import
com.fry.base.base.BaseActivity
import
com.mints.street.BR
import
com.mints.street.R
import
com.mints.street.databinding.ActivityMoresettingsBinding
class
MoresettingsActivity
:
BaseActivity
<
ActivityMoresettingsBinding
,
MoresettingsViewModel
>()
{
override
fun
initVariableId
()
=
BR
.
viewModel
override
fun
initContentView
(
savedInstanceState
:
Bundle
?)=
R
.
layout
.
activity_moresettings
}
app/src/main/java/com/mints/street/main/my/MoresettingsViewModel.kt
0 → 100644
View file @
39843456
package
com.mints.street.main.my
import
android.app.Application
import
me.goldze.mvvmhabit.base.BaseViewModel
class
MoresettingsViewModel
(
application
:
Application
):
BaseViewModel
(
application
)
{
}
app/src/main/java/com/mints/street/main/my/MyFragment.kt
View file @
39843456
package
com.mints.street.main.my
package
com.mints.street.main.my
import
android.graphics.drawable.BitmapDrawable
import
android.os.Bundle
import
android.os.Bundle
import
android.view.Gravity
import
android.view.LayoutInflater
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
android.widget.PopupWindow
import
androidx.activity.OnBackPressedCallback
import
com.fry.base.base.BaseFragment
import
com.fry.base.base.BaseFragment
import
com.mints.street.BR
import
com.mints.street.BR
import
com.mints.street.R
import
com.mints.street.R
import
com.mints.street.databinding.FragmentMyBinding
import
com.mints.street.databinding.FragmentMyBinding
import
kotlinx.android.synthetic.main.fragment_my.*
/**
/**
* Created by 冯瑞雨 on 2021/7/2.
* Created by 冯瑞雨 on 2021/7/2.
* 个人中心页面
* 个人中心页面
*/
*/
class
MyFragment
:
BaseFragment
<
FragmentMyBinding
,
MyViewModel
>()
{
class
MyFragment
:
BaseFragment
<
FragmentMyBinding
,
MyViewModel
>(),
View
.
OnClickListener
{
private
var
popupWindow
:
PopupWindow
?
=
null
private
var
contentView
:
View
?
=
null
override
fun
initContentView
(
inflater
:
LayoutInflater
?,
override
fun
initContentView
(
inflater
:
LayoutInflater
?,
container
:
ViewGroup
?,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?)
=
R
.
layout
.
fragment_my
savedInstanceState
:
Bundle
?)
=
R
.
layout
.
fragment_my
override
fun
initVariableId
()
=
BR
.
viewModel
override
fun
initVariableId
()
=
BR
.
viewModel
}
override
fun
initData
()
{
super
.
initData
()
ly_aboutus
.
setOnClickListener
(
this
)
ly_moresettings
.
setOnClickListener
(
this
)
requireActivity
().
onBackPressedDispatcher
.
addCallback
(
this
,
object
:
OnBackPressedCallback
(
true
)
{
override
fun
handleOnBackPressed
()
{
//监听到后要执行的逻辑
if
(
popupWindow
!=
null
&&
popupWindow
!!
.
isShowing
())
{
popupWindow
?.
dismiss
();
}
}
})
}
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
R
.
id
.
ly_aboutus
->
{
startActivity
(
AboutusActivity
::
class
.
java
)
}
R
.
id
.
ly_moresettings
->
{
startActivity
(
MoresettingsActivity
::
class
.
java
)
}
R
.
id
.
ll_my_login
->
{
//这里需要加判断
showPopwindow
();
}
}
}
private
fun
showPopwindow
()
{
//加载弹出框的布局
contentView
=
LayoutInflater
.
from
(
context
).
inflate
(
R
.
layout
.
layout_popupwindow
,
null
);
// 设置按钮的点击事件
popupWindow
=
PopupWindow
(
contentView
,
ViewGroup
.
LayoutParams
.
MATCH_PARENT
,
ViewGroup
.
LayoutParams
.
WRAP_CONTENT
)
popupWindow
!!
.
isFocusable
=
true
// 取得焦点
//注意 要是点击外部空白处弹框消息 那么必须给弹框设置一个背景色 不然是不起作用的
//注意 要是点击外部空白处弹框消息 那么必须给弹框设置一个背景色 不然是不起作用的
popupWindow
!!
.
setBackgroundDrawable
(
BitmapDrawable
())
//点击外部消失
//点击外部消失
popupWindow
!!
.
isOutsideTouchable
=
true
//设置可以点击
//设置可以点击
popupWindow
!!
.
isTouchable
=
true
//进入退出的动画,指定刚才定义的style
//进入退出的动画,指定刚才定义的style
popupWindow
!!
.
animationStyle
=
R
.
style
.
ipopwindow_anim_style
}
fun
openPopWindow
(
v
:
View
?)
{
//从底部显示
popupWindow
!!
.
showAtLocation
(
contentView
,
Gravity
.
BOTTOM
,
0
,
0
)
}
}
\ No newline at end of file
app/src/main/res/anim/pophidden.xml
0 → 100644
View file @
39843456
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<translate
android:duration=
"800"
android:fromYDelta=
"0"
android:toYDelta=
"50%p"
/>
<alpha
android:duration=
"1000"
android:fromAlpha=
"1.0"
android:toAlpha=
"0.0"
/>
</set>
\ No newline at end of file
app/src/main/res/anim/popshow_anim.xml
0 → 100644
View file @
39843456
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<translate
android:duration=
"800"
android:fromYDelta=
"100%p"
android:toYDelta=
"0"
/>
<alpha
android:duration=
"500"
android:fromAlpha=
"0.0"
android:toAlpha=
"1.0"
/>
</set>
\ No newline at end of file
app/src/main/res/layout/activity_aboutus.xml
0 → 100644
View file @
39843456
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<variable
name=
"ViewModel"
type=
"com.mints.street.main.my.AboutusViewModel"
/>
</data>
</layout>
\ No newline at end of file
app/src/main/res/layout/activity_moresettings.xml
0 → 100644
View file @
39843456
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<data>
<variable
name=
"ViewModel"
type=
"com.mints.street.main.my.MoresettingsViewModel"
/>
</data>
</layout>
\ No newline at end of file
app/src/main/res/layout/fragment_my.xml
View file @
39843456
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<data>
<data>
<variable
<variable
name=
"ViewModel"
name=
"ViewModel"
type=
"com.mints.street.main.my.MyViewModel"
/>
type=
"com.mints.street.main.my.MyViewModel"
/>
</data>
</data>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
android:id=
"@+id/llMyRoot"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"wrap_content"
<TextView
android:orientation=
"vertical"
>
android:layout_width=
"wrap_content"
<include
layout=
"@layout/item_fragment_main_my_title"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
app:layout_constraintTop_toTopOf=
"parent"
android:layout_marginStart=
"15dp"
app:layout_constraintStart_toStartOf=
"parent"
android:layout_marginTop=
"19dp"
android:text=
"个人中心"
android:layout_marginEnd=
"15dp"
android:textColor=
"@color/black"
android:background=
"@drawable/shape_gold_card"
android:textSize=
"39dp"
android:elevation=
"10dp"
/>
android:orientation=
"vertical"
>
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id=
"@+id/ly_aboutus"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<ImageView
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_alignParentLeft=
"true"
android:layout_marginStart=
"15dp"
android:layout_marginTop=
"20dp"
android:src=
"@mipmap/iv_about_us"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:layout_marginTop=
"18dp"
android:layout_weight=
"1"
android:text=
"关于我们"
android:textColor=
"@color/black"
android:textSize=
"18sp"
/>
<ImageView
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"20dp"
android:layout_marginEnd=
"11dp"
android:src=
"@mipmap/bg_right"
/>
</LinearLayout>
<View
android:layout_width=
"328pt"
android:layout_height=
"1dp"
android:layout_marginStart=
"13dp"
android:layout_marginTop=
"10dp"
android:layout_marginEnd=
"14dp"
android:background=
"#979797"
/>
<LinearLayout
android:id=
"@+id/ly_moresettings"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<ImageView
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_alignParentLeft=
"true"
android:layout_marginStart=
"15dp"
android:layout_marginTop=
"20dp"
android:src=
"@mipmap/iv_more_settings"
/>
<TextView
android:id=
"@+id/tv1"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:layout_marginTop=
"18dp"
android:layout_weight=
"1"
android:text=
"更多设置"
android:textColor=
"@color/black"
android:textSize=
"18sp"
/>
<ImageView
android:layout_width=
"20dp"
android:layout_height=
"20dp"
android:layout_alignParentEnd=
"true"
android:layout_marginTop=
"20dp"
android:layout_marginEnd=
"11dp"
android:layout_marginBottom=
"20dp"
android:src=
"@mipmap/bg_right"
/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</layout>
</layout>
\ No newline at end of file
app/src/main/res/layout/item_fragment_main_my_title.xml
0 → 100644
View file @
39843456
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/layout_popupwindow.xml
0 → 100644
View file @
39843456
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#553b3a3a"
>
<LinearLayout
android:id=
"@+id/content"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:background=
"@android:color/white"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/open_from_camera"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:gravity=
"center"
android:padding=
"8dp"
android:text=
"相机"
android:textColor=
"#333"
android:textSize=
"15sp"
/>
<TextView
android:id=
"@+id/open_album"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:layout_marginTop=
"1dp"
android:gravity=
"center"
android:padding=
"8dp"
android:text=
"打开图库"
android:textColor=
"#333"
android:textSize=
"15sp"
/>
<TextView
android:id=
"@+id/cancel"
android:layout_width=
"match_parent"
android:layout_height=
"40dp"
android:layout_marginTop=
"1dp"
android:gravity=
"center"
android:padding=
"8dp"
android:text=
"取消"
android:textColor=
"#333"
android:textSize=
"15sp"
/>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/mipmap-xhdpi/bg_right.png
0 → 100644
View file @
39843456
1.15 KB
app/src/main/res/mipmap-xhdpi/iv_about_us.png
0 → 100644
View file @
39843456
2.58 KB
app/src/main/res/mipmap-xhdpi/iv_more_settings.png
0 → 100644
View file @
39843456
1.96 KB
app/src/main/res/values/styles.xml
View file @
39843456
...
@@ -139,7 +139,12 @@
...
@@ -139,7 +139,12 @@
<item
name=
"android:layout_height"
>
1px
</item>
<item
name=
"android:layout_height"
>
1px
</item>
<item
name=
"android:background"
>
#d3d3d3
</item>
<item
name=
"android:background"
>
#d3d3d3
</item>
</style>
</style>
<style
name=
"ipopwindow_anim_style"
>
<item
name=
"android:windowEnterAnimation"
>
@anim/popshow_anim
</item>
<!-- 指定显示的动画xml -->
<item
name=
"android:windowExitAnimation"
>
@anim/pophidden
</item>
<!-- 指定消失的动画xml -->
</style>
</resources>
</resources>
\ No newline at end of file
library_base/version.properties
View file @
39843456
#
Thu Jul 08 18:38:3
9 CST 2021
#
Fri Jul 09 14:31:2
9 CST 2021
VERSION_BUILD
=
2
597
VERSION_BUILD
=
2
603
shareSdkLib/build/intermediates/incremental/packageDebugResources/compile-file-map.properties
View file @
39843456
This diff is collapsed.
Click to expand it.
shareSdkLib/build/intermediates/incremental/packageDebugResources/merger.xml
View file @
39843456
This diff is collapsed.
Click to expand it.
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