-
Notifications
You must be signed in to change notification settings - Fork 7
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
click event incorrect after zoom listview #3
Comments
Hmm can you send me some code for this. It seems like it might be
implemented wrong. It should work fine with a listview.
…On Tue, Jul 10, 2018, 6:50 AM chutrung ***@***.***> wrote:
Hello Xjasz,
I tried your code, it worked.
But I found a problem after zoom list view.
I clicked the first item in listview to show content (purpose item just is
a string) after I zoomed listview. But the second item's content showed.
I tried fix this problem but didn't work.
So, could you share your opinion and solution?
Many thanks.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/AGEr1T4F9FruqlRB1l9loq5SfYKy7okTks5uFIbdgaJpZM4VJLn1>
.
|
Hello Xjasz, The following is code that i implemented:
And activity.xml file
After I zoom out the listview, I clicked the first item but a toast with string "is" showed. |
If you click to low in that adapter then it would click on the second
item. Those items clicked are still in the original places before you
started zooming. You would have to instead of making the listzoomable make
each item zoom able
…On Tue, Jul 10, 2018, 1:49 PM chutrung ***@***.***> wrote:
Hello Xjasz,
The following is code that i implemented:
MainActivity.java file
public class MainActivity extends AppCompatActivity {
String arr[]={"Today","is","a","beautiful","day"};
@OverRide
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ZoomListView zoomListView = findViewById(R.id.zlv);
ArrayAdapter<String> adapter = new ArrayAdapter<>(this,android.R.layout.simple_list_item_1,arr);
zoomListView.setAdapter(adapter);
zoomListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@OverRide
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Toast.makeText(MainActivity.this,arr[position],Toast.LENGTH_SHORT).show();
}
});
}
}
And activity.xml file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<com.trungchu.zoomlistview.ZoomListView
android:id="@+id/zlv"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
After I zoom out the listview, I clicked the first item but a toast with
string "is" showed.
Best regards,
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGEr1ZoujclPjdGj2j6OlxXOST7s6G7Kks5uFOkLgaJpZM4VJLn1>
.
|
Thanks for your answer. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello Xjasz,
I tried your code, it worked.
But I found a problem after zoom list view.
I clicked the first item in listview to show content (purpose item just is a string) after I zoomed listview. But the second item's content showed.
I tried fix this problem but didn't work.
So, could you share your opinion and solution?
Many thanks.
The text was updated successfully, but these errors were encountered: