Ugrás a fő tartalomra

Bejegyzések

androiddev címkéjű bejegyzések megjelenítése

Nagggyon menő

Nagggyon menő Originally shared by Armando Ferreira New YouTube video on Autovoice. This small demo shows how Android is years ahead compared to other mobile platforms. This is due to being Open Source and the amazing development community.  Stay tuned for Tasker Intermediate Tutorials. +1 and reshare if you love Android. #Tasker   #Autovoice   #Android   #androiddev   #androidftw     http://www.youtube.com/watch?v=r_9-TYIt1JQ

Alap kéne legyen.

Alap kéne legyen. Originally shared by Aladin Q SeekBar with a logarithmic scale on Android. A linear volume slider do not match human perception of sound intensity (Psychoacoustics). Consequently, using a SeekBar to properly control a volume in your application requires little extra code.  A SeekBar ranging from 1 to 100 returns value from 1 to 100, linearly ( y = x ): 1 -- 25 -- 50 -- 75 --> 100 A logarithmic SeekBar ranging from 1 to 100 returns value from 0 to 100: 0 --  4 -- 20 -- 52 --> 100 This trivial formula y = (x²/200)*log(x) in the OnSeekBarChangeListener listener will allow us to change the default linear SeekBar into a logarithmic one. --- @Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {     int x = progress;     int y = (int) (((x*x)/200)*Math.log10(x));     // Use the value "y" to control a volume level } #Android   #AndroidDev   #SeekBar  Audioid