### Commit Log Message Examples
Source: https://github.com/carson-ho/search_layout/blob/master/CONTRIBUTING.md
Provides practical examples of valid commit messages, illustrating how to use different actions and how to link commits to issues for better tracking and release management.
```Text
add new condition
fix #123, make compatible to recyclervew 25.2.0
remove abc
```
--------------------------------
### Branch Naming Convention
Source: https://github.com/carson-ho/search_layout/blob/master/CONTRIBUTING.md
Defines the recommended structure for naming branches in the repository, specifying the 'action' (e.g., feature, bugfix) and a descriptive 'description' of the change. Includes examples for clarity.
```Text
{action}/{description}
// 1. {action}:
// feature: used for developing a new feature.
// bugfix: used for fixing bugs.
// 2. for example: feature/add_new_condition
```
--------------------------------
### Commit Log Message Format
Source: https://github.com/carson-ho/search_layout/blob/master/CONTRIBUTING.md
Outlines the standard format for commit messages, consisting of an 'action' and a 'description'. This format helps maintain consistency and clarity in the commit history.
```Text
{action} {description}
```
--------------------------------
### Import SearchLayout Library using Maven
Source: https://github.com/carson-ho/search_layout/blob/master/README-en.md
Add the SearchLayout dependency to your project's pom.xml file for Maven-based Android projects. This provides an alternative method for library inclusion.
```Maven
com.carson_ho
SearchLayout
1.0.1
pom
```
--------------------------------
### Import SearchLayout Library using Gradle
Source: https://github.com/carson-ho/search_layout/blob/master/README-en.md
Add the SearchLayout dependency to your Android project's build.gradle file to include the library. This is the recommended way for Gradle-based projects.
```Gradle
dependencies {
compile 'com.carson_ho:SearchLayout:1.0.1'
}
```
--------------------------------
### Implement SearchLayout in Android Activity
Source: https://github.com/carson-ho/search_layout/blob/master/README-en.md
Initialize the SearchView in your Android activity, bind it to the layout, and set up click listeners for the search and back buttons. This allows you to define custom actions when the user interacts with the search view.
```Java
// 1. 初始化搜索框变量
private SearchView searchView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 2. 绑定视图
setContentView(R.layout.activity_search);
// 3. 绑定组件
searchView = (SearchView) findViewById(R.id.search_view);
// 4. 设置点击搜索按键后的操作(通过回调接口)
// 参数 = 搜索框输入的内容
searchView.setOnClickSearch(new ICallBack() {
@Override
public void SearchAciton(String string) {
System.out.println("我收到了" + string);
}
});
// 5. 设置点击返回按键后的操作(通过回调接口)
searchView.setOnClickBack(new bCallBack() {
@Override
public void BackAciton() {
finish();
}
});
}
}
```
--------------------------------
### Define SearchLayout in Android XML Layout
Source: https://github.com/carson-ho/search_layout/blob/master/README-en.md
Integrate the SearchLayout custom view into your Android activity's XML layout file. You can set its dimensions and custom attributes like text size, color, hint, search block height, and color directly in the XML.
```XML
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.