Code Monkey home page Code Monkey logo

multiwaveheader's Issues

可否在代码写一些注释

以前学自定义控件的时候都是看别人的源码+少部分注释+百度 这样学的,我也想学一下,但源码完全看不懂

可以增加接口改变颜色

public void update() {
    updateLinearGradient(getMeasuredWidth(), getMeasuredHeight());
    invalidate();
}

public void setStartColor(int startColor) {
    mStartColor = startColor;
}

public void setCloseColor(int closeColor) {
    mCloseColor = closeColor;
}

仓库无效问题

implementation 'com.scwang.wave:MultiWaveHeader:1.0.0-alpha-3'

//androidx
implementation 'com.scwang.wave:MultiWaveHeader:1.0.0-andx-3'

都没有
implementation 'com.scwang.wave:MultiWaveHeader:1.0.0-alpha-1' 无奈用回这个

error: failed linking file resources.

error: attribute 'com.eye.tree:mwhRunning' not found.
Message{kind=ERROR, text=error: attribute 'com.eye.tree:mwhRunning' not found., sources=[F:\AndroidProject\Tree\NormalJoy\src\main\res\layout\main_activity_frist.xml:27], original message=, tool name=Optional.of(AAPT)}

<android.support.v7.widget.Toolbar
    android:id="@+id/fri_toolbar"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="#009687"
    android:elevation="10dp">
    <!--
    <at.markushi.ui.ActionView
        android:id="@+id/action"
        android:layout_width="56dip"
        android:layout_height="56dip"
        android:padding="16dp"
        app:av_action="drawer"
        app:av_color="@android:color/white" />
    -->

    <com.scwang.wave.MultiWaveHeader
        android:id="@+id/fri_waveHeader"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="26dp"
        android:scaleY="-1"
        app:mwhCloseColor="@color/colorPrimaryLight"
        app:mwhColorAlpha="0.45"
        app:mwhGradientAngle="45"
        app:mwhProgress="1"
        app:mwhRunning="true"
        app:mwhStartColor="@color/colorPrimaryDark"
        app:mwhVelocity="1"
        app:mwhWaveHeight="50dp"
        app:mwhWaves="MultiWave" />


</android.support.v7.widget.Toolbar>

<ScrollView
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:contentDescription="@string/LOADING"
            android:src="@mipmap/query_room_age2" />


    </LinearLayout>
</ScrollView>

but
-->
<com.scwang.wave.MultiWaveHeader
android:id="@+id/fri_waveHeader"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="26dp"
android:scaleY="-1"
app:mwhCloseColor="@color/colorPrimaryLight"
app:mwhColorAlpha="0.45"
app:mwhGradientAngle="45"
app:mwhProgress="1"
app:mwhStartColor="@color/colorPrimaryDark"
app:mwhVelocity="1"
app:mwhWaveHeight="50dp"
app:mwhWaves="MultiWave" />

it works,and is mwhRunning, i do not why,

水波纹的 波长不可定制吗?

想问一下,水波纹的波长是否不可控制,是写死的控件宽度的两倍. 如果是的话,想问一下,这样设置是处于哪一方面考虑的.谢谢了.

When height goes greater than 1, the waveheader starts to go out of screen

hi. first of all thankyou for this amazing library! made my app ui look even more beautiful.
Secondly, I have a small problem. I have a button which sets the progress as waveHeader.setProgress(waveHeader.getProgress()+0.1f) for some clicks. But in this way, when the progress count becomes greater than 1, theheader goes out of screen. And even when the header is onScreen at progress= exact 1, the header would not cover the complete screen, the waves would be still shorter than the top edge of the screen. Is there a way to cover the complete screen?

I also wanted to know if we could somehow make the animation of setProgress() more smooth, because even a small change from 0.5f to 0.6f is very abrupt.

Thanks again for this awesome library!!!

引入库失败

Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.scwang.wave:MultiWaveHeader:1.0.0-alpha-1.

是什么问题呢?

直接打开那个demo apk 也安装不了

导入失败

ERROR: Failed to resolve: com.scwang.wave:MultiWaveHeader:1.0.0-alpha-3
Show in Project Structure dialog
Affected Modules: app

Wave not showing programmatically

Wave header is not showing using java example, but wave work perfectly using XML code.
I use the below java code example From readme
MultiWaveHeader waveHeader = findViewById(R.id.waveHeader);

waveHeader.setStartColor(R.color.colorPrimary);
waveHeader.setCloseColor(R.color.colorPrimaryDark);
waveHeader.setColorAlpha(.5f);

waveHeader.setWaveHeight(50);
waveHeader.setGradientAngle(360);
waveHeader.setProgress(.8f);
waveHeader.setVelocity(1f);
waveHeader.setScaleY(-1f);

waveHeader.setWaves("PairWave");

waveHeader.start();
waveHeader.stop();
waveHeader.isRunning();

在一些特定条件下的crash

如果嵌套了NestedScrollView,控件的onSizeChange不会第一时间执行,后面的Paint.getShape就空指针。
我复写控件,在onMeasure,调用了所有在onSizeChange调用的函数,修复了改bug

Corrections

Change the code for the most current version of Android Studio...

Dependency

implementation 'com.scwang.wave:MultiWaveHeader:1.0.0-alpha-1'

Layout XML is missing the close tag.

<com.scwang.wave.MultiWaveHeader
    android:id="@+id/waveHeader"
    android:layout_width="match_parent"
    android:layout_height="200dp">

</com.scwang.wave.MultiWaveHeader>

Make a new Release to BinTray; Update Readme.

Even thought the Readme tells to use:

implementation 'com.scwang.wave:MultiWaveHeader:1.0.0-alpha-3'
//androidx
implementation 'com.scwang.wave:MultiWaveHeader:1.0.0-andx-3'

It has not been published. Please publish it and update Readme.

New feature

可以根据重力反馈,自动调节水平面的倾斜度

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.