current position:Home>Android enterprise combat - Interface - 5
Android enterprise combat - Interface - 5
2022-01-27 04:17:51 【Jimeng doesn't eat fish】
This is my participation 8 The fourth of the yuegengwen challenge 17 God , Check out the activity details :8 Yuegengwen challenge
List of articles
Android Enterprise level actual combat - Interface -5
Ji Meng's creation is not easy , Other platforms that are not settled shall be handled according to the rules of the agreement .
Preface
Some fans have just joined the company for internship , Want one Android Layout of live broadcast authentication interface , So the fifth article in this series
The following is the main body of this article
One 、 Let's take a look at the effect of implementation
Two 、 Preparation before implementation
1.dimens.xml The contents of the document ( The same file as the first case )
No more words , Please take it from the first article
2.ids.xml The contents of the document ( This case is available )
<item type="id" name="title_bar"/>
<item type="id" name="back_icon"/>
<item type="id" name="apply_info_layout"/>
<item type="id" name="blog_avtar"/>
<item type="id" name="tip"/>
<item type="id" name="nickname"/>
<item type="id" name="edit_name"/>
<item type="id" name="edit_id"/>
<item type="id" name="edit_phone"/>
<item type="id" name="next"/>
<item type="id" name="agreement_check"/>
<item type="id" name="apply_result_layout"/>
<item type="id" name="auth_tip"/>
<item type="id" name="confirm"/>
<item type="id" name="agreement"/>
Copy code
3.colors.xml The contents of the document ( This case is available )
<color name="jimeng_text_tertiary_light">#ffb2b2b2</color>
<color name="jimeng_green_light">#ff14c4bc</color>
<color name="jimeng_gray02">@color/jimeng_text_tertiary_light</color>
<color name="jimeng_brand_highlight_color">@color/jimeng_green_light</color>
<color name="jimeng_gray07">@color/jimeng_background_secondary_light</color>
<color name="jimeng_gray06">@color/jimeng_background_secondary_light</color>
<color name="jimeng_brand_highlight_color_7f">#7f4eb7ba</color>
Copy code
4.strings.xml The contents of the document ( This case is available )
<string name="detection_auth"> Real name authentication </string>
<string name="detection_auth_tip"> According to relevant regulations , You need to pass the real name authentication to open the live studio </string>
<string name="detection_auth_name_hint"> Please enter your real name </string>
<string name="detection_auth_phone_hint"> Please enter your mobile number </string>
<string name="detection_auth_id_hint"> Please enter the ID number </string>
<string name="detection_auth_start_facedetection"> Start face authentication </string>
<string name="detection_agreement"> agree! 《 Real name authentication protocol for live broadcast on Jimeng platform 》</string>
<string name="auth_tip_success"> You have passed the real name certification </string>
Copy code
5.back_nav_selector.xml
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/navbar_icon_back_light" />
</selector>
Copy code
6.shape_detection_input_bg.xml
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle"
xmlns:android="http://schemas.android.com/apk/res/android">
<size android:height="65.0dip" android:width="100.0dip" />
<solid android:color="@color/jimeng_gray07" />
<corners android:radius="32.5dip" />
</shape>
Copy code
3、 ... and 、 Realization
1. Top bar
<RelativeLayout
android:id="@id/title_bar"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@id/back_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16.0dip"
android:src="@drawable/back_nav_selector" />
<TextView
android:id="@id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="@string/detection_auth"
android:textColor="@color/jimeng_black"
android:textSize="18.0dip" />
</RelativeLayout>
Copy code
The renderings are as follows :
2. Head portrait and name
<ImageView
android:id="@id/blog_avtar"
android:layout_width="80.0dip"
android:layout_height="80.0dip"
android:src="@drawable/venda_default_icon_jimeng"
android:layout_gravity="center_horizontal"
android:layout_marginTop="24.0dip"
android:scaleType="centerCrop" />
<TextView
android:id="@id/nickname"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="24.0dip"
android:layout_marginTop="10.0dip"
android:layout_marginRight="24.0dip"
android:gravity="center_horizontal"
android:text=" Jimeng doesn't eat fish "
android:textColor="@color/jimeng_black"
android:textSize="18.0sp" />
Copy code
The renderings are as follows :
3. Information input field ( Take one as an example )
<EditText
android:id="@id/edit_id"
android:layout_width="fill_parent"
android:layout_height="65.0dip"
android:layout_marginLeft="24.0dip"
android:layout_marginTop="12.0dip"
android:layout_marginRight="24.0dip"
android:background="@drawable/shape_detection_input_bg"
android:gravity="center_vertical"
android:hint="@string/detection_auth_id_hint"
android:paddingLeft="24.0dip"
android:paddingRight="24.0dip"
android:singleLine="true"
android:textColor="@color/jimeng_black"
android:textColorHint="@color/jimeng_gray03"
android:textSize="18.0sp" />
Copy code
The renderings are as follows :
4.CheckBox+TextView
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24.0dip"
android:layout_marginTop="24.0dip"
android:layout_marginRight="24.0dip"
android:gravity="center_vertical"
android:orientation="horizontal">
<CheckBox
android:id="@id/agreement_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:paddingRight="4.0dip" />
<TextView
android:id="@id/agreement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/detection_agreement"
android:textColor="@color/jimeng_gray02"
android:textSize="12.0sp" />
</LinearLayout>
Copy code
The renderings are as follows :
Four . Source code
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/jimeng_white">
<RelativeLayout
android:id="@id/title_bar"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@id/back_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16.0dip"
android:src="@drawable/back_nav_selector" />
<TextView
android:id="@id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:text="@string/detection_auth"
android:textColor="@color/jimeng_black"
android:textSize="18.0dip" />
</RelativeLayout>
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@id/title_bar"
android:overScrollMode="never"
android:scrollbars="none">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:id="@id/apply_info_layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:visibility="visible">
<ImageView
android:id="@id/blog_avtar"
android:layout_width="80.0dip"
android:layout_height="80.0dip"
android:src="@drawable/venda_default_icon_jimeng"
android:layout_gravity="center_horizontal"
android:layout_marginTop="24.0dip"
android:scaleType="centerCrop" />
<TextView
android:id="@id/nickname"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="24.0dip"
android:layout_marginTop="10.0dip"
android:layout_marginRight="24.0dip"
android:gravity="center_horizontal"
android:text=" Jimeng doesn't eat fish "
android:textColor="@color/jimeng_black"
android:textSize="18.0sp" />
<TextView
android:id="@id/tip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="24.0dip"
android:text="@string/detection_auth_tip"
android:textColor="@color/jimeng_gray02"
android:textSize="13.0sp" />
<EditText
android:id="@id/edit_name"
android:layout_width="fill_parent"
android:layout_height="65.0dip"
android:layout_marginLeft="24.0dip"
android:layout_marginTop="24.0dip"
android:layout_marginRight="24.0dip"
android:background="@drawable/shape_detection_input_bg"
android:gravity="center_vertical"
android:hint="@string/detection_auth_name_hint"
android:paddingLeft="24.0dip"
android:paddingRight="24.0dip"
android:singleLine="true"
android:textColor="@color/jimeng_black"
android:textColorHint="@color/jimeng_gray03"
android:textSize="18.0sp" />
<EditText
android:id="@id/edit_id"
android:layout_width="fill_parent"
android:layout_height="65.0dip"
android:layout_marginLeft="24.0dip"
android:layout_marginTop="12.0dip"
android:layout_marginRight="24.0dip"
android:background="@drawable/shape_detection_input_bg"
android:gravity="center_vertical"
android:hint="@string/detection_auth_id_hint"
android:paddingLeft="24.0dip"
android:paddingRight="24.0dip"
android:singleLine="true"
android:textColor="@color/jimeng_black"
android:textColorHint="@color/jimeng_gray03"
android:textSize="18.0sp" />
<EditText
android:id="@id/edit_phone"
android:layout_width="fill_parent"
android:layout_height="65.0dip"
android:layout_marginLeft="24.0dip"
android:layout_marginTop="12.0dip"
android:layout_marginRight="24.0dip"
android:background="@drawable/shape_detection_input_bg"
android:gravity="center_vertical"
android:hint="@string/detection_auth_phone_hint"
android:paddingLeft="24.0dip"
android:paddingRight="24.0dip"
android:singleLine="true"
android:textColor="@color/jimeng_black"
android:textColorHint="@color/jimeng_gray03"
android:textSize="18.0sp" />
<TextView
android:id="@id/next"
android:layout_width="fill_parent"
android:layout_height="50.0dip"
android:layout_marginLeft="24.0dip"
android:layout_marginTop="24.0dip"
android:layout_marginRight="24.0dip"
android:background="@drawable/selector_apply_info_next_bg"
android:enabled="false"
android:gravity="center"
android:text="@string/detection_auth_start_facedetection"
android:textColor="@color/jimeng_gray03"
android:textSize="18.0sp" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="24.0dip"
android:layout_marginTop="24.0dip"
android:layout_marginRight="24.0dip"
android:gravity="center_vertical"
android:orientation="horizontal">
<CheckBox
android:id="@id/agreement_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false"
android:paddingRight="4.0dip" />
<TextView
android:id="@id/agreement"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:text="@string/detection_agreement"
android:textColor="@color/jimeng_gray02"
android:textSize="12.0sp" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>
Copy code
Be careful
In this interface, you can write a hidden layout , When the user enters this interface after authentication, this layout will be displayed gone, The authenticated prompt layout is then displayed .
summary
Welcome to leave a message , If you have any questions, you can have a private chat with Ji Meng ( When you see the news, go back to ), If you want Jimeng to update an interface article, you can also chat privately , See you in the next article .
copyright notice
author[Jimeng doesn't eat fish],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/01/202201270417491679.html
The sidebar is recommended
- Spring IOC container loading process
- [thinking] the difference between singleton mode and static method - object-oriented programming
- Hadoop environment setup (MySQL environment configuration)
- 10 minutes, using node JS creates a real-time early warning system for bad weather!
- Git tool
- Force deduction algorithm - 92 Reverse linked list II
- What is the sub problem of dynamic programming?
- C / C + +: static keyword summary
- Idea does not have the artifacts option when configuring Tomcat
- Anaconda can't open it
guess what you like
-
I don't know how to start this
-
Matlab simulation of transportation optimization algorithm based on PSO
-
MySQL slow log optimization
-
[Vue] as the window is stretched (larger, smaller, wider and higher), the text will not be displayed
-
Popular Linux distributions for embedded computing
-
Suzhou computer research
-
After installing SSL Certificate in Windows + tomcat, the domain name request is not successful. Please answer!!
-
Implementation time output and greetings of jQuery instance
-
The 72 year old uncle became popular. Wu Jing and Guo fan made his story into a film, which made countless dreamers blush
-
How to save computer research
Random recommended
- Springboot implements excel import and export, which is easy to use, and poi can be thrown away
- The final examination subjects of a class are mathematical programming, and the scores are sorted and output from high to low
- Two pronged approach, Tsinghua Professor Pro code JDK and hotspot source code notes, one-time learning to understand
- C + + recursive knapsack problem
- The use of GIT and GitHub and the latest git tutorial are easy to understand -- Video notes of crazy God speaking
- PostgreSQL statement query
- Ignition database test
- Context didn't understand why he got a high salary?, Nginxfair principle
- Bootstrap switch switch control user's guide, springcloud actual combat video
- A list that contains only strings. What other search methods can be used except sequential search
- [matlab path planning] multi ant colony algorithm grid map path planning [including GUI source code 650]
- [matlab path planning] improved genetic algorithm grid map path planning [including source code phase 525]
- Iinternet network path management system
- Appium settings app is not running after 5000ms
- Reactnative foundation - 07 (background image, status bar, statusbar)
- Reactnative foundation - 04 (custom rpx)
- If you want an embedded database (H2, hsql or Derby), please put it on the classpath
- When using stm32g070 Hal library, if you want to write to flash, you must perform an erase. If you don't let it, you can't write continuously.
- Linux checks where the software is installed and what files are installed
- SQL statement fuzzy query and time interval filtering
- 69. Sqrt (x) (c + + problem solving version with vs runnable source program)
- Fresh students are about to graduate. Do you choose Java development or big data?
- Java project: OA management system (java + SSM + bootstrap + MySQL + JSP)
- Titanic passenger survival prediction
- Vectorization of deep learning formula
- Configuration and use of private image warehouse of microservice architect docker
- Relearn JavaScript events
- For someone, delete return 1 and return 0
- How does Java dynamically obtain what type of data is passed? It is used to judge whether the data is the same, dynamic data type
- How does the database cow optimize SQL?
- [data structure] chain structure of binary tree (pre order traversal) (middle order traversal) (post order traversal) (sequence traversal)
- Webpack packaging optimization solution
- 5. Operation element
- Detailed explanation of red and black trees
- redhat7. 9 install database 19C
- Blue Bridge Cup notes: (the given elements are not repeated) complete arrangement (arrangement cannot be repeated, arrangement can be repeated)
- Detailed explanation of springboot default package scanning mechanism and @ componentscan specified scanning path
- How to solve the run-time exception of test times
- Detailed explanation of k8s management tool kubectl
- Android system view memory command