Skip to content

usherjc/Demo_HeadBar

Repository files navigation

Demo_HeadBar

一个用于显示头部的自定义控件 A custom view made for headbar

image.png

一个自定义的头部

这个头部总共有五个状态,在代码里设置如下所示。注意:必须要给它设置一个状态,否则会造成空指针。

public class MainActivity extends AppCompatActivity {

    private HeadBar mHbMain;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mHbMain = (HeadBar) findViewById(R.id.hb_main);
        mHbMain.setThisState(HeadBar.STATE.STATE5);
    }
}

不同状态显示

result-2017-07-13-09-03-39.png

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages