小编DjH*_*orn的帖子

Android新的收件箱应用程序样式列表视图,左右滑动

我试图建立Android新的收件箱样式列表视图左右滑动,如图所示,我尝试了47deg swipelistview但它不稳定,有没有其他库可用?!

右键滑动 离开了

到目前为止尝试了47度

 public class MainActivity extends Activity {

        Listview pullToRefreshListView;
        SwipeListView swipelistview;
        ItemAdapter adapter;
        List<ItemRow> itemData;

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);

            pullToRefreshListView = (ListView) findViewById(R.id.example_swipe_lv_list);
            swipelistview = pullToRefreshListView.getRefreshableView();
            itemData = new ArrayList<ItemRow>();
            adapter = new ItemAdapter(this, R.layout.custom_row, itemData);

            swipelistview.setSwipeListViewListener(new BaseSwipeListViewListener() {
                @Override
                public void onOpened(int position, boolean toRight) {
                    if (toRight) {
                        adapter.remove(position);
                        Toast.makeText(MainActivity.this, "Open to dismiss",
                                Toast.LENGTH_SHORT).show();
                    } // swipelistview.dismiss(position);
                    else {
                        Toast.makeText(MainActivity.this, "Open to edit",
                                Toast.LENGTH_SHORT).show();
                    }
                }

                @Override
                public void onClosed(int …
Run Code Online (Sandbox Code Playgroud)

android listview swipeview

20
推荐指数
2
解决办法
2万
查看次数

Android Firebase Google SIgnon请求不好

Android Firebase Google在google返回令牌ID时签署授权错误.我有两个cleint id以及在firebase上保存的web sdk密钥.甚至json文件.

 AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);
        mAuth.signInWithCredential(credential)
                .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
                    @Override
                    public void onComplete(@NonNull Task<AuthResult> task) {
                        Log.d(TAG, "signInWithCredential:onComplete:" + task.isSuccessful());

                        // If sign in fails, display a message to the user. If sign in succeeds
                        // the auth state listener will be notified and logic to handle the
                        // signed in user can be handled in the listener.
                        if (!task.isSuccessful()) {
                            Log.w(TAG, "signInWithCredential", task.getException());
                            Toast.makeText(OnBoarding.this, "Authentication failed.",
                                    Toast.LENGTH_SHORT).show();
                        }
                        // ...
                    }
                });
Run Code Online (Sandbox Code Playgroud)

得到了这个错误 …

android google-authentication firebase firebase-authentication

4
推荐指数
1
解决办法
2602
查看次数