Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MiYaFastCashier
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangjiantao
MiYaFastCashier
Commits
7a78f29f
Commit
7a78f29f
authored
Jan 13, 2022
by
jiangjiantao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev
parent
abe032ae
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
60 deletions
+64
-60
AndroidManifest.xml
app/src/main/AndroidManifest.xml
+1
-1
LoginService.kt
...rc/main/java/com/miya/fastcashier/service/LoginService.kt
+1
-1
MainActivity.kt
...rc/main/java/com/miya/fastcashier/ui/main/MainActivity.kt
+21
-0
MainFragment.kt
...rc/main/java/com/miya/fastcashier/ui/main/MainFragment.kt
+0
-33
MainViewModel.kt
...main/java/com/miya/fastcashier/viewmodel/MainViewModel.kt
+1
-1
main_activity.xml
app/src/main/res/layout/main_activity.xml
+40
-4
main_fragment.xml
app/src/main/res/layout/main_fragment.xml
+0
-20
No files found.
app/src/main/AndroidManifest.xml
View file @
7a78f29f
...
...
@@ -24,7 +24,7 @@
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
<activity
android:name=
".MainActivity"
/>
<activity
android:name=
".
ui.main.
MainActivity"
/>
<activity
android:name=
".ui.splash.SplashActivity"
/>
</application>
...
...
app/src/main/java/com/miya/fastcashier/service/LoginService.kt
View file @
7a78f29f
...
...
@@ -20,7 +20,7 @@ interface LoginService {
companion
object
{
private
const
val
BASE_URL
=
"https://hhms
pre
.miyapay.com/"
private
const
val
BASE_URL
=
"https://hhms.miyapay.com/"
private
var
service
:
LoginService
?
=
null
...
...
app/src/main/java/com/miya/fastcashier/MainActivity.kt
→
app/src/main/java/com/miya/fastcashier/
ui/main/
MainActivity.kt
View file @
7a78f29f
package
com.miya.fastcashier
package
com.miya.fastcashier
.ui.main
import
androidx.appcompat.app.AppCompatActivity
import
android.os.Bundle
import
com.miya.fastcashier.ui.main.MainFragment
import
androidx.lifecycle.ViewModelProvider
import
com.miya.fastcashier.R
import
com.miya.fastcashier.viewmodel.MainViewModel
class
MainActivity
:
AppCompatActivity
()
{
private
lateinit
var
viewModel
:
MainViewModel
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
setContentView
(
R
.
layout
.
main_activity
)
if
(
savedInstanceState
==
null
)
{
supportFragmentManager
.
beginTransaction
()
.
replace
(
R
.
id
.
container
,
MainFragment
.
newInstance
())
.
commitNow
()
}
viewModel
=
ViewModelProvider
(
this
).
get
(
MainViewModel
::
class
.
java
)
}
}
\ No newline at end of file
app/src/main/java/com/miya/fastcashier/ui/main/MainFragment.kt
deleted
100644 → 0
View file @
abe032ae
package
com.miya.fastcashier.ui.main
import
androidx.lifecycle.ViewModelProvider
import
android.os.Bundle
import
androidx.fragment.app.Fragment
import
android.view.LayoutInflater
import
android.view.View
import
android.view.ViewGroup
import
com.miya.fastcashier.R
class
MainFragment
:
Fragment
()
{
companion
object
{
fun
newInstance
()
=
MainFragment
()
}
private
lateinit
var
viewModel
:
MainViewModel
override
fun
onCreateView
(
inflater
:
LayoutInflater
,
container
:
ViewGroup
?,
savedInstanceState
:
Bundle
?
):
View
{
return
inflater
.
inflate
(
R
.
layout
.
main_fragment
,
container
,
false
)
}
override
fun
onActivityCreated
(
savedInstanceState
:
Bundle
?)
{
super
.
onActivityCreated
(
savedInstanceState
)
viewModel
=
ViewModelProvider
(
this
).
get
(
MainViewModel
::
class
.
java
)
// TODO: Use the ViewModel
}
}
\ No newline at end of file
app/src/main/java/com/miya/fastcashier/
ui/main
/MainViewModel.kt
→
app/src/main/java/com/miya/fastcashier/
viewmodel
/MainViewModel.kt
View file @
7a78f29f
package
com.miya.fastcashier.
ui.main
package
com.miya.fastcashier.
viewmodel
import
androidx.lifecycle.ViewModel
...
...
app/src/main/res/layout/main_activity.xml
View file @
7a78f29f
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/
container
"
android:id=
"@+id/
main
"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".MainActivity"
/>
\ No newline at end of file
android:layout_height=
"match_parent"
>
<TextView
android:id=
"@+id/tvPay"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"定额收款"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.498"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.258"
/>
<TextView
android:id=
"@+id/tvRefund"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"退款"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tvPrint"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"打印上一单"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.501"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintVertical_bias=
"0.723"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/main_fragment.xml
deleted
100644 → 0
View file @
abe032ae
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/main"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
".ui.main.MainFragment"
>
<TextView
android:id=
"@+id/message"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"MainFragment"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ 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