• UploadActivity.java 3.8KB

      package ai.pai.lensman.upload; import android.content.Intent; import android.os.Bundle; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import java.util.ArrayList; import ai.pai.lensman.R; import ai.pai.lensman.base.BaseActivity; import ai.pai.lensman.bean.SessionBean; import ai.pai.lensman.briefs.BriefsActivity; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; public class UploadActivity extends BaseActivity implements UploadContract.UploadView{ @BindView(R.id.tv_bt_status) TextView btStatusTextView; @BindView(R.id.iv_bt_status) ImageView btStatusImageView; @BindView(R.id.icon_no_data) View noDataLayout; @BindView(R.id.recycler_view_sessions) RecyclerView sessionsRecyclerView; private SessionRecyclerAdapter adapter; private UploadContract.UploadPresenter presenter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_upload); ButterKnife.bind(this); presenter = new UploadPresenterImpl(this,this); adapter = new SessionRecyclerAdapter(this); RecyclerView.LayoutManager layoutManager = new GridLayoutManager(this,2,LinearLayoutManager.VERTICAL,false); sessionsRecyclerView.setLayoutManager(layoutManager); sessionsRecyclerView.setAdapter(adapter); } @Override protected void onResume() { super.onResume(); presenter.start(); } @Override protected void onStop() { super.onStop(); presenter.stop(); } @OnClick(R.id.iv_briefs) void jumpToBriefs(){ startActivity(new Intent(this, BriefsActivity.class)); } @OnClick(R.id.iv_add_session) void jumpToNewSession(){ presenter.jumpToNewSession(); } @OnClick(R.id.iv_bt_status) void checkBTStatus(){ presenter.checkBTStatus(); } @Override public void addNewSessionView(SessionBean bean) { } @Override public void showBTDisconnectedView() { runOnUiThread(new Runnable() { @Override public void run() { btStatusTextView.setText(R.string.bt_disconnected); btStatusImageView.setImageResource(R.drawable.bluetooth_disconnect); } }); } @Override public void showBTConnectedView() { runOnUiThread(new Runnable() { @Override public void run() { btStatusTextView.setText(R.string.bt_connected); btStatusImageView.setImageResource(R.drawable.bluetooth_connected); } }); } @Override public void showEmptyView() { runOnUiThread(new Runnable() { @Override public void run() { sessionsRecyclerView.setVisibility(View.GONE); noDataLayout.setVisibility(View.VISIBLE); } }); } @Override public void showSessionViews() { runOnUiThread(new Runnable() { @Override public void run() { noDataLayout.setVisibility(View.GONE); sessionsRecyclerView.setVisibility(View.VISIBLE); } }); } @Override public void updateSessionUploadView(SessionBean bean) { } @Override public void refreshSessionViews(final ArrayList<SessionBean> sessionList) { runOnUiThread(new Runnable() { @Override public void run() { adapter.clear(); adapter.addSessionBeans(sessionList); } }); } }
    Kodo/kodo - Gogs: Go Git Service

    1925 Commits (20bf0f5ca0589fe2c05e8c17124f96e37dd655cb)

    Author SHA1 Message Date
      Brightcells f016f89541 Update kwargs for response in response_utils.py 10 years ago
      Brightcells 443ec910e9 Update response in response_utils 10 years ago
      Brightcells 7111961986 Return session_id in api pai2_home_api 10 years ago
      Brightcells 347e920d39 Return session_id grouped photos in group_join_api & Return session_id in photo detail 10 years ago
      Brightcells 7dd4575a8c Add select_for_update for UserInfo/OrderInfo/GroupPhotoOrderInfo 10 years ago
      Brightcells c329660c26 Fix: const variable require all letters capital 10 years ago
      Brightcells 36e351b13d Update errno 10 years ago
      Brightcells e47798ebe0 Return group_photos group by session_id 10 years ago
      Brightcells 8e7c94e2ef Add parameter group_id for lensman_photo_upload_api 10 years ago
      Brightcells 9fd8002931 Update requirements.txt 10 years ago
      khb 3e9d466d86 Update requirements.txt 10 years ago
      Brightcells f40ea0a414 Fix call session_join_api after group_quit_api 10 years ago
      Brightcells e06dc10006 Make join session group by scan group qrcode fetch group photos initio 10 years ago
      Brightcells c7abce172a Rename field name 10 years ago
      Brightcells da19301800 Update set_brief_info after origin photo upload 10 years ago
      Brightcells 84e77dd54d Fix duplicate delete for api /l/origin_upload 10 years ago
      Brightcells e249360c0c Add freeze_balance for lensman/user 10 years ago
      Brightcells c2b994efc2 Update requirements.txt 10 years ago
      Brightcells d79857ed0e lensman balance decr when origin deleted & update redis 10 years ago
      Brightcells e4c95c78c7 tstrip 10 years ago
      Brightcells dd00e3b1a9 add api online_api 10 years ago
      Brightcells 7f27864ab9 update requirements.txt 10 years ago
      Brightcells 4a8f8ff2b8 update requirements.txt 10 years ago
      Brightcells b7b3dcffc3 restructure haggle_price 10 years ago
      Brightcells 972ab1e3b8 add StreamHandler 10 years ago
      Brightcells 5b678f8553 fix bug: price be negative 10 years ago
      Brightcells 4ff159f583 update error code 10 years ago
      Brightcells ac85066b8b set status_code default 200 10 years ago
      Brightcells c761b9cf4c add page price 10 years ago
      Brightcells ba8098eaae fix bug: get_group_users_info error when not in redis 10 years ago
      Brightcells 9b5e3da7fb fix group user quit bug 10 years ago
      Brightcells 994db88de2 return price_fixed in lensman_brief_api 10 years ago
      Brightcells 23f00aedae fix bug: ValueError: invalid literal for int() with base 10: 'origin' 10 years ago
      Brightcells 07da1c3383 add order_id for lensman_origin_photo_upload_api & check multi paid 10 years ago
      Brightcells 7691894d4b filter pay_status=OrderInfo.PAID for api lensman_origin_wanted_api 10 years ago
      Brightcells 684b876a38 price_fixed store in redis & update api lensman_photo_price 10 years ago
      Brightcells 4fdd237863 add api price_fix 10 years ago
      Brightcells a45976ca99 update brief returns 10 years ago
      Brightcells 1ee8b5e061 add group_photo_info for lensdata 10 years ago
      Brightcells 4ff27acb27 @property 10 years ago
      Brightcells 27d3ec8fb1 add src for LatestAppInfo/SplashInfo 10 years ago
      Brightcells c12df969e1 add origin_expired_stamps 10 years ago
      Brightcells b65f84e502 Duplicate entry 10 years ago
      Brightcells 232b73e861 lensman upload photo in lensman_app should not see in user_app 10 years ago
      Brightcells 6199c8f7ad add api lensman_origin_wanted_api/lensman_origin_photo_upload_api 10 years ago
      Brightcells ac69b15c9b update requirements.txt 10 years ago
      Brightcells 963dca9588 update requirements.txt 10 years ago
      Brightcells b6b46b302b update requirements.txt 10 years ago
      Brightcells b68c637678 update redis-extensions 10 years ago
      Brightcells 561491e543 fix bug: AttributeError: 'module' object has no attribute 'ConnectionPool' 10 years ago
    Sign In - Gogs: Go Git Service

    Sign In