Comments (21)
Your going to need to provide more info than that... I am using ABS + ListViews + Crouton fine.
You mean forever after the crouton has displayed? or just while it is showing?
from crouton.
Both would be a problem that should be treated. But we'll need to figure out what causes this issue.
@aatpocope can you provide some sample code to verify and probably debug it?
from crouton.
@chrisjenx
What can I add ? Yes, when i display a Crouton, i can't click on item. Forever.
@keyboardsurfer
Okay ! I will do test for my part and i'll post a reply with some code but i think if we have an activity which extends SherlockListActivity we can reproduce this problem.
I can't do it now because i'm working.
from crouton.
Can you also let us know the device and os version?
On 13 Nov 2012 08:34, "aatpocope" [email protected] wrote:
@chrisjenx https://github.com/chrisjenx
What can I add ? Yes, when i display a Crouton, i can't click on item.
Forever.@keyboardsurfer https://github.com/keyboardsurfer
Okay ! I will do test for my part and i'll post a reply with some code but
i think if we have an activity which extends SherlockListActivity we can
reproduce this problem.
I can't do it now because i'm working.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-10319041.
from crouton.
Samsung Galaxy S II GT-I9100 with ICS 4.0.4
from crouton.
Okay !
For example i have a problem with this code :
public class MainActivity extends SherlockListActivity {
private CountryAdapter adapter;
private List<String> countries;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
countries = new ArrayList<String>();
adapter = new CountryAdapter();
getListView().setOnItemClickListener(adapter);
setListAdapter(adapter);
// Problem with ICS 4.0.4 when you enable the next line
// Crouton.makeText(MainActivity.this, "This is a Crouton", Style.ALERT).show();
countries.add("France");
countries.add("USA");
countries.add("New-Zealand");
}
private class CountryAdapter extends ArrayAdapter<String> implements OnItemClickListener {
public CountryAdapter() {
super(MainActivity.this, android.R.layout.simple_list_item_1);
}
@Override
public int getCount() {
return countries.size();
}
@Override
public String getItem(int position) {
return countries.get(position);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
convertView = super.getView(position, convertView, parent);
TextView tv = (TextView) convertView.findViewById(android.R.id.text1);
tv.setText(countries.get(position));
return convertView;
}
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int position, long id) {
Intent intent = new Intent(MainActivity.this, DetailActivity.class);
intent.putExtra(Constants.EXTRA_COUNTRY, countries.get(position));
startActivity(intent);
}
}
}
And the activity which we must launch when we click on item :
public class DetailActivity extends SherlockActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.detail);
TextView tv = (TextView) findViewById(R.id.description);
tv.setText(getIntent().getStringExtra(Constants.EXTRA_COUNTRY));
}
}
from crouton.
Same problem here on Galaxy Nexus 4.2.0 and Samsung Galaxy S3 4.1.1
from crouton.
Interesting, I don't think its device related?
Are all you guys using the ListView Activity or have list views in your
Layouts?
I.e. Can you paste some code for us to test?
On 15 November 2012 09:31, Hrl [email protected] wrote:
Same problem here on Galaxy Nexus 4.2.0 and Samsung Galaxy S3 4.1.1
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-10402255.
from crouton.
Here is the simplest I can have from my case:
Activity:
public class DistanceActivity extends SherlockListActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_distance);
//If the following line is commented, it works
Crouton.showText(this, "TEST", Style.ALERT);
String[] distances = getResources().getStringArray(R.array.distance_precision_array);
setListAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, distances));
getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Crouton.showText(DistanceActivity.this, "OK", Style.CONFIRM);
}
});
}
}
Layout:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />
</RelativeLayout>
Any idea for this problem ?
from crouton.
ListView Activity (see above) and listview in layout like that :
from crouton.
Interesting, seems that it breaks the default ListView implementation and
stops onItemClick events being pushed through. Wonder if it steals the
focus incorrectly.
But I have reproduced the issue at least!
On 15 November 2012 10:43, aatpocope [email protected] wrote:
ListView Activity (see above) and listview in layout like that :
android:id="@android https://github.com/android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content" />—
Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-10404373.
from crouton.
Thanks for reporting and verifying. I'll have a look and will try to find a solution when I'll finally find the time to take care again.
from crouton.
Just a quick shot: Are you aware of the issue #24 and the workaround I raised there?
from crouton.
Does this fix it, the issue that I tested was either the queue stops being processed or that the onClick event stops firing the crouton event. Seen as I have used list views and croutons before, im wondering if it is the queue being unprocessed. I will look at fixing this! Just mental busy :)
from crouton.
I haven't checked the onClick but the queue should fire again after including my workaround.
No hard feelings I'm pretty busy myself.
from crouton.
@hrl can you provide your sample project? I currently don't have the time to create one myself at the moment.
from crouton.
Hello @keyboardsurfer, I'm kind of busy until the end of the year (some urgent project coming to a deadline). The code above is sufficient to reproduce the bug. I'll do a sample project in 2 or 3 weeks if you couldn't reproduce it until then.
from crouton.
I can reproduce it I'll upload my sample project for you.
On 12 Dec 2012 18:43, "Hrl" [email protected] wrote:
Hello @keyboardsurfer https://github.com/keyboardsurfer, I'm kind of
busy until the end of the year (some urgent project coming to a deadline).
The code above is sufficient to reproduce the bug. I'll do a sample project
in 2 or 3 weeks if you couldn't reproduce it until then.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/51#issuecomment-11302223.
from crouton.
Thanks a lot. :-)
from crouton.
Same issue on Samsung Galaxy S3 4.1.2
from crouton.
Works fine with a ListFragment
as well as a SherlockListFragment
.
from crouton.
Related Issues (20)
- Where can I find the latest jar?
- Not able to use a white background HOT 4
- Show at bottom HOT 1
- Push view down with crouton HOT 1
- Cant use a custom Style for Crouton
- Memory leak in DefaultAnimationsBuilder HOT 3
- memory leak in DefaultAnimationsBuilder.java HOT 5
- not an issue :) but a question about Snackbar. HOT 2
- Croupton not works on android version 16 HOT 2
- Crouton with custom view and match_parent height HOT 2
- No constructors works HOT 1
- How to use in Fragment? HOT 1
- change position HOT 3
- Visual glitch when using a navigation drawer HOT 2
- show crouton below Toolbar HOT 1
- not working... after changing app theme.
- SpannableString or Html tags ? HOT 2
- Crouton disable auto hide HOT 1
- Crouton Not work when app come background nearly after 2 mins HOT 2
- How to use Crouton.makeText in AsyncTask
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 crouton.