-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(0.9.1): 增加聊天界面demo,修复BaseItemAdapter中获取type参数问题
- Loading branch information
Showing
11 changed files
with
66 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
demo/src/main/java/com/freelib/multiitem/demo/viewholder/ReceiveMessageManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.freelib.multiitem.demo.viewholder; | ||
|
||
import android.support.annotation.NonNull; | ||
import android.widget.TextView; | ||
|
||
import com.freelib.multiitem.adapter.holder.BaseViewHolder; | ||
import com.freelib.multiitem.adapter.holder.BaseViewHolderManager; | ||
import com.freelib.multiitem.demo.R; | ||
import com.freelib.multiitem.demo.bean.MessageBean; | ||
|
||
/** | ||
* @author free46000 2017/03/17 | ||
*/ | ||
public class ReceiveMessageManager extends BaseViewHolderManager<MessageBean> { | ||
|
||
|
||
@Override | ||
public void onBindViewHolder(@NonNull BaseViewHolder holder, @NonNull MessageBean data) { | ||
TextView textView = getView(holder, R.id.text); | ||
textView.setText(data.getMessage()); | ||
} | ||
|
||
@Override | ||
protected int getItemLayoutId() { | ||
return R.layout.item_chat_receive; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters