Change brightness of view
<p>I want to change brightness of view and not window by this code but i have exception when runing application:</p>

<pre><code>LayoutParams layoutpars = (LayoutParams) view.getLayoutParams();
layoutpars.screenBrightness = brightness / (float)255;
view.setLayoutParams(layoutpars);
</code></pre>

<p>Logcat:-</p>

<pre><code>11-07 18:07:54.165: I/jdwp(2390): received file descriptor 10 from ADB 
11-07 18:07:54.215: D/ddm-heap(2390): Got feature list request 
11-07 18:07:54.725: D/PhoneWindow(2390): DebugMonitor class=fortyonepost.com.BrightnessActivity focus=true 
11-07 18:07:56.635: D/AndroidRuntime(2390): Shutting down VM 
11-07 18:07:56.635: W/dalvikvm(2390): threadid=3: thread exiting with uncaught exception (group=0x4001db88)

11-07 18:07:56.635: E/AndroidRuntime(2390): Uncaught handler: thread main exiting due to uncaught exception 
11-07 18:07:56.645: E/AndroidRuntime(2390): java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams 
11-07 18:07:56.645: E/AndroidRuntime(2390): at fortyonepost.com.BrightnessActivity$1.onStopTrackingTouch(BrightnessActivity.jav‌​a:87) 
11-07 18:07:56.645: E/AndroidRuntime(2390): at android.widget.SeekBar.onStopTrackingTouch(SeekBar.java:115) 
11-07 18:07:56.645: E/AndroidRuntime(2390): at android.widget.AbsSeekBar.onTouchEvent(AbsSeekBar.java:294)
11-07 18:07:56.645: E/AndroidRuntime(2390): at android.view.View.dispatchTouchEvent(View.java:3675) 
11-07 18:07:56.645: E/AndroidRuntime(2390): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:923) 
11-07 18:07:56.645: E/AndroidRuntime(2390): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:923) 
11-07 18:07:56.645: E/AndroidRuntime(2390): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:923) 
11-07 18:07:56.645: E/AndroidRuntime(2390): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:923)
</code></pre>
