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 — 完成 StoreHouseHeader 样式 · StandOpen/SmartRefreshLayout@df3fc9e

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • app/src/main
    • java/com/scwang/refreshlayout/activity/style
      • StoreHouseStyleActivity.java
    • res/layout
      • activity_style_storehouse.xml
  • refresh-header/src/main
    • java/com/scwang/smartrefresh/header
      • StoreHouseHeader.java
    • res/values
      • attrs.xml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎app/src/main/java/com/scwang/refreshlayout/activity/style/StoreHouseStyleActivity.java‎

Copy file name to clipboardExpand all lines: app/src/main/java/com/scwang/refreshlayout/activity/style/StoreHouseStyleActivity.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private enum Item {
4242
@Override
4343
protected void onCreate(Bundle savedInstanceState) {
4444
super.onCreate(savedInstanceState);
45-
setContentView(R.layout.activity_style_fungame_hitblock);
45+
setContentView(R.layout.activity_style_storehouse);
4646

4747
mToolbar = (Toolbar)findViewById(R.id.toolbar);
4848
mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
Collapse file

‎app/src/main/res/layout/activity_style_storehouse.xml‎

Copy file name to clipboardExpand all lines: app/src/main/res/layout/activity_style_storehouse.xml
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
android:layout_width="match_parent"
2323
android:layout_height="wrap_content"
2424
android:paddingTop="25dp"
25-
android:paddingBottom="25dp"/>
25+
android:paddingBottom="25dp"
26+
app:shhText="SmartRefreshLayout"
27+
app:shhLineWidth="2dp"/>
2628
<android.support.v7.widget.RecyclerView
2729
android:id="@+id/recycler"
2830
android:layout_width="match_parent"
Collapse file

‎refresh-header/src/main/java/com/scwang/smartrefresh/header/StoreHouseHeader.java‎

Copy file name to clipboardExpand all lines: refresh-header/src/main/java/com/scwang/smartrefresh/header/StoreHouseHeader.java
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ private void initView(Context context, AttributeSet attrs, int defStyleAttr) {
7676
setTextColor(0xffcccccc);
7777

7878
TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.StoreHouseHeader);
79+
mLineWidth = ta.getDimensionPixelOffset(R.styleable.StoreHouseHeader_shhLineWidth, mLineWidth);
7980
if (ta.hasValue(R.styleable.StoreHouseHeader_shhText)) {
8081
initWithString(ta.getString(R.styleable.StoreHouseHeader_shhText));
8182
} else {
@@ -274,13 +275,13 @@ public void onDraw(Canvas canvas) {
274275

275276
@Override
276277
public void onPullingDown(float percent, int offset, int headHeight, int extendHeight) {
277-
setProgress(percent);
278+
setProgress(percent * .8f);
278279
invalidate();
279280
}
280281

281282
@Override
282283
public void onReleasing(float percent, int offset, int headHeight, int extendHeight) {
283-
setProgress(percent);
284+
setProgress(percent * .8f);
284285
invalidate();
285286
}
286287

Collapse file

‎refresh-header/src/main/res/values/attrs.xml‎

Copy file name to clipboardExpand all lines: refresh-header/src/main/res/values/attrs.xml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262

6363
<declare-styleable name="StoreHouseHeader">
6464
<attr name="shhText" format="string" />
65+
<attr name="shhLineWidth" format="dimension" />
6566
</declare-styleable>
6667

6768

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.