-
Notifications
You must be signed in to change notification settings - Fork 2.7k
swipeLayout gone when something on swipe view changed #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please send me an apk to my mailbox. |
I have the same problem. By clicking I change the text, everything happens for a chain: Adapter - click - static method in the fragment. May be important - I used JazzyListView. Adapter part public void fillValues(int position, View convertView) {
ClientOrderItem orderItem = items.get(position);
RobotoTextView count = (RobotoTextView) convertView.findViewById(R.id.count);
RobotoTextView countEdit = (RobotoTextView) convertView.findViewById(R.id.count_edit);
RobotoTextView incrementEdit = (RobotoTextView) convertView.findViewById(R.id.increment_edit);
RobotoTextView decrementEdit = (RobotoTextView) convertView.findViewById(R.id.decrement_edit);
ImageView removeEdit = (ImageView) convertView.findViewById(R.id.remove_edit);
count.setText(orderItem.getCount()+"");
countEdit.setText(orderItem.getCount()+"");
incrementEdit.setTag(new ClientOrderActionTag(ClientOrderActionTag.ClientOrderItemAction.INCREMENT, position));
incrementEdit.setOnClickListener(this);
decrementEdit.setTag(new ClientOrderActionTag(ClientOrderActionTag.ClientOrderItemAction.DECREMENT, position));
decrementEdit.setOnClickListener(this);
removeEdit.setTag(new ClientOrderActionTag(ClientOrderActionTag.ClientOrderItemAction.REMOVE, position));
removeEdit.setOnClickListener(this);
} OnClick(impl. in adapter class) part @Override
public void onClick(View v) {
ClientOrderActionTag tag = (ClientOrderActionTag)v.getTag();
if(tag.action == ClientOrderActionTag.ClientOrderItemAction.INCREMENT){
ClientOrderFragment.incrementCountForItem(tag.position);
}
else if(tag.action == ClientOrderActionTag.ClientOrderItemAction.DECREMENT){
//
}
else{
//
}
} Fragment part static void incrementCountForItem(int position){
View itemView = (View) orderList.getChildAt(position - orderList.getFirstVisiblePosition());
RobotoTextView countView = (RobotoTextView)itemView.findViewById(R.id.count);
RobotoTextView countEditView = (RobotoTextView)itemView.findViewById(R.id.count_edit);
int count = Integer.parseInt(countView.getText().toString())+1;
ClientOrderItem item = orderItems.get(position);
item.setCount(count);
countEditView.setText(count+"");
countView.setText(count+"");
} |
Any changes? |
@IlyaEremin Yeap - in 1.1.7 it work as I (We) expected, but swipe adapter class interface changed. I am test it on Lenovo Yoga Tablet 10(4.2.2) and Nexus 10 (4.4). I am sorry for my lousy English. Good job, guys. P.S. I think issue-ticket need close. |
@S2V I tried 1.1.7 but problem stays. |
@daimajia hi there! Usercase: Here is sample project and class with main behaviour and apk file Note, that not only |
@IlyaEremin Hey guy, if you are available, please try the latest version, I think this issue has already been fixed in the latest version. :-D The latest version is 1.2.0 |
@daimajia I tried it on latest 1.2.0 version. I added sample apk too. |
@IlyaEremin How about on 1.2.0? |
@daimajia I tried both 1.2.0 and 1.2.0@aar. The result is same :( |
@IlyaEremin I mean if it's still buggy when using 1.2.0 library. |
@IlyaEremin Ok, I get it. Let's me try your sample project. |
@daimajia please, tell me when will you investigave this issue ) |
Hi There, thanks for the great lib but I have the same issue with closing the SwipeLayout automatically. |
@daimajia Could you kindly help us and tell when you might investigate this issue? |
@daimajia I hope not to bother but do you need some more information from us for investigating this issue? |
@sata73 I think he needs more time :) |
@sata73 I'm here, sorry for my late, recently just so busy on work... hope you can understand. |
When calling Any idea on this issue? @jpshelley @linfaxin |
@daimajia thanks a lot for your reply. Your help and of course your Lib is highly appreciated! Thanks guys! |
Jump from |
getOpenStatus calculates current state from layout - I suggest store state and then restore it on global layout event - this should fix your problems guys #191 cheers |
Only seems to be an issue on <= 4.4 |
@REWKyleB nope, I observed this bug on 5.0 |
I can confirm that this happens also on 5.x |
hi @daimajia , I tried to demo app and every time I slide the view to show the options it closes automatically. Do anyone knows how to get this library working ? Thanks |
hi @daimajia ,in android studio 1.3 classpath 'com.github.dcendents:android-maven-plugin:1.2' the maven-plugin can't build well. My gradle version is 2.4. I think you can update the library. |
Thanks for the suggested solution from #191 but to be honest this doesn't seem to me to be a proper solution to restore the layout state every time anything changes. |
Swipe layout open on drag but it closed itself,it can't remains open for a while. |
Facing same issue as Drashti, but on specific devices like Acer and Micromax. I noticed the onOpen function gets called tice or thrice, but works fine on almost all other phones. The swipe layout opens and immediately closes. |
I can confirm that it happens on Sony Xperia devices as well as on the LG Nexus 5 |
Any updates on this? |
@GaidamakUA Looks like this is a potential fix: #191 |
@GaidamakUA Update: You can get that version using Jitpack: Add this to your root build.gradle:
Then add this to your module dependencies: Note that it is a few commits behind master. |
Hello. I have the same problem with ConkerTab SX5, but no with other devices. Any solutions? |
Top level
And neither of these works
|
@GaidamakUA Just a hunch: you need to add it to your allProjects -> repositories, not your builtscript -> repositories. I'm not totally sure but I think buildscript repositories are just for your gradle build scripts, and your project repositories are for project dependencies. |
Anyone got a solution? I'm having the same issue. I need to show a progress view in the bottom layout but it gets close when someone clicks. |
@zenkhas Yes there is an solution.
|
@daimajia any solution? |
For example: my swipeLayout has textView.
I open my swipe layout with gesture. Click on it. OnClickListener change textview text. After changing text swipeLayout closed :(
The text was updated successfully, but these errors were encountered: