Scale Animation for SurfaceView

I'm trying to create a SurfaceView that scales down with animation(including it's black background canvas). i've search for multiple ways but it looks as if the view isn't scaled correctly or doesn't scale at all.

this is the layout:

<LinearLayout>
         <RelativeLayout
             android:id="@+id/gfxComponentContainer"
             android:layout_width="292dp"
             android:layout_height="260dp"
             android:background="@color/black" 
             android:gravity="center_horizontal">

             <SurfaceView
                  android:id="@+id/gfxComponent"
                  android:layout_width="fill_parent"
                  android:layout_height="fill_parent"
              />
          </RelativeLayout>
</LinearLayout>

Any help would be appreciated!

Answers


SurfaceHolder.setSizeFromLayout() might be what you are (were) looking for. http://developer.android.com/reference/android/view/SurfaceHolder.html#setSizeFromLayout()


Need Your Help

How do I use TensorFlow to add Predicted Value to an empty column in a CSV file?

python csv tensorflow

So I have this great bit of code that comes out with approximately a 93% accuracy rate on its predictions. What I'm wondering how to do now is to take the trained program, make it look at actual test

inserting std::strings in to a std::map

c++ performance string map

I have a program that reads data from a file line-by-line. I would like to copy some substring of that line in to a map as below: