use of android.support.v7.widget.ChatLinearLayoutManager in project actor-platform by actorapp.
the class MessagesFragment method configureRecyclerView.
@Override
protected void configureRecyclerView(RecyclerView recyclerView) {
layoutManager = new ChatLinearLayoutManager(getActivity(), ChatLinearLayoutManager.VERTICAL, true);
layoutManager.setStackFromEnd(false);
recyclerView.setHasFixedSize(true);
recyclerView.setLayoutManager(layoutManager);
}
use of android.support.v7.widget.ChatLinearLayoutManager in project actor-platform by actorapp.
the class GlobalSearchBaseFragment method onCreateView.
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View res = inflater.inflate(R.layout.fragment_global_search, container, false);
res.setVisibility(View.GONE);
searchList = (RecyclerView) res.findViewById(R.id.searchList);
searchList.setLayoutManager(new ChatLinearLayoutManager(getActivity()));
searchList.addOnScrollListener(new RecyclerView.OnScrollListener() {
@Override
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
if (newState == RecyclerView.SCROLL_STATE_DRAGGING && isSearchVisible) {
if (searchView != null) {
searchView.clearFocus();
}
}
}
@Override
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
}
});
searchContainer = res.findViewById(R.id.searchCont);
searchContainer.setBackgroundColor(ActorSDK.sharedActor().style.getMainBackgroundColor());
searchEmptyView = (TextView) res.findViewById(R.id.empty);
searchHintView = (TextView) res.findViewById(R.id.searchHint);
searchEmptyView.setTextColor(style.getTextSecondaryColor());
searchHintView.setTextColor(style.getTextSecondaryColor());
searchHintView.setVisibility(View.GONE);
searchEmptyView.setVisibility(View.GONE);
return res;
}
Aggregations