Revision c2c45d0a
Added by Leszek Koltunski over 6 years ago
src/main/java/org/distorted/examples/effects3d/Effects3DActivity2.java | ||
---|---|---|
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() |
src/main/java/org/distorted/examples/effects3d/Effects3DTab.java | ||
---|---|---|
20 | 20 |
package org.distorted.examples.effects3d; |
21 | 21 |
|
22 | 22 |
import android.os.Bundle; |
23 |
import android.app.Fragment; |
|
23 |
import android.support.v4.app.Fragment;
|
|
24 | 24 |
import android.view.LayoutInflater; |
25 | 25 |
import android.view.View; |
26 | 26 |
import android.view.ViewGroup; |
src/main/java/org/distorted/examples/effects3d/Effects3DTabViewPager.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
package org.distorted.examples.effects3d; |
21 | 21 |
|
22 |
import android.app.Fragment; |
|
23 |
import android.app.FragmentManager; |
|
24 |
import android.os.Bundle; |
|
25 |
import android.support.v13.app.FragmentPagerAdapter; |
|
22 |
import android.support.v4.app.Fragment; |
|
23 |
import android.support.v4.app.FragmentManager; |
|
24 |
import android.support.v4.app.FragmentPagerAdapter; |
|
26 | 25 |
import android.view.View; |
26 |
import android.os.Bundle; |
|
27 | 27 |
|
28 | 28 |
import org.distorted.examples.R; |
29 | 29 |
|
Also available in: Unified diff
Make the 2nd Effects3D activity be an AppCompat one (for Fragments - avoid using a depreciated FragmentPagerAdapter).