tag:blogger.com,1999:blog-32870248847068299.post7799311695504496500..comments2019-09-14T00:52:04.881-07:00Comments on Android Tutorials for Beginners: Detecting Swipe Event In Androidkamlesh Yadavhttp://www.blogger.com/profile/00613228710241117815noreply@blogger.comBlogger44125tag:blogger.com,1999:blog-32870248847068299.post-6881933040668123622016-11-26T02:37:44.214-08:002016-11-26T02:37:44.214-08:00hello .. in above snippet , if i want to highlight...hello .. in above snippet , if i want to highlight that textview contain on which swapping has been performed , so how can i do that?Tej Pandyahttps://www.blogger.com/profile/17948958188607314768noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-36730158958698204462016-11-25T21:18:57.486-08:002016-11-25T21:18:57.486-08:00Hello, your article is very nice...
if(x1&gt;x2)
{...Hello, your article is very nice...<br />if(x1&gt;x2)<br />{<br />How to highlight textview part from x1 to x2?<br />}Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-20676062446863921882016-10-17T04:32:48.630-07:002016-10-17T04:32:48.630-07:00nice articlenice articlemubarak idrishttps://www.blogger.com/profile/03338322221031965944noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-46124066497952949382016-10-07T14:02:43.927-07:002016-10-07T14:02:43.927-07:00thank you so much so helpful thank you so much so helpful Unknownhttps://www.blogger.com/profile/08239057269019633913noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-18647155485337254452016-07-08T00:08:44.625-07:002016-07-08T00:08:44.625-07:00Really nice,clear explanation,simple code,thanks Really nice,clear explanation,simple code,thanks Saran Kumarhttps://www.blogger.com/profile/13816941730897419367noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-37728629231963877822016-07-08T00:07:50.913-07:002016-07-08T00:07:50.913-07:00Really nice,clear explanation got..,Thanks
Really nice,clear explanation got..,Thanks<br />Saran Kumarhttps://www.blogger.com/profile/13816941730897419367noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-63289571775616238402016-06-08T22:40:10.700-07:002016-06-08T22:40:10.700-07:00thaaaaaanks alooooot
i searched for this method ab...thaaaaaanks alooooot<br />i searched for this method about one weak but i didnt find any thing<br />thank you very muchUnknownhttps://www.blogger.com/profile/17923362777493463774noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-2221613863403236842016-05-30T05:21:26.353-07:002016-05-30T05:21:26.353-07:00👏👏👆👍👍👏👏👆👍👍Anil Makadiahttps://www.blogger.com/profile/07436209191269953974noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-40714791833072095712016-05-28T12:37:40.874-07:002016-05-28T12:37:40.874-07:00Thaks A LOT. It REALLY helps me. Thaks A LOT. It REALLY helps me. Unknownhttps://www.blogger.com/profile/15277553952841630384noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-12671674032148182972016-05-15T12:42:14.440-07:002016-05-15T12:42:14.440-07:00Thanks it help us very muchThanks it help us very muchAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-20079054196930676322016-02-15T03:16:13.034-08:002016-02-15T03:16:13.034-08:00nice tutorialnice tutorialtohin sarkerhttps://www.blogger.com/profile/14304440877172037734noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-71845193929959287032015-11-24T06:56:43.156-08:002015-11-24T06:56:43.156-08:00Glad to see fuuastians reply :) (Y) Glad to see fuuastians reply :) (Y) Inzi Nasirhttp://micromastech.comnoreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-48984222448406335492015-11-19T05:50:38.928-08:002015-11-19T05:50:38.928-08:00First give id to TextView of Detect Swap Event Dem...First give id to TextView of Detect Swap Event Demo in main.xml<br />and then <br />if (x1 &gt; x2)<br />{<br />Toast.makeText(this, &quot;Right to Left Swap Performed&quot;, Toast.LENGTH_LONG).show();<br />// to change TextView<br />TextView tv = (TextView) findViewById(R.id.textView1);<br />tv.setText(&quot;It has now Moved to Right&quot;);<br />}Noor Mustafahttps://www.blogger.com/profile/04479628995362828621noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-58279206951531472632015-11-02T21:28:49.036-08:002015-11-02T21:28:49.036-08:00down to up dosen&#39;t work....when i include abov...down to up dosen&#39;t work....when i include above code... and left to right n down to up both work on same time...give a solution..thanks in advanceRohit Sharmahttps://www.blogger.com/profile/03214635971985068530noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-31369619652759025012015-10-29T21:16:31.153-07:002015-10-29T21:16:31.153-07:00GOODGOODAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-79790417687042325552015-10-28T23:10:56.552-07:002015-10-28T23:10:56.552-07:00very nice sir,thank you so much!!!very nice sir,thank you so much!!!Unknownhttps://www.blogger.com/profile/07257656793209138626noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-13205377260751487022015-10-20T23:48:46.731-07:002015-10-20T23:48:46.731-07:00Hi sir how exactly are we going to add the if stat...Hi sir how exactly are we going to add the if statements? could you please provide a sample. thank youChristian Inochttps://www.blogger.com/profile/03582800989492286476noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-25866994150722540872015-09-08T07:58:48.397-07:002015-09-08T07:58:48.397-07:00nice bro!
its work fine here.
thank you!nice bro!<br />its work fine here.<br /><br />thank you!Blog do armandohttps://www.blogger.com/profile/03673416052998083552noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-44387598762592593762015-08-18T10:31:07.304-07:002015-08-18T10:31:07.304-07:00If the user doesn&#39;t swipe exactly left to righ...If the user doesn&#39;t swipe exactly left to right (y1=y2) or up to down (x1=x2) then both events are detected. To solve this compare the difference of the x values with the difference of the y values. A greater difference between the x values means a left to right swipe. In the code add two float variables after the float y1,y2;<br />float diffx, diffy;<br />Right before the first if statement include the lines<br />diffx = x2-x1;<br />diffy = y2-y1;<br />Within the if statements add as follows:<br /> if (x1 &lt; x2 &amp;&amp; Math.abs(diffy) &lt; Math.abs(diffx))<br /> if (x2 &lt; x1 &amp;&amp; Math.abs(diffy) &lt; Math.abs(diffx))<br /> if (y1 &lt; y2 &amp;&amp; Math.abs(diffx) &lt; Math.abs(diffy))<br /> if (y2 &lt; y1 &amp;&amp; Math.abs(diffy) &lt; Math.abs(diffx))Andreas Kochanhttps://www.blogger.com/profile/00989258086460353470noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-72938221573140554542015-08-03T15:03:53.418-07:002015-08-03T15:03:53.418-07:00Very Helpful for beginners!!Very Helpful for beginners!!Jayhttps://www.blogger.com/profile/12398354613530053310noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-39585827332450516112015-06-01T08:08:49.790-07:002015-06-01T08:08:49.790-07:00Very Good example, buddy.Very Good example, buddy.Sergeant XBosshttp://anonhq.comnoreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-61643860425798739012015-05-31T08:38:44.732-07:002015-05-31T08:38:44.732-07:00Hello,
if (x1 &gt; x2)
...Hello, <br />if (x1 &gt; x2)<br /> {<br /> Toast.makeText(this, &quot;Right to Left Swap Performed&quot;, Toast.LENGTH_LONG).show();<br /><b>How to change TextView</b><br /> }Yakuthttp://yakutozcan.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-8169362813345002062015-05-25T03:02:56.165-07:002015-05-25T03:02:56.165-07:00How can i enable scrolling Y axis with this code?How can i enable scrolling Y axis with this code?Eldos Dashttps://www.blogger.com/profile/17275340932682359676noreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-138235165741890242015-05-07T11:24:40.821-07:002015-05-07T11:24:40.821-07:00Thanks ! That&#39;s great.Thanks ! That&#39;s great.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-32870248847068299.post-9731508764395295162015-04-05T19:02:24.499-07:002015-04-05T19:02:24.499-07:00If i want to just swipe horiztonally, how do I acc...If i want to just swipe horiztonally, how do I accomplish this? I tried to disable &quot;y&quot; but it still allows swipe vertically. rayhttps://www.blogger.com/profile/09984066610667759259noreply@blogger.com