So I have been searching these forums a bit each day for the past week, and I have yet to see a working solution for SmartPhones AND PPC's alike. I have tried P/Invoking AlphaBlend, SetBkMode, etc. but to no avail. I am not a great coder, so I may be using them wrong.
If anyone knows how to get this to work on SmartPhone's and PPC's, could they please share their knowledge
Thank you!
Cyclonezephyrxz7 said:
So I have been searching these forums a bit each day for the past week, and I have yet to see a working solution for SmartPhones AND PPC's alike. I have tried P/Invoking AlphaBlend, SetBkMode, etc. but to no avail. I am not a great coder, so I may be using them wrong.
If anyone knows how to get this to work on SmartPhone's and PPC's, could they please share their knowledge
Thank you!
Click to expand...
Click to collapse
What exactly do you want to do?
I want to be able to make forms / controls that have Opacity less than 255 ... (I want to do this in C#) ... take, for instance, SMSBubbles, it displays a small bubble at the bottom of the screen about a new text message...how would i be able to achieve that and still maintain the background to be transparent. Also look at SmartToolKit, when you pop open the Start Menu, the back (what is not covered by the menu) remains updating (etc.) but you still get the menu..
I want to do something along those lines...
any help is greatly appreciated
Have you checked out this blog entry?
blogs.commentor.dk/post/Transparent-Controls-in-NETCF.aspx
Or a library: http://beemobile4.net/?sitecateg=products&productID=5
Thanks for the replies, the first I tried implementing, but it didn't work as I would have hoped (The second, well I don't want to pay 45+$ for it...heh)
So I re-tried P/Invoking SetBkMode in the onPaintBackground method:
Code:
protected override void onPaintBackground(PaintEventArgs e)
{
setBkModeCE(e.Graphics.getHDC(), BkMode.TRANSPARENT);
}
I also made sure to P/Invoke
Code:
SetCursor(IntPtr cursor)
...main loop starts here...
SetCursor(IntPtr.Zero)
to get rid of the wait cursor.
While this works perfectly in terms of eliminating the background, it doesn't actually make it transparent. What it does, i can do by taking a screenshot and applying it as the bg (It doesn't update). I suppose I can use a timer and have it update the background on Events of all sorts, on user-activity, and every minute, but that seems like it is a hassle.
That may be the only way to actually do it, I don't know, but it just seems that there is a better way to do it (and be able to conserve RAM).
I used this library in one of my apps: http://code.msdn.microsoft.com/uiframework
Sourcecode is available, written in C# so its easily adaptable to your needs too.
hello i wanted to know how exactly should i write it down so that i can make different situations for example
if its x=1 new address else if x=2 new address else if x=3 new address and etc
i think im having problem with the $ placement, i wrote
$x=0?*b*/sdcard/*/b*:x=2?*b*/sdcard/*/b*:x=30?*b*/sdcard*/b*$
the /sdcard/ was just example i did include the real address on the code
where ever you see * i meant [ or ] it just xda forum changes it to BOLD so i couldnt write and after [/b
vitalero said:
hello i wanted to know how exactly should i write it down so that i can make different situations for example
if its x=1 new address else if x=2 new address else if x=3 new address and etc
i think im having problem with the $ placement, i wrote
$x=0?*b*/sdcard/*/b*:x=2?*b*/sdcard/*/b*:x=30?*b*/sdcard*/b*$
the /sdcard/ was just example i did include the real address on the code
where ever you see * i meant [ or ] it just xda forum changes it to BOLD so i couldnt write and after [/b
Click to expand...
Click to collapse
Zooper doesn't support nested conditions, so you can't to if-else conditionals. As long as your situations are not overlapping and only one condition is true at the same time, you can just write them as multiple single conditionals to work around this.
could you give me an example? i made 10 different situations and only 1 can be true at each time
and each time that it changes it takes a different file with the [/b command
vitalero said:
could you give me an example? i made 10 different situations and only 1 can be true at each time
and each time that it changes it takes a different file with the [/b command
Click to expand...
Click to collapse
Something like this:
Code:
$#situation#=1?<whatever you want for that condition>$
$#situation#=2?<whatever you want for that condition>$
$#situation#=3?<whatever you want for that condition>$
$#situation#=4?<whatever you want for that condition>$
...
This is obviously just an example to give you the general idea. I'm sure you are able to work your conditions and output into it
Thanks mate works just fine
Some people over at the fairphone.com forum reported a "sensitive" screen. They try to tap on a button (or link) and instead of triggering the button the fairphone starts scrolling. My fairphone also shows this behavior and I tried to find out why. Well, after trying for some time I realized that the shorter I tap on the screen the more likely it happens in a swipe/scroll.
So I enabled the "pointer position" option within the developer tools and shot two screen shots. In the first screenshot I tap for round about 500ms whereas in the second screenshot I tried to tap as short a possible. Like you would click with mouse. It show the error pretty obvious. Any ideas how to adjust that?
Hello
I noticed exactly this behaviour on my Fairphone, too.
That's why I started a thread on the official Fairphone website 22 days ago.
I'm not allowed to post direct links here, so I can give you only the head line here:
"Hyper-sensitive-touchscreen"
And on german Fairphone Freunde forum there's also a thread about this problem
Key-Word:
"Empfindlichkeit-des-Touchscreen"
So far, there is not very much response on these threads, but it seems that not all the handsets are affected, because not all of the answers confirmed the problems. One of the guys on fairphone website sent a request to the support team, a few days ago. Maybe he can forward the answer he gets... I'll ask him in his own fairphone thread - "Sensibility-and-reboots"
Unfortunately my phone broke after just one day, so I'm waiting for a replacement now and can't really offer a solution here...
But during the few hours, my phone worked, I entered the engineering mode (by typing *#*#3646633#*#* in the standard dialler app) and there were many options to manipulate the tuochscreen.
Maybe the more experienced guys here in the forum can work out a solution to solve the problem?!
Thank you in advance!
I have the same "hypersensitive screen" issue
Before I was used to briefly and lightly tapping/touching the screen, but with my Fairphone that often gives a scroll signal.
My developer crosshair option shows short lines, the touchpanel behaves as if I first tapped a few centimers away and then a split second later it registers where I actually touched the screen.
I had to learn to firmly tap and hold, otherwise I couldn't select anything on the screen.
It seems a sofware patch for the touchpanel is needed.
-----------------------------------------------
Fairphone FP1
Caju (v.1.1)
Touchscreen settings
I am copying this from the Fairphone forum, for future reference:
My settings, as copied from engineering mode:
tpd_em_log = 0
tpd_em_log_to_fs = 0
tpd_em_sample_cnt = 16
tpd_em_auto_time_interval = 10
tpd_em_pressure_threshold = 0
tpd_em_debounce_time = 0
tpd_em_debounce_time0 = 1
tpd_em_debounce_time1 = 4
tpd_em_spl_num = 1
tpd_em_asamp = 1
NOTE: Do NOT change any of the values (in this case, under Settings). I do not know what they do, really, and how your device might react! I just report mine, for your comparison.
Just FTR, my device works fine!
Any values different from yours? Then I would suggest reporting the issue to FP while including the link to our discussion here, and on the Fairphone forum. If we can narrow down the source of the problem to be caused by some settings, and not your environment or your specific devices hardware malfunctioning, @benkxda could report this to FP in his next mail.
boondiordna said:
I am copying this from the Fairphone forum, for future reference:
My settings, as copied from engineering mode:
tpd_em_log = 0
tpd_em_log_to_fs = 0
tpd_em_sample_cnt = 16
tpd_em_auto_time_interval = 10
tpd_em_pressure_threshold = 0
tpd_em_debounce_time = 0
tpd_em_debounce_time0 = 1
tpd_em_debounce_time1 = 4
tpd_em_spl_num = 1
tpd_em_asamp = 1
NOTE: Do NOT change any of the values (in this case, under Settings). I do not know what they do, really, and how your device might react! I just report mine, for your comparison.
Just FTR, my device works fine!
Any values different from yours? Then I would suggest reporting the issue to FP while including the link to our discussion here, and on the Fairphone forum. If we can narrow down the source of the problem to be caused by some settings, and not your environment or your specific devices hardware malfunctioning, @benkxda could report this to FP in his next mail.
Click to expand...
Click to collapse
I already put a link on fairphone.com to this XDA thread. Thanks for telling! Well, my settings looks identical to yours. I also played around with them. I have no idea if touch screens nowadays need deboucing or sth like that. So I changed these settings a bit...without improvement though. I am also wondering what tpd_em_log is. It is put to 0. I put it to 1 hoping there is some log written somewhere....but i could not find where unfortunately.
Hey there,
I have the same problem and no solution. But here is my input on that issue. Maybe it helps Fairphone when they investigate that issue, maybe not.
hanzano said:
Well, after trying for some time I realized that the shorter I tap on the screen the more likely it happens in a swipe/scroll.
Click to expand...
Click to collapse
I realized the same thing. BUT in addition, I figured out that it has also something to do with how soft you touch. If I try and touch my screen very very gently, I can reconstruct that behaviour every time. If I press a bit harder, it works better.
I attached a screenshot where I did soft touches, and you see a lot of wiggeling especially in the botom row
Yesterday I was annoyed by this issue. I was a bit in a hurry and the Fairphone touchscreen did not react properly
So I just debugged in Android Studio and this is what I logged:
Code:
12:07:48.874 MotionEvent.ACTION_DOWN: 300.44363, 485.4943
12:07:48.886 MotionEvent.ACTION_MOVE: 293.13342, 499.09888
12:07:48.901 MotionEvent.ACTION_MOVE: 293.45657, 497.48178
...
12:07:49.168 MotionEvent.ACTION_MOVE: 293.45657, 497.48178
12:07:49.183 MotionEvent.ACTION_MOVE: 291.2037, 497.48178
12:07:49.198 MotionEvent.ACTION_MOVE: 290.46213, 497.48178
...
12:07:49.403 MotionEvent.ACTION_MOVE: 290.46213, 497.48178
12:07:49.406 MotionEvent.ACTION_UP: 290.46213, 497.48178
12:07:49.406 event.getDownTime: 566
I tapped for 566ms. Pretty obvious that from ACTION_DOWN to the first ACTION_MOVE there is a big delta of ~14px (is it really pixel?) in y-direction.
Hey there,
probably this does not help anyone, but just for the sake of documentation: due to my headphone-jack issue, my fairphone got replaced by a new one. Now it seems that my sensitive screen issue is gone.
I don't know about how many sources you guys have, but if you have the kernel sources, someone could try to implement a filter (and enable debugging logs in the kmsg ofc) so touches under 400ms (just a value for explanation) are only getting registered as touches, but not as movements. However, this could also have some downsides (pretty fast swipes for example), therefore a sysfs option would be a nice idea
But this would at least be a workaround.
Hyst said:
Hey there,
probably this does not help anyone, but just for the sake of documentation: due to my headphone-jack issue, my fairphone got replaced by a new one. Now it seems that my sensitive screen issue is gone.
Click to expand...
Click to collapse
Hmm, ok.Would you mind doing another sreenshot like you did already? Just in order to see the difference.
laufersteppenwolf said:
I don't know about how many sources you guys have, but if you have the kernel sources, someone could try to implement a filter (and enable debugging logs in the kmsg ofc) so touches under 400ms (just a value for explanation) are only getting registered as touches, but not as movements. However, this could also have some downsides (pretty fast swipes for example), therefore a sysfs option would be a nice idea
But this would at least be a workaround.
Click to expand...
Click to collapse
That is what I also had in mind. I already had a look at Xposed framework trying to find out how to "intercept" global touches. With a normal Android Service it is unfortunately not possible at least what I have read so far.
hanzano said:
That is what I also had in mind. I already had a look at Xposed framework trying to find out how to "intercept" global touches. With a normal Android Service it is unfortunately not possible at least what I have read so far.
Click to expand...
Click to collapse
Xposed is a genious piece of work, however, this should be done via kernel.
Maybe @benkxda could have a chat with Fairphone about that?
hanzano said:
Hmm, ok.Would you mind doing another sreenshot like you did already? Just in order to see the difference.
Click to expand...
Click to collapse
no problem. Here you go!
As far as I am concerned I did the same thing. small fast touches.
although sometimes there is a long line, overall a lot less wiggeling.
Hyst said:
no problem. Here you go!
As far as I am concerned I did the same thing. small fast touches.
although sometimes there is a long line, overall a lot less wiggeling.
Click to expand...
Click to collapse
That looks much better than beforehand. I believe the red lines are not of interest. These just seem to be estimations. I had a look into Android source code com.android.internal.widget.PointerLocationView. The VelocityTracker has an Estimator which is drawn in light red. The MediaTek development tool seems to do it similar. So I would only count the green lines.
But I still think that this is not perfect either. I checked with my old Samsung Galaxy Ace and the Android location pointer which really gives points, no line at all when tapping shortly.
laufersteppenwolf said:
Xposed is a genious piece of work, however, this should be done via kernel.
Maybe @benkxda could have a chat with Fairphone about that?
Click to expand...
Click to collapse
I absolutely agree with you that this should actually be done on kernel/driver level. But I have no idea about Android's kernel structure or any driver layer at all. I used the Android SDK though. And unfortunately MediaTek is not giving all sources for the FairPhone
Where exactly do you expect touches to be evaluated and "forwarded" to Android? Do you have some example code of other phones probably? I am just interested how this works in software.
hanzano said:
I absolutely agree with you that this should actually be done on kernel/driver level. But I have no idea about Android's kernel structure or any driver layer at all. I used the Android SDK though. And unfortunately MediaTek is not giving all sources for the FairPhone
Where exactly do you expect touches to be evaluated and "forwarded" to Android? Do you have some example code of other phones probably? I am just interested how this works in software.
Click to expand...
Click to collapse
Sorry for the late answer, haven't seen you post
Well, kernel sources are quite easily structured, you've got the drivers, in there you find the input drivers, in which you also find the touchscreen drivers. in there are several drivers, you then need to find the correct one (in my case it's THIS file). In there are all functions to make your touchscreen work. This device also has a filter for "ghost" touches, just search for it inside this file
So, if you have located the driver of your device, you can there all needed stuff, such as the filter I mentioned
laufersteppenwolf said:
Sorry for the late answer, haven't seen you post
Click to expand...
Click to collapse
No prob
laufersteppenwolf said:
Well, kernel sources are quite easily structured, you've got the drivers, in there you find the input drivers, in which you also find the touchscreen drivers.
Click to expand...
Click to collapse
Ah ok, got it. In folder alps >> kernel >> drivers >> input >> touchscreen there are 68 files.
laufersteppenwolf said:
in there are several drivers, you then need to find the correct one (in my case it's THIS file).
Click to expand...
Click to collapse
Did you forget the link on "THIS" probably?
laufersteppenwolf said:
In there are all functions to make your touchscreen work. This device also has a filter for "ghost" touches, just search for it inside this file
So, if you have located the driver of your device, you can there all needed stuff, such as the filter I mentioned
Click to expand...
Click to collapse
Vielen Dank! Helps a lot
hanzano said:
Did you forget the link on "THIS" probably?
Click to expand...
Click to collapse
Ooops yeah, I did So HERE you go
Hello @Hyst
In the last week I was discussing with the support team pretty intensively about the touchscreen issue.
Now, they asked me to send them my phone, to see what happens on the device.
But, as I'm working abroad, its not that easy for me, to send it soon.
That's why I suggested, they should ask you, to get the IMEI of your old device - as you offered in the general thread.
Unfortunately Rick de Groot (the support guy) asked me again, to ask you for this number...
A little bit strange, but this is what I want to do now
Can you please send your old IMEI number and the RMA (repair form number) to this email:
<[email protected]>
That would be really great!
PS:
My Name is Florian W. if you want to quote me in your email.
Maybe this helps them to relate your email to my support request.
Thank you in advance!
Holzwurm86
Hi @Holzwurm86
sure thing. I've just send them an email.
Holzwurm86 said:
In the last week I was discussing with the support team pretty intensively about the touchscreen issue.
Now, they asked me to send them my phone, to see what happens on the device.
Click to expand...
Click to collapse
Good to see that there is still progress. The list of phones being affected gets bigger at the fairphone.com forum. If the engineers from Kwamecorp or Changhong need help like debugging or logging touches I am willing to help of course.
Hey all
I have a vertical progress bar,placed at y=-264,min value 900 (9.00 AM),max value 1850 (6.50 PM). It's current value is defined by progressbarcurrentvalue = $#Dm#)>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$ That is,if minutes<50 it displays current hour and minute without spaces or any chars,but if minutes>50 it displays next hour for 10 mins (like if its 16.55 it displays 1700 ). So far so good.
I want to have a horizontal line to follow my progress bar's current value. I came up with the solution that if I use the parameter [oy](ceil((progressbarcurrentvalue-900)*11/19)-264)[\oy] in my horizontal line it should do the trick. But the problem is I can't get to calculate progressbarcurrentvalue-900 it just does not do the calculation. How can i solve this?
TL;DR
I want to do the calculation $#Dm#)>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$-900 but i can't. Why?
Many thanks!
djbaha said:
Hey all
I have a vertical progress bar,placed at y=-264,min value 900 (9.00 AM),max value 1850 (6.50 PM). Its current value is defined by progressbarcurrentvalue = $#Dm#)>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$ That is,if minutes<50 it displays current hour and minute without spaces or any chars,but if minutes>50 it displays next hour for 10 mins (like if its 16.55 it displays 1700 ). So far so good.
I want to have a horizontal line to follow my progress bars current value. I came up with the solution that if I use the parameter [oy](ceil((progressbarcurrentvalue-900)*11/19)-264)[\oy] in my horizontal line it should do the trick. But the problem is I cant get to calculate progressbarcurrentvalue-900 it just does not do the calculation. How can i solve this?
TL;DR
I want to do the calculation $#Dm#)>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$-900 but i cant. Why?
Many thanks!
Click to expand...
Click to collapse
You need to enclose mathematical expressions in $'s in order for it to be evaluated as a mathematical expression. But this is not going to work:
Code:
[oy]$(ceil(($#Dm#>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$-900)*11/19)-264)$[\oy]
because you can't embed conditionals. What you need to do is condense all calculations into a single conditional.
First you can condense these 2 conditionals
Code:
$#Dm#>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$
into 1
Code:
$#Dm#>50?(#DHH#00+100):#DHmm#$
Then this
Code:
[oy]$(ceil(($#Dm#>50?(#DHH#00+100):#DHmm#$-900)*11/19)-264)$[/oy]
can be condensed by just incuding the additional calculations within the conditional
Code:
[oy]$#Dm#>50?(ceil(((#DHH#00+100)-900)*11/19)-264):(ceil((#DHHmm#-900)*11/19)-264)$[/oy]
You need to double check the above. I got a little confused with all the parentheses.
jr67 said:
You need to enclose mathematical expressions in $'s in order for it to be evaluated as a mathematical expression. But this is not going to work:
Code:
[oy]$(ceil(($#Dm#>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$-900)*11/19)-264)$[\oy]
because you can't embed conditionals. What you need to do is condense all calculations into a single conditional.
First you can condense these 2 conditionals
Code:
$#Dm#>50?(#DHH#+1):#DH#$$#Dm#<50?#Dmm#:00$
into 1
Code:
$#Dm#>50?(#DHH#00+100):#DHmm#$
Then this
Code:
[oy]$(ceil(($#Dm#>50?(#DHH#00+100):#DHmm#$-900)*11/19)-264)$[/oy]
can be condensed by just incuding the additional calculations within the conditional
Code:
[oy]$#Dm#>50?(ceil(((#DHH#00+100)-900)*11/19)-264):(ceil((#DHHmm#-900)*11/19)-264)$[/oy]
You need to double check the above. I got a little confused with all the parentheses.
Click to expand...
Click to collapse
Thank you so much !
The last formula worked flawlessly. Now im studying it to understand how it works..
Thanks!
Ok first of all im not good in english, do'nt:silly: blame me
Since i got the moto 360 i was looking for any watchface with cool animations. There was difficult to find what i was looking for. But, I found watchmaker and i got really good looking watchfaces on face repo. I read some of the Lua Watchmaker wiki and try to aply animations. No luck. But i asked a few times in Google+ community and i got the understanding. Now i will try to post what i think is one of the most beautiful and simple animation i've had on my mind since smartwatches appeared on the market. I would recommend you to do this in a copy of your watch face because if you are not too experienced you can modify a misunderstood value and you have to download the entire watch face again.
EDIT: Corrected error on "on_display_bright()"
Instructions:
1 - Find a watchface you can edit, go to the script and write this code because it makes the magic:
Code:
tweens.rotate_sec=1
tweens.rotate_min=1
tweens.rotate_hour=1
function on_display_bright()
wm_schedule {action='tween', tween='rotate_sec', from=0, to=1, duration=1.5, easing=inOutCirc}
wm_schedule {action='tween', tween='rotate_min', from=0, to=1, duration=1.3, easing=inOutCirc}
wm_schedule {action='tween', tween='rotate_hour', from=0, to=1, duration=1, easing=inOutCirc}
end
(*You can change all the values of duration and easing, but you will find more easing functions on the Watchmaker Lua Wiki
2 - Now you have to find the 3 gauge layers and edit the "Rotation" parameter. In most of cases you will find:
{drs} on seconds
{drm} on minutes
{drh} on hours
(*this can vary in many cases like {drss} simulating automatic watches but the important thing is the layer (parenthesis in a parenthesis (i really like {drss}))) -> ok pls staph!
you have to change "Rotation" parameters in each layer to this:
on seconds
Code:
tweens.rotate_sec*{drs}
on minutes
Code:
tweens.rotate_min*{drm}
on hours
Code:
tweens.rotate_hour*{drh}
3 - Send to the watch.
I recommend to set the "Display" parameter of this 3 layers to Bright only if you don't use it in ambient mode. The main reason is unless you do it, if you wake up the watch a lag occurs between last position of gauges before slept and the animation, and it looks weird. You can try it.
I hope you enjoy it, because it is easy to implement it to your watches and I think it's really cool.
Tell me if it works for you and if you like it. Post any variation of this code if you want to share it.
I can't post any watches due to commercial or non-commercial terms of use so i just post a video.
I can' post links because i'm new here but you can copy and paste in your browser and it works.
Regards
EDIT: here's a video of one of the examples:
dropbox.com/s/if7qa0z9mcv3sf8/VID_20150602_021553.mp4?dl=0
I'm getting an error on the script...also getting an error on the rotation values. I just copy/paste them in there...didn't free write them at all. you sure the code is correct? I know nothing about scripting so I can't find whats wrong.
it says 5: '(expected near'_display_bright' as the error code
any thoughts? running the beta app
There was a mistake on "function"
Hi, sorry about it, there was a mistake on the next lines:
A space between "on" and "_display". It should be written "on_diaplay". thats all
function on _display_bright()
function on_display_bright()
You know green is the correct way forget the red marked line because is the error, everything seems to be correct now.
moracabanas said:
Hi, sorry about it, there was a mistake on the next lines:
A space between "on" and "_display". It should be written "on_diaplay". thats all
function on _display_bright()
function on_display_bright()
You know green is the correct way forget the red marked line because is the error, everything seems to be correct now.
Click to expand...
Click to collapse
that did it...looks fantastic!