当前位置: 首页>>代码示例>>Java>>正文


Java LinearLayoutManager.setStackFromEnd方法代码示例

本文整理汇总了Java中android.support.v7.widget.LinearLayoutManager.setStackFromEnd方法的典型用法代码示例。如果您正苦于以下问题:Java LinearLayoutManager.setStackFromEnd方法的具体用法?Java LinearLayoutManager.setStackFromEnd怎么用?Java LinearLayoutManager.setStackFromEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.v7.widget.LinearLayoutManager的用法示例。


在下文中一共展示了LinearLayoutManager.setStackFromEnd方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreateView

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_history, container, false);

    setContentsCallback();

    LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
    layoutManager.setReverseLayout(true);
    layoutManager.setStackFromEnd(true);
    recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView_history);
    recyclerView.setHasFixedSize(true);
    recyclerView.setLayoutManager(layoutManager);

    historyAdapter = new HistoryAdapter(getContext(), contentsArrayList);
    recyclerView.setAdapter(historyAdapter);

    return view;
}
 
开发者ID:Team-Sprout,项目名称:Clipcon-AndroidClient,代码行数:20,代码来源:HistoryFragment.java

示例2: initViews

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
private void initViews() {
    btnPublish = (ImageButton) findViewById(R.id.publish);
    btnSwitch = (ImageButton) findViewById(R.id.swCam);
    btnBack = (ImageButton) findViewById(R.id.back);
    txtState = (TextView) findViewById(R.id.state);
    mCameraView = (SurfaceView) findViewById(R.id.preview);
    mMessagesView = (RecyclerView) findViewById(R.id.push_messages_receive_layout);
    linearLayoutManager = new LinearLayoutManager(this);
    linearLayoutManager.setStackFromEnd(true);
    mMessagesView.setLayoutManager(linearLayoutManager);
    mMessagesView.setAdapter(mAdapter);
    mCameraView.getHolder().addCallback(this);
    btnPublish.setOnClickListener(this);
    btnSwitch.setOnClickListener(this);
    btnBack.setOnClickListener(this);
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:17,代码来源:PushLiveActivity.java

示例3: setUpHistory

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
private void setUpHistory(RecyclerView historyView) {
    LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
    layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    layoutManager.setReverseLayout(true);
    layoutManager.setStackFromEnd(true);
    historyView.setLayoutManager(layoutManager);
    historyView.addItemDecoration(new DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL));

    final FloatingHistoryAdapter historyAdapter = new FloatingHistoryAdapter(mContext, mSolver, mHistory, mHistoryCallback);
    mHistory.setObserver(new History.Observer() {
        @Override
        public void notifyDataSetChanged() {
            historyAdapter.notifyDataSetChanged();
        }
    });
    historyView.setAdapter(historyAdapter);

    layoutManager.scrollToPosition(historyAdapter.getItemCount() - 1);
}
 
开发者ID:tranleduy2000,项目名称:floating_calc,代码行数:20,代码来源:FloatingPageAdapter.java

示例4: initViews

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
private void initViews(View v) {
    adapter=new CallAdapter(new ArrayList<HamnetCall>());
    recyclerView = (RecyclerView) v.findViewById(R.id.item_recycler_view);
    recyclerView.setAdapter(adapter);
    recyclerView.setHasFixedSize(true);
    LinearLayoutManager mLayoutManager = new LinearLayoutManager(getActivity().getApplicationContext());
    mLayoutManager.setReverseLayout(true);
    mLayoutManager.setStackFromEnd(true);
    recyclerView.setLayoutManager(mLayoutManager);

    SharedPreferences sharedPref = this.getActivity().getSharedPreferences("sharedPref", Context.MODE_PRIVATE);
    server = sharedPref.getString("server", "http://www.hampager.de:8080");
    user = sharedPref.getString("user", "invalid");
    password = sharedPref.getString("pass", "invalid");
    admin = sharedPref.getBoolean("admin", true);
    fetchJSON(server, user, password, admin);

}
 
开发者ID:DecentralizedAmateurPagingNetwork,项目名称:DAPNETApp,代码行数:19,代码来源:CallFragment.java

示例5: onCreateView

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_file_viewer, container, false);

    RecyclerView mRecyclerView = (RecyclerView) v.findViewById(R.id.recyclerView);
    mRecyclerView.setHasFixedSize(true);
    LinearLayoutManager llm = new LinearLayoutManager(getActivity());
    llm.setOrientation(LinearLayoutManager.VERTICAL);

    //newest to oldest order (database stores from oldest to newest)
    llm.setReverseLayout(true);
    llm.setStackFromEnd(true);

    mRecyclerView.setLayoutManager(llm);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());

    mFileViewerAdapter = new FileViewerAdapter(getActivity(), llm);
    mRecyclerView.setAdapter(mFileViewerAdapter);

    return v;
}
 
开发者ID:tortuvshin,项目名称:health,代码行数:22,代码来源:FileViewerFragment.java

示例6: initViews

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
private void initViews(View v) {
  emptyListLabel = v.findViewById(R.id.empty_list_label);
  mRecordingsListView = v.findViewById(R.id.recyclerView);
  mRecordingsListView.setHasFixedSize(true);
  LinearLayoutManager llm = new LinearLayoutManager(getActivity());
  llm.setOrientation(LinearLayoutManager.VERTICAL);

  //newest to oldest order (database stores from oldest to newest)
  llm.setReverseLayout(true);
  llm.setStackFromEnd(true);

  mRecordingsListView.setLayoutManager(llm);
  //mRecordingsListView.setItemAnimator(new DefaultItemAnimator());
  mRecordingsListView.setAdapter(mPlayListAdapter);
  playListPresenter.onViewInitialised();
}
 
开发者ID:Arjun-sna,项目名称:Android-AudioRecorder-App,代码行数:17,代码来源:PlayListFragment.java

示例7: initRecyclerView

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
private void initRecyclerView() {
        /**code edited by nirmal
         * Replacing the linearlayout manager
         */


    //    mLinearLayoutManager = new LinearLayoutManager(PostsDetailsActivity.this,LinearLayoutManager.VERTICAL,true);

        mMessageAdapter = new MessageAdapter(PostsDetailsActivity.this, myCommentList, mInsertMessageListener);

       mLinearLayoutManager = new LinearLayoutManager(PostsDetailsActivity.this) {
            @Override
            public boolean canScrollVertically() {
                return false;
           }
       };
        mLinearLayoutManager.setStackFromEnd(true);
//        mLinearLayoutManager.setReverseLayout(true);

        mMessageRecyclerView.setLayoutManager(mLinearLayoutManager);
        mMessageRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(this));
        mMessageRecyclerView.setAdapter(mMessageAdapter);

    }
 
开发者ID:sciage,项目名称:FinalProject,代码行数:25,代码来源:PostsDetailsActivity.java

示例8: initializeFormBuildHelper

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
/**
 * private method for initializing form build helper
 * @param context
 * @param recyclerView
 * @param listener
 */
private void initializeFormBuildHelper(Context context, RecyclerView recyclerView, OnFormElementValueChangedListener listener) {

    // initialize form adapter
    this.mFormAdapter = new FormAdapter(context, listener);

    // set up the recyclerview with adapter
    LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
    linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    linearLayoutManager.setStackFromEnd(false);

    recyclerView.setLayoutManager(linearLayoutManager);
    recyclerView.setAdapter(mFormAdapter);
    recyclerView.setItemAnimator(new DefaultItemAnimator());

}
 
开发者ID:adib2149,项目名称:FormMaster,代码行数:22,代码来源:FormBuilder.java

示例9: onCreateView

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.view_files, container, false);

    final RecyclerView mRecyclerView = (RecyclerView) v.findViewById(R.id.recyclerView);
    mRecyclerView.setHasFixedSize(true);
    LinearLayoutManager llm = new LinearLayoutManager(getActivity());
    llm.setOrientation(LinearLayoutManager.VERTICAL);

    //newest to oldest order (database stores from oldest to newest)
    llm.setReverseLayout(true);
    llm.setStackFromEnd(true);

    mRecyclerView.setLayoutManager(llm);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());

    mFileViewerAdapter = new FileViewerAdapter(getActivity(), llm);
    mRecyclerView.setAdapter(mFileViewerAdapter);

    return v;
}
 
开发者ID:adarshgumashta,项目名称:Facebook-Video-Downloader,代码行数:22,代码来源:FileViewerFragment.java

示例10: setupComments

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
@Override public void setupComments() {
  linearLayoutManager = new LinearLayoutManager(this);
  linearLayoutManager.setStackFromEnd(true);
  rvComments.setLayoutManager(linearLayoutManager);

  commentsAdapter = new CommentsAdapter(this);
  rvComments.setAdapter(commentsAdapter);
  rvComments.setOverScrollMode(View.OVER_SCROLL_NEVER);
  rvComments.setOnScrollListener(new RecyclerView.OnScrollListener() {
    @Override
    public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
      if (newState == RecyclerView.SCROLL_STATE_DRAGGING) {
        commentsAdapter.setAnimationsLocked(true);
      }
    }
  });
}
 
开发者ID:softonic,项目名称:instamaterial,代码行数:18,代码来源:CommentsActivity.java

示例11: onViewCreated

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    mBpsTextView = (TextView) view.findViewById(R.id.bpm_text_view);
    mChart = (LineChart) view.findViewById(R.id.line_chart);
    mDataDisplayRecyclerView = (RecyclerView) view.findViewById(R.id.data_display_recycler_view);

    initChart();
    LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
    layoutManager.setReverseLayout(true); /*让RecyclerView的元素倒序显示*/
    layoutManager.setStackFromEnd(true);/*初始元素不默认从底部开始显示*/
    mDataDisplayRecyclerView.setLayoutManager(layoutManager);
    mDataDisplayRecyclerView.setAdapter(new DataDisplayAdapter(getActivity(), data));
}
 
开发者ID:InnoFang,项目名称:FamilyBond,代码行数:15,代码来源:DataDisplayFragment.java

示例12: setup

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
private void setup(Context context) {
    if (!isInEditMode()) {
        LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
        linearLayoutManager.setStackFromEnd(true);
        setLayoutManager(linearLayoutManager);
        mLogAdapter = new LogView.LogAdapter(context);
        setAdapter(mLogAdapter);
    }
}
 
开发者ID:tranleduy2000,项目名称:sortalgorithm,代码行数:10,代码来源:LogView.java

示例13: onCreate

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

     evekey = (String) getIntent().getExtras().get("id");

    setContentView(R.layout.activity_messaging);
    contentRoot = findViewById(R.id.contentRoot);
    edMessage = (EmojiconEditText)findViewById(R.id.editTextMessage);
    btSendMessage = (ImageView)findViewById(R.id.buttonMessage);
    btSendMessage.setOnClickListener( new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            String nullcheck = edMessage.getText().toString();
            Log.d("Strings",nullcheck);
            if(nullcheck != null){
                Log.d("testings",nullcheck);
                sendMessageFirebase();
            }

        }
    } );
    btEmoji = (ImageView)findViewById(R.id.buttonEmoji);
    emojIcon = new EmojIconActions(this,contentRoot,edMessage,btEmoji);
    emojIcon.ShowEmojIcon();
    rvListMessage = (RecyclerView)findViewById(R.id.messageRecyclerView);
    mLinearLayoutManager = new LinearLayoutManager(this);
    mLinearLayoutManager.setStackFromEnd(true);
    setUserModel();
}
 
开发者ID:picopalette,项目名称:event-me,代码行数:31,代码来源:MessagingActivity.java

示例14: bindViews

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
/**
 * Vincular views com Java API
 */
private void bindViews() {
    View contentRoot = findViewById(R.id.contentRoot);
    edMessage = (EmojiconEditText) findViewById(R.id.editTextMessage);
    ImageView btSendMessage = (ImageView) findViewById(R.id.buttonMessage);
    btSendMessage.setOnClickListener(this);
    ImageView btEmoji = (ImageView) findViewById(R.id.buttonEmoji);
    EmojIconActions emojIcon = new EmojIconActions(this, contentRoot, edMessage, btEmoji);
    emojIcon.ShowEmojIcon();
    rvListMessage = (RecyclerView) findViewById(R.id.messageRecyclerView);
    mLinearLayoutManager = new LinearLayoutManager(this);
    mLinearLayoutManager.setStackFromEnd(true);

}
 
开发者ID:sega4revenge,项目名称:Sega,代码行数:17,代码来源:ChatActivity.java

示例15: onActivityCreated

import android.support.v7.widget.LinearLayoutManager; //导入方法依赖的package包/类
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    if (presenter == null) {
        presenter = new ChatPresenter(this);
    }

    setupUI(this.getView());

    final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
    linearLayoutManager.setStackFromEnd(true);
    messageListView.setLayoutManager(linearLayoutManager);
}
 
开发者ID:VidyaSastry,项目名称:Opal-Chat-AnalyticsDashboard,代码行数:15,代码来源:ChatFragment.java


注:本文中的android.support.v7.widget.LinearLayoutManager.setStackFromEnd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。