GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 好像添加了一个自定义pop · tmexcept/AndroidCustomView@eae6746

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • .gitignore
  • .idea
    • gradle.xml
    • runConfigurations.xml
  • app
    • build.gradle
    • src/main
      • AndroidManifest.xml
      • java/com/allen/androidcustomview
        • activity
          • MainActivity.kt
          • PathActivity.kt
          • custompop
            • CustomPopActivity.java
            • MyAdapter.java
        • widget
          • CustomPopWindow.java
      • res
        • anim
          • popwindow_anim_in.xml
          • popwindow_anim_out.xml
        • drawable
          • menu_pop_bg.xml
        • layouts/custompop/layout
          • activity_custompop.xml
          • list_item.xml
          • pop_layout1.xml
          • pop_layout2.xml
          • pop_layout_close.xml
          • pop_list.xml
          • pop_menu.xml
        • layout
          • activity_path.xml
        • mipmap-xhdpi
          • ic_icon1.png
          • ic_icon2.png
          • ic_icon4.png
          • ic_icon5.png
          • icon_item3.png
          • pop_bg.png
          • pop_bg2.png
        • values
          • styles.xml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎.gitignore‎

Copy file name to clipboardExpand all lines: .gitignore
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@
77
/captures
88
.externalNativeBuild
99
/.idea
10+
.idea/gradle.xml
11+
.idea/runConfigurations.xml
Collapse file

‎.idea/gradle.xml‎

Copy file name to clipboardExpand all lines: .idea/gradle.xml
+1-2Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎.idea/runConfigurations.xml‎

Copy file name to clipboardExpand all lines: .idea/runConfigurations.xml
-12Lines changed: 0 additions & 12 deletions
This file was deleted.
Collapse file

‎app/build.gradle‎

Copy file name to clipboardExpand all lines: app/build.gradle
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ android {
2121
}
2222
productFlavors {
2323
}
24+
sourceSets.main {
25+
res.srcDirs =
26+
[
27+
'src/main/res/layouts/custompop',
28+
'src/main/res/layouts',
29+
'src/main/res'
30+
]
31+
}
2432
}
2533

2634
dependencies {
Collapse file

‎app/src/main/AndroidManifest.xml‎

Copy file name to clipboardExpand all lines: app/src/main/AndroidManifest.xml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<activity android:name=".activity.RecyclerViewItemAnimActivity" />
4040
<activity android:name=".activity.PathActivity" />
4141
<activity android:name=".activity.SinaVoteActivity" />
42+
<activity android:name=".activity.custompop.CustomPopActivity" />
4243
<activity android:name=".gradient.GradientActivity" />
4344
<activity android:name=".activity.TranslateRotateCanvasActivity" />
4445
</application>
Collapse file

‎app/src/main/java/com/allen/androidcustomview/activity/MainActivity.kt‎

Copy file name to clipboardExpand all lines: app/src/main/java/com/allen/androidcustomview/activity/MainActivity.kt
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import android.support.v7.widget.LinearLayoutManager
77
import android.view.View
88
import android.widget.Toast
99
import com.allen.androidcustomview.R
10+
import com.allen.androidcustomview.activity.custompop.CustomPopActivity
1011
import com.allen.androidcustomview.adapter.MainAdapter
1112
import com.allen.androidcustomview.bean.TypeBean
1213
import com.allen.androidcustomview.gradient.GradientActivity
@@ -46,6 +47,7 @@ class MainActivity : AppCompatActivity(), BaseQuickAdapter.OnItemClickListener {
4647
typeBeans.add(TypeBean("仿新浪投票控件", index++))
4748
typeBeans.add(TypeBean("Gradient的应用", index++))
4849
typeBeans.add(TypeBean("自定义控件", index++))
50+
typeBeans.add(TypeBean("自定义Popwindow", index++))
4951
return typeBeans
5052
}
5153

@@ -90,6 +92,7 @@ class MainActivity : AppCompatActivity(), BaseQuickAdapter.OnItemClickListener {
9092
16 -> startActivity(Intent(this@MainActivity, SinaVoteActivity::class.java))
9193
17 -> startActivity(Intent(this@MainActivity, GradientActivity::class.java))
9294
18 -> startActivity(Intent(this@MainActivity, TranslateRotateCanvasActivity::class.java))
95+
19 -> startActivity(Intent(this@MainActivity, CustomPopActivity::class.java))
9396
}
9497
}
9598
}
Collapse file

‎app/src/main/java/com/allen/androidcustomview/activity/PathActivity.kt‎

Copy file name to clipboardExpand all lines: app/src/main/java/com/allen/androidcustomview/activity/PathActivity.kt
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ package com.allen.androidcustomview.activity
22

33
import android.os.Bundle
44
import android.support.v7.app.AppCompatActivity
5+
import android.util.Log
6+
import android.widget.TextView
57
import com.allen.androidcustomview.R
68
import kotlinx.android.synthetic.main.activity_path.*
9+
import java.util.*
710

811
/**
912
* <pre>
@@ -22,4 +25,12 @@ class PathActivity : AppCompatActivity() {
2225
}
2326
}
2427

28+
override fun onResume() {
29+
super.onResume()
30+
val text: String = "哈哈22jjMM,,,,"
31+
val measure = FloatArray(text.length)
32+
tv?.getPaint()?.getTextWidths(text, measure)
33+
Log.e("onResume","measure=" + Arrays.toString(measure));
34+
35+
}
2536
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.