"1、获取输入框控件EditText,需要自定义会话页面
public class ChatConversationFragment extends ConversationFragment {
private RelativeLayout containerView;
private RongExtension extension;
private EditText inputEditText;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
containerView = (RelativeLayout) super.onCreateView(inflater, container, savedInstanceState);
extension = (RongExtension) containerView.findViewById(io.rong.imkit.R.id.rc_extension);
inputEditText = extension.getInputEditText();
return containerView;
}
}
注意:在添加会话页面的时候:
<fragment
android:id=“@+id/conversation”
android:name=“所在路径.ChatConversationFragment”
android:layout_width=“match_parent”
android:layout_height=“match_parent” />
2、调用EditText相关方法设置hint和样式"