title: How to decrease brightness like screen filter
body: <p>I have been trying to create a simple app like this but I failed.
  What should I do based on this <a href="https://stackoverflow.com/a/16034322/3396638">answer</a>? The code I use:</p>
  
  <p>MainActivity.java</p>
  
  <pre><code>public class MainActivity extends Activity  { 
  
      @Override 
      public void onCreate(Bundle savedInstanceState) { 
          super.onCreate(savedInstanceState); 
          setContentView(R.layout.activity_main);
          SeekBar fseekbar = (SeekBar) findViewById(R.id.fseekBar2);
          fseekbar.setOnSeekBarChangeListener(new OnSeekBarChangeListener(){
  
      @Override
      public void onProgressChanged(SeekBar seekBar, int progress,
          boolean fromUser) {
          // TODO Auto-generated method stub
  
      }
  
      @Override
      public void onStartTrackingTouch(SeekBar seekBar) {
          // TODO Auto-generated method stub
      }
  
      @Override
      public void onStopTrackingTouch(SeekBar seekBar) {
          // TODO Auto-generated method stub
      }
  }
  </code></pre>
  
  <p>My relative Layout.xml</p>
  
  <pre><code>&lt;LinearLayout
          android:id="@+id/linear"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="vertical" &gt;
  
    &lt;SeekBar
          android:id="@+id/fseekBar2"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The problem is that I cannot create a window manager and set to layoutParams the value of the brightness.</p>