| 19 |
19 |
|
| 20 |
20 |
package org.distorted.examples.effects3d;
|
| 21 |
21 |
|
| 22 |
|
import android.app.Activity;
|
| 23 |
22 |
import android.graphics.Bitmap;
|
| 24 |
23 |
import android.graphics.BitmapFactory;
|
| 25 |
24 |
import android.graphics.Canvas;
|
| ... | ... | |
| 28 |
27 |
import android.os.Bundle;
|
| 29 |
28 |
import android.support.design.widget.TabLayout;
|
| 30 |
29 |
import android.support.v4.view.ViewPager;
|
|
30 |
import android.support.v7.app.AppCompatActivity;
|
| 31 |
31 |
import android.view.View;
|
| 32 |
32 |
import android.widget.CheckBox;
|
| 33 |
33 |
|
| ... | ... | |
| 45 |
45 |
|
| 46 |
46 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
| 47 |
47 |
|
| 48 |
|
public class Effects3DActivity2 extends Activity
|
|
48 |
public class Effects3DActivity2 extends AppCompatActivity
|
| 49 |
49 |
{
|
| 50 |
50 |
private int mNumCols;
|
| 51 |
51 |
private int mNumRows;
|
| ... | ... | |
| 76 |
76 |
{
|
| 77 |
77 |
super.onCreate(savedState);
|
| 78 |
78 |
|
|
79 |
setTheme(R.style.Theme_AppCompat_NoActionBar);
|
|
80 |
|
| 79 |
81 |
Bundle b = getIntent().getExtras();
|
| 80 |
82 |
|
| 81 |
83 |
mObjectType = b.getInt("type");
|
| ... | ... | |
| 101 |
103 |
|
| 102 |
104 |
mViewPager = findViewById(R.id.effects3d_viewpager);
|
| 103 |
105 |
mViewPager.setOffscreenPageLimit(2);
|
| 104 |
|
mPager = new Effects3DTabViewPager(this, getFragmentManager() );
|
|
106 |
mPager = new Effects3DTabViewPager(this, getSupportFragmentManager() );
|
| 105 |
107 |
mViewPager.setAdapter(mPager);
|
| 106 |
108 |
TabLayout tabLayout = findViewById(R.id.effects3d_sliding_tabs);
|
| 107 |
109 |
tabLayout.setupWithViewPager(mViewPager);
|
| ... | ... | |
| 208 |
210 |
return mCenterY;
|
| 209 |
211 |
}
|
| 210 |
212 |
|
| 211 |
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
| 212 |
|
|
| 213 |
|
public float getCenterZ()
|
| 214 |
|
{
|
| 215 |
|
return mCenterZ;
|
| 216 |
|
}
|
| 217 |
|
|
| 218 |
213 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
| 219 |
214 |
|
| 220 |
215 |
public float getRegionX()
|
Make the 2nd Effects3D activity be an AppCompat one (for Fragments - avoid using a depreciated FragmentPagerAdapter).