Git Product home page Git Product logo

Comments (5)

moharidy avatar moharidy commented on July 21, 2024 2

i had the same wish and i did use the method in the attached link to enable onClick WRT the recuclerView and i could enable it

https://www.littlerobots.nl/blog/Handle-Android-RecyclerView-Clicks/

from advancedandroid_shushme.

codewithraqib avatar codewithraqib commented on July 21, 2024 1

i am also looking for the same but there is no option to delete the added location.

   `` RecycleClick.addTo(mRecyclerView).setOnItemClickListener(new RecycleClick.OnItemClickListener() {
        @Override
        public void onItemClicked(RecyclerView recyclerView, int position, View v) {
            SweetAlertDialog pDialog =new SweetAlertDialog(context, SweetAlertDialog.WARNING_TYPE);
            pDialog.setTitleText("Delete Location");
            pDialog.setContentText("Phone Will No Longer Change Profile Mode Automatically\nYes To Confirm No to Dismiss");
            pDialog.setConfirmButton("No", new SweetAlertDialog.OnSweetClickListener() {
                @Override
                public void onClick(SweetAlertDialog sDialog) {
                    sDialog.dismissWithAnimation();
                }
            });
            pDialog.setCancelButton("Yes", new SweetAlertDialog.OnSweetClickListener() {
                @Override
                public void onClick(SweetAlertDialog sDialog) {
                    sDialog.dismissWithAnimation();

                    Uri uri = PlaceContract.PlaceEntry.CONTENT_URI;
                    int data = getContentResolver().delete(uri,null, null);




                    Toast.makeText(getApplicationContext(), "Successfully Deleted This Location!",Toast.LENGTH_LONG).show();
                }
            });
            pDialog.setCancelable(true);
            pDialog.show();
        }
    });`

``

i added these lines but i am getting an error of invalid uri

from advancedandroid_shushme.

moharidy avatar moharidy commented on July 21, 2024 1

No it did not, yet , only the onclick part is solved but deleting the selected entry still not coded

from advancedandroid_shushme.

miki995 avatar miki995 commented on July 21, 2024

Yep, it's strange that they didn't included swipe to delete or something...

from advancedandroid_shushme.

miki995 avatar miki995 commented on July 21, 2024

This works for you @moharidy ? So I can close the issue.

from advancedandroid_shushme.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.