Skip to content

Commit 7a271fb

Browse files
committed
--
1 parent e535b44 commit 7a271fb

File tree

14 files changed

+364
-40
lines changed

14 files changed

+364
-40
lines changed

.idea/caches/build_file_checksums.ser

538 Bytes
Binary file not shown.

.idea/codeStyles/Project.xml

Lines changed: 116 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
apply plugin: 'com.android.library'
1+
2+
apply plugin: 'com.android.application'
23

34
android {
45
compileSdkVersion 25

app/src/main/AndroidManifest.xml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<manifest package="com.android.view">
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.android.view">
34

4-
<application></application>
5+
<application>
6+
7+
8+
<!-- 页面标题 -->
9+
<activity
10+
android:name=".ui.activity.MainActivity"
11+
android:label="@string/ulabor_" >
12+
<intent-filter>
13+
<action android:name="android.intent.action.VIEW"/>
14+
<action android:name="android.intent.action.MAIN"/>
15+
<category android:name="android.intent.category.LAUNCHER" />
16+
</intent-filter>
17+
</activity>
18+
19+
20+
</application>
521

622
</manifest>

app/src/main/java/com/android/view/TextGroupView.java

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ public TextGroupView(Context context, AttributeSet attrs, int defStyleAttr) {
259259
* 初始化属性
260260
*
261261
* @param context 上下文
262-
* @param attrs 属性
262+
* @param attrs 属性
263263
*/
264264
private void initAttrs(Context context, AttributeSet attrs) {
265265
if (attrs != null) {
@@ -425,9 +425,11 @@ private void initAttrs(Context context, AttributeSet attrs) {
425425
rightTextView = new TextView(context);
426426
rightTextView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
427427
addView(rightTextView);
428+
// 文本控件
428429
editView = new EditText(context);
429430
editView.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
430431
addView(editView);
432+
431433
centerImageView = new ImageView(context);
432434
centerImageView.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
433435
addView(centerImageView);
@@ -517,8 +519,8 @@ private void setBackground() {
517519
/**
518520
* 设置宽高
519521
*
520-
* @param view 控件
521-
* @param width 宽度
522+
* @param view 控件
523+
* @param width 宽度
522524
* @param height 高度
523525
*/
524526
private void setParams(View view, int width, int height) {
@@ -579,18 +581,18 @@ private void setAllTextWeight() {
579581
/**
580582
* 设置View间距、内间距、权重
581583
*
582-
* @param view 控件
583-
* @param margin 间距(左、上、右、下同时)
584-
* @param leftMargin 左间距
585-
* @param topMargin 上间距
586-
* @param rightMargin 右间距
587-
* @param bottomMargin 底部间距
588-
* @param padding 内间距(左、上、右、下同时)
589-
* @param leftPadding 左内间距
590-
* @param topPadding 右内间距
591-
* @param rightPadding 右内间距
584+
* @param view 控件
585+
* @param margin 间距(左、上、右、下同时)
586+
* @param leftMargin 左间距
587+
* @param topMargin 上间距
588+
* @param rightMargin 右间距
589+
* @param bottomMargin 底部间距
590+
* @param padding 内间距(左、上、右、下同时)
591+
* @param leftPadding 左内间距
592+
* @param topPadding 右内间距
593+
* @param rightPadding 右内间距
592594
* @param bottomPadding 底部内间距
593-
* @param weight 权重
595+
* @param weight 权重
594596
*/
595597
private void setMarginPaddingWeight(View view, int margin, int leftMargin, int topMargin, int rightMargin, int bottomMargin, int padding, int leftPadding, int topPadding, int rightPadding, int bottomPadding, float weight) {
596598
LinearLayout.LayoutParams params = (LayoutParams) view.getLayoutParams();
@@ -617,7 +619,7 @@ private void setMarginPaddingWeight(View view, int margin, int leftMargin, int t
617619
/**
618620
* 设置权重
619621
*
620-
* @param view 控件
622+
* @param view 控件
621623
* @param weight 权重
622624
*/
623625
private void setWeight(View view, float weight) {
@@ -631,11 +633,11 @@ private void setWeight(View view, float weight) {
631633
/**
632634
* 设置外边距
633635
*
634-
* @param view 控件
635-
* @param margin 边距(左上右下)
636-
* @param leftMargin 左边距
637-
* @param topMargin 上边距
638-
* @param rightMargin 右边距
636+
* @param view 控件
637+
* @param margin 边距(左上右下)
638+
* @param leftMargin 左边距
639+
* @param topMargin 上边距
640+
* @param rightMargin 右边距
639641
* @param bottomMargin 底部间距
640642
*/
641643
private void setMargin(View view, int margin, int leftMargin, int topMargin, int rightMargin, int bottomMargin) {
@@ -656,11 +658,11 @@ private void setMargin(View view, int margin, int leftMargin, int topMargin, int
656658
/**
657659
* 设置内间距
658660
*
659-
* @param view 控件
660-
* @param padding 内间距(左上右下)
661-
* @param leftPadding 左内间距
662-
* @param topPadding 上内间距
663-
* @param rightPadding 右内间距
661+
* @param view 控件
662+
* @param padding 内间距(左上右下)
663+
* @param leftPadding 左内间距
664+
* @param topPadding 上内间距
665+
* @param rightPadding 右内间距
664666
* @param bottomPadding 底部内间距
665667
*/
666668
private void setPadding(View view, int padding, int leftPadding, int topPadding, int rightPadding, int bottomPadding) {
@@ -679,14 +681,14 @@ private void setPadding(View view, int padding, int leftPadding, int topPadding,
679681
* this method create you self background drawable
680682
* by shape.the same as code in xml.
681683
*
682-
* @param shape 类型 GradientDrawable.RECTANGLE GradientDrawable.OVAL
683-
* @param strokeWidth 外线宽度 button stroke width
684-
* @param strokeColor 外线颜色 button stroke color
685-
* @param solidColor 填充颜色 button background color
686-
* @param cornerRadius 圆角大小 all corner is the same as is the radius
687-
* @param topLeftRadius 左上圆角 top left corner radius
688-
* @param topRightRadius 右上圆角 top right corner radius
689-
* @param bottomLeftRadius 底左圆角 bottom left corner radius
684+
* @param shape 类型 GradientDrawable.RECTANGLE GradientDrawable.OVAL
685+
* @param strokeWidth 外线宽度 button stroke width
686+
* @param strokeColor 外线颜色 button stroke color
687+
* @param solidColor 填充颜色 button background color
688+
* @param cornerRadius 圆角大小 all corner is the same as is the radius
689+
* @param topLeftRadius 左上圆角 top left corner radius
690+
* @param topRightRadius 右上圆角 top right corner radius
691+
* @param bottomLeftRadius 底左圆角 bottom left corner radius
690692
* @param bottomRightRadius 底右圆角 bottom right corner radius
691693
* @return
692694
*/
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package com.android.view.ui.activity;
2+
3+
import android.app.Activity;
4+
import android.os.Bundle;
5+
import android.support.annotation.Nullable;
6+
import android.view.View;
7+
import android.view.ViewGroup;
8+
9+
import com.android.view.R;
10+
11+
12+
/**
13+
* 页面标题
14+
*
15+
* @author - qqz
16+
* @date -2019-11-12
17+
* @note -
18+
* ---------------------------------------------------------------------------------------------------------------------
19+
* @modified -
20+
* @date -
21+
* @note -
22+
*/
23+
public class MainActivity extends Activity {
24+
@Override
25+
protected void onCreate(@Nullable Bundle savedInstanceState) {
26+
super.onCreate(savedInstanceState);
27+
setContentView(R.layout.activity_main);
28+
}
29+
}

0 commit comments

Comments
 (0)