Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StatInfo_1
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
chenyuling
StatInfo_1
Commits
d2ea35d7
Commit
d2ea35d7
authored
Sep 26, 2023
by
chenyuling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"更换UI-1"
parent
1212e6be
Pipeline
#1621
canceled with stages
Changes
6
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1185 additions
and
0 deletions
+1185
-0
MainActivity.java
...rc/main/java/com/srthinker/statinfo/uis/MainActivity.java
+451
-0
SettingActivity.java
...java/com/srthinker/statinfo/uis/news/SettingActivity.java
+471
-0
NewGroupView.java
...main/java/com/srthinker/statinfo/wedget/NewGroupView.java
+50
-0
activity_new_main.xml
app/src/main/res/layout/activity_new_main.xml
+41
-0
activity_setting.xml
app/src/main/res/layout/activity_setting.xml
+148
-0
item_group_new.xml
app/src/main/res/layout/item_group_new.xml
+24
-0
No files found.
app/src/main/java/com/srthinker/statinfo/uis/MainActivity.java
0 → 100644
View file @
d2ea35d7
This diff is collapsed.
Click to expand it.
app/src/main/java/com/srthinker/statinfo/uis/news/SettingActivity.java
0 → 100644
View file @
d2ea35d7
This diff is collapsed.
Click to expand it.
app/src/main/java/com/srthinker/statinfo/wedget/NewGroupView.java
0 → 100644
View file @
d2ea35d7
package
com
.
srthinker
.
statinfo
.
wedget
;
import
android.annotation.SuppressLint
;
import
android.content.Context
;
import
android.util.AttributeSet
;
import
android.util.TypedValue
;
import
android.view.LayoutInflater
;
import
android.widget.LinearLayout
;
import
androidx.annotation.Nullable
;
import
com.srthinker.statinfo.databinding.ItemGroupNewBinding
;
public
class
NewGroupView
extends
LinearLayout
{
private
Context
context
;
private
com
.
srthinker
.
statinfo
.
databinding
.
ItemGroupNewBinding
mBinding
;
public
NewGroupView
(
Context
context
)
{
super
(
context
);
}
public
NewGroupView
(
Context
context
,
@Nullable
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
this
.
context
=
context
;
initView
(
context
);
}
private
void
initView
(
Context
context
)
{
mBinding
=
ItemGroupNewBinding
.
inflate
(
LayoutInflater
.
from
(
context
),
this
,
true
);
}
@SuppressLint
(
"SetTextI18n"
)
public
void
initItem
(
String
name
,
int
number
,
float
textSize
){
mBinding
.
tvGroupName
.
setText
(
name
+
":"
);
mBinding
.
tvGroupNumber
.
setText
(
number
+
""
);
mBinding
.
tvGroupName
.
setTextSize
(
TypedValue
.
COMPLEX_UNIT_SP
,
textSize
);
mBinding
.
tvGroupNumber
.
setTextSize
(
TypedValue
.
COMPLEX_UNIT_SP
,
textSize
);
}
public
void
initItem
(
String
name
,
int
number
){
mBinding
.
tvGroupName
.
setText
(
name
+
":"
);
mBinding
.
tvGroupNumber
.
setText
(
number
+
""
);
}
public
void
setNumber
(
int
number
){
mBinding
.
tvGroupNumber
.
setText
(
number
+
""
);
}
}
app/src/main/res/layout/activity_new_main.xml
0 → 100644
View file @
d2ea35d7
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
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:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/black"
tools:context=
".uis.MainActivity"
>
<TextView
android:id=
"@+id/tv_setting"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
" "
android:textColor=
"@color/white"
android:textSize=
"40sp"
android:layout_alignParentRight=
"true"
/>
<LinearLayout
android:orientation=
"vertical"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"20dp"
android:layout_centerVertical=
"true"
>
<com.srthinker.statinfo.wedget.NewGroupView
android:id=
"@+id/ngv_build"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<com.srthinker.statinfo.wedget.NewGroupView
android:id=
"@+id/ngv_waterproof"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<com.srthinker.statinfo.wedget.NewGroupView
android:id=
"@+id/ngv_outrigger"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
<com.srthinker.statinfo.wedget.NewGroupView
android:id=
"@+id/ngv_supervisor"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
/>
</LinearLayout>
</RelativeLayout>
\ No newline at end of file
app/src/main/res/layout/activity_setting.xml
0 → 100644
View file @
d2ea35d7
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
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:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:focusable=
"true"
android:focusableInTouchMode=
"true"
android:orientation=
"vertical"
android:background=
"@color/bg_070A2E"
tools:context=
".uis.news.SettingActivity"
>
<ImageView
android:id=
"@+id/iv_back"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/ic_back"
android:padding=
"10dp"
/>
<LinearLayout
android:layout_width=
"255.5dp"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_shape"
android:layout_marginLeft=
"15dp"
android:padding=
"15dp"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/white"
android:text=
"进出配置"
android:textSize=
"@dimen/text_10"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/line_bottom"
android:layout_marginTop=
"5dp"
/>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"17dp"
>
<TextView
android:id=
"@+id/tv_enter_text"
android:layout_width=
"60dp"
android:layout_height=
"22dp"
android:gravity=
"center"
android:text=
"进入设备"
android:textColor=
"@color/white"
android:textSize=
"@dimen/text_10"
android:background=
"@color/color_00A89C"
android:layout_alignParentLeft=
"true"
/>
<TextView
android:id=
"@+id/tv_enter_error"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"!"
android:textColor=
"@color/white"
android:textSize=
"@dimen/text_12_5"
android:layout_toRightOf=
"@+id/tv_enter_text"
android:layout_alignBottom=
"@+id/tv_enter_text"
android:visibility=
"visible"
android:layout_marginLeft=
"5dp"
/>
<TextView
android:id=
"@+id/tv_leave_text"
android:layout_width=
"60dp"
android:layout_height=
"22dp"
android:gravity=
"center"
android:text=
"出口设备"
android:textColor=
"@color/white"
android:textSize=
"@dimen/text_10"
android:background=
"@color/color_2D52E3"
android:layout_alignParentRight=
"true"
/>
<TextView
android:id=
"@+id/tv_leave_error"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"!"
android:textColor=
"@color/white"
android:textSize=
"@dimen/text_12_5"
android:layout_toLeftOf=
"@+id/tv_leave_text"
android:layout_alignBottom=
"@+id/tv_leave_text"
android:visibility=
"visible"
android:layout_marginRight=
"5dp"
/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"255.5dp"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_shape"
android:layout_marginLeft=
"15dp"
android:padding=
"15dp"
android:layout_marginTop=
"15dp"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/white"
android:text=
"人员信息"
android:textSize=
"@dimen/text_10"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/line_bottom"
android:layout_marginTop=
"5dp"
/>
<Button
android:id=
"@+id/btn_group_detail"
android:layout_width=
"60dp"
android:layout_height=
"22dp"
android:background=
"@color/color_2D52E3"
android:layout_alignParentRight=
"true"
android:layout_marginRight=
"8dp"
android:layout_marginTop=
"17dp"
android:gravity=
"center"
android:text=
"人员详情"
android:textColor=
"@color/white"
android:textSize=
"@dimen/text_10"
/>
</LinearLayout>
<LinearLayout
android:layout_width=
"255.5dp"
android:layout_height=
"wrap_content"
android:background=
"@drawable/bg_shape"
android:layout_marginLeft=
"15dp"
android:padding=
"15dp"
android:layout_marginTop=
"15dp"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/white"
android:text=
"设备信息"
android:textSize=
"@dimen/text_10"
/>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/line_bottom"
android:layout_marginTop=
"5dp"
/>
<TextView
android:id=
"@+id/tv_device_desc"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:gravity=
"left|center"
android:layout_marginTop=
"17dp"
android:textColor=
"@color/white"
android:textSize=
"@dimen/text_10"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/item_group_new.xml
0 → 100644
View file @
d2ea35d7
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<TextView
android:id=
"@+id/tv_group_name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textStyle=
"bold"
android:text=
""
android:textColor=
"@color/red"
android:gravity=
"center|left"
android:textSize=
"@dimen/display_text"
/>
<TextView
android:id=
"@+id/tv_group_number"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textStyle=
"bold"
android:text=
""
android:textColor=
"@color/red"
android:gravity=
"center|left"
android:textSize=
"@dimen/display_text"
/>
</LinearLayout>
\ 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