Comments (5)
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.
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.
No it did not, yet , only the onclick part is solved but deleting the selected entry still not coded
from advancedandroid_shushme.
Yep, it's strange that they didn't included swipe to delete or something...
from advancedandroid_shushme.
This works for you @moharidy ? So I can close the issue.
from advancedandroid_shushme.
Related Issues (17)
- Not able to add location because the activity closes with resultCode = 2 HOT 7
- Manifest permission missing. HOT 3
- Ringer mode issues HOT 3
- PlaceBuffer must be released after use. HOT 5
- Does this app run HOT 2
- GeofencingApi is deprecated HOT 1
- Updated Gradle & Dependencies
- Places Api Deprecated HOT 2
- getting OVER_QUERY_LIMIT regularly. And search showing only cities.
- i just applied this solution but the recyclerView shows nothing on the Mainactivtiy screen. the location i in DB but it is not shown on the screen HOT 3
- Cloning error
- places aren't getting search HOT 2
- Steps to Upgrade Gradle Version and Plugin to Your Latest Android Studio
- MAP ISN'T SHOWING || PlacePicker deprecated!!
- The map is not loading properly on pressing the Add new location button HOT 14
- place.getAddress().toString on a Null Pointer Reference HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from advancedandroid_shushme.