2017-10-08 03:03:59 +00:00
|
|
|
package cy.agorise.crystalwallet.activities;
|
|
|
|
|
2018-01-09 07:22:08 +00:00
|
|
|
import android.app.ActivityOptions;
|
2018-01-21 21:20:09 +00:00
|
|
|
import android.arch.lifecycle.ViewModelProviders;
|
2018-04-23 00:27:46 +00:00
|
|
|
import android.content.Context;
|
|
|
|
import android.content.ContextWrapper;
|
2017-11-08 02:18:31 +00:00
|
|
|
import android.content.Intent;
|
2017-11-29 07:40:41 +00:00
|
|
|
import android.content.res.Resources;
|
2018-04-23 00:27:46 +00:00
|
|
|
import android.graphics.Bitmap;
|
|
|
|
import android.graphics.BitmapFactory;
|
2018-08-17 05:43:03 +00:00
|
|
|
import android.graphics.Color;
|
|
|
|
import android.graphics.Typeface;
|
2017-12-14 05:02:00 +00:00
|
|
|
import android.media.MediaPlayer;
|
2017-10-08 03:03:59 +00:00
|
|
|
import android.os.Bundle;
|
2017-11-17 05:43:10 +00:00
|
|
|
import android.support.design.widget.FloatingActionButton;
|
2017-11-17 04:56:43 +00:00
|
|
|
import android.support.design.widget.TabLayout;
|
2017-10-08 03:03:59 +00:00
|
|
|
import android.support.v4.app.Fragment;
|
|
|
|
import android.support.v4.app.FragmentManager;
|
|
|
|
import android.support.v4.app.FragmentStatePagerAdapter;
|
2017-12-04 02:05:47 +00:00
|
|
|
import android.support.v4.app.FragmentTransaction;
|
2017-10-08 03:03:59 +00:00
|
|
|
import android.support.v4.view.ViewPager;
|
2017-11-17 04:56:43 +00:00
|
|
|
import android.support.v7.widget.Toolbar;
|
2018-08-17 05:43:03 +00:00
|
|
|
import android.text.Spannable;
|
|
|
|
import android.text.SpannableString;
|
|
|
|
import android.text.style.ForegroundColorSpan;
|
2018-01-16 23:26:35 +00:00
|
|
|
import android.util.Pair;
|
2017-12-14 05:02:00 +00:00
|
|
|
import android.view.SurfaceHolder;
|
|
|
|
import android.view.SurfaceView;
|
2017-11-17 05:43:10 +00:00
|
|
|
import android.view.View;
|
2018-08-17 05:43:03 +00:00
|
|
|
import android.view.ViewGroup;
|
2017-11-29 07:40:41 +00:00
|
|
|
import android.view.animation.LinearInterpolator;
|
2017-12-22 05:34:43 +00:00
|
|
|
import android.widget.ImageView;
|
2018-08-17 05:43:03 +00:00
|
|
|
import android.widget.LinearLayout;
|
|
|
|
import android.widget.TextView;
|
2017-10-08 03:03:59 +00:00
|
|
|
|
2018-08-23 00:00:39 +00:00
|
|
|
import com.bumptech.glide.Glide;
|
|
|
|
import com.bumptech.glide.request.RequestOptions;
|
|
|
|
|
2018-04-23 00:27:46 +00:00
|
|
|
import java.io.File;
|
2018-01-21 21:20:09 +00:00
|
|
|
|
2017-10-08 03:03:59 +00:00
|
|
|
import butterknife.BindView;
|
|
|
|
import butterknife.ButterKnife;
|
2017-11-08 02:18:31 +00:00
|
|
|
import butterknife.OnClick;
|
2017-10-08 03:03:59 +00:00
|
|
|
import cy.agorise.crystalwallet.R;
|
|
|
|
import cy.agorise.crystalwallet.fragments.BalanceFragment;
|
|
|
|
import cy.agorise.crystalwallet.fragments.ContactsFragment;
|
2018-09-18 17:45:01 +00:00
|
|
|
import cy.agorise.crystalwallet.fragments.MerchantsFragment;
|
2017-12-08 04:59:18 +00:00
|
|
|
import cy.agorise.crystalwallet.fragments.ReceiveTransactionFragment;
|
2017-12-04 02:05:47 +00:00
|
|
|
import cy.agorise.crystalwallet.fragments.SendTransactionFragment;
|
2017-10-08 03:03:59 +00:00
|
|
|
import cy.agorise.crystalwallet.fragments.TransactionsFragment;
|
2018-08-24 04:45:15 +00:00
|
|
|
import cy.agorise.crystalwallet.views.natives.GIFView;
|
2018-01-17 05:38:04 +00:00
|
|
|
import de.hdodenhof.circleimageview.CircleImageView;
|
2018-01-21 21:20:09 +00:00
|
|
|
import cy.agorise.crystalwallet.viewmodels.CryptoNetBalanceListViewModel;
|
2017-10-08 03:03:59 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by Henry Varona on 7/10/2017.
|
2018-01-12 01:15:50 +00:00
|
|
|
*
|
2017-10-08 03:03:59 +00:00
|
|
|
*/
|
2018-08-17 05:43:03 +00:00
|
|
|
public class BoardActivity extends CustomActivity {
|
2017-10-08 03:03:59 +00:00
|
|
|
|
2018-06-20 22:25:29 +00:00
|
|
|
@BindView(R.id.tabLayout)
|
|
|
|
public TabLayout tabLayout;
|
|
|
|
|
2017-10-08 03:03:59 +00:00
|
|
|
@BindView(R.id.pager)
|
|
|
|
public ViewPager mPager;
|
|
|
|
|
2017-11-17 05:43:10 +00:00
|
|
|
@BindView(R.id.fabSend)
|
|
|
|
public FloatingActionButton fabSend;
|
|
|
|
|
|
|
|
@BindView(R.id.fabReceive)
|
|
|
|
public FloatingActionButton fabReceive;
|
|
|
|
|
|
|
|
@BindView(R.id.fabAddContact)
|
|
|
|
public FloatingActionButton fabAddContact;
|
|
|
|
|
2018-08-23 00:00:39 +00:00
|
|
|
@BindView(R.id.imagevieGIF)
|
2018-08-24 04:45:15 +00:00
|
|
|
public GIFView imagevieGIF;
|
2018-08-23 00:00:39 +00:00
|
|
|
|
2017-10-08 03:03:59 +00:00
|
|
|
public BoardPagerAdapter boardAdapter;
|
|
|
|
|
2017-12-04 02:05:47 +00:00
|
|
|
/*
|
|
|
|
* the id of the account of this crypto net balance. It will be loaded
|
|
|
|
* when the element is bounded.
|
|
|
|
*/
|
|
|
|
long cryptoNetAccountId;
|
|
|
|
|
2017-12-22 05:34:43 +00:00
|
|
|
@BindView(R.id.surface_view)
|
|
|
|
public SurfaceView mSurfaceView;
|
|
|
|
|
|
|
|
@BindView(R.id.toolbar_user_img)
|
2018-01-17 05:38:04 +00:00
|
|
|
public CircleImageView userImage;
|
2018-01-12 01:15:50 +00:00
|
|
|
|
|
|
|
@BindView(R.id.lightning)
|
|
|
|
public ImageView lightning;
|
2017-12-14 05:02:00 +00:00
|
|
|
|
2018-01-16 23:26:35 +00:00
|
|
|
@BindView(R.id.triangle)
|
|
|
|
public ImageView triangle;
|
|
|
|
|
2018-04-23 00:27:46 +00:00
|
|
|
File photoDirectory;
|
|
|
|
|
2017-10-08 03:03:59 +00:00
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
setContentView(R.layout.board);
|
|
|
|
ButterKnife.bind(this);
|
|
|
|
|
2017-12-04 02:05:47 +00:00
|
|
|
//-1 represents a crypto net account not loaded yet
|
|
|
|
this.cryptoNetAccountId = -1;
|
|
|
|
|
2017-11-17 04:56:43 +00:00
|
|
|
Toolbar toolbar = findViewById(R.id.toolbar);
|
|
|
|
setSupportActionBar(toolbar);
|
|
|
|
|
2018-08-23 00:00:39 +00:00
|
|
|
/*
|
|
|
|
* Set the bubbles animation
|
|
|
|
* */
|
2018-08-27 23:55:24 +00:00
|
|
|
//imagevieGIF.centerCrop();
|
|
|
|
//imagevieGIF.load(R.raw.burbujas);
|
2018-08-23 00:00:39 +00:00
|
|
|
|
2018-08-17 05:43:03 +00:00
|
|
|
/*
|
|
|
|
* Listener tabLayout to resalt text when clicked
|
|
|
|
* */
|
2018-09-03 21:59:32 +00:00
|
|
|
final TabLayout tabLayoutFinal = tabLayout;
|
2018-08-17 05:43:03 +00:00
|
|
|
tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
|
|
|
@Override
|
|
|
|
public void onTabSelected(final TabLayout.Tab tab) {
|
|
|
|
|
|
|
|
globalActivity.runOnUiThread(new Runnable() {
|
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
|
|
|
|
LinearLayout tabLayout = (LinearLayout)((ViewGroup) tabLayoutFinal.getChildAt(0)).getChildAt(tab.getPosition());
|
2018-08-17 17:08:49 +00:00
|
|
|
tabLayout.setBackgroundColor(Color.TRANSPARENT);
|
2018-08-17 05:43:03 +00:00
|
|
|
TextView tabTextView = (TextView) tabLayout.getChildAt(1);
|
|
|
|
//tabTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP ,50);
|
|
|
|
Spannable WordtoSpan = new SpannableString(tabTextView.getText());
|
|
|
|
WordtoSpan.setSpan(new ForegroundColorSpan(Color.WHITE), 0, tabTextView.getText().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
|
|
|
tabTextView.setText(WordtoSpan);
|
|
|
|
tabTextView.setTypeface(tabTextView.getTypeface(), Typeface.BOLD);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onTabUnselected(final TabLayout.Tab tab) {
|
|
|
|
|
|
|
|
globalActivity.runOnUiThread(new Runnable() {
|
|
|
|
@Override
|
|
|
|
public void run() {
|
|
|
|
|
|
|
|
LinearLayout tabLayout = (LinearLayout)((ViewGroup) tabLayoutFinal.getChildAt(0)).getChildAt(tab.getPosition());
|
|
|
|
TextView tabTextView = (TextView) tabLayout.getChildAt(1);
|
|
|
|
//tabTextView.setTextSize(TypedValue.COMPLEX_UNIT_DIP ,50);
|
|
|
|
Spannable WordtoSpan = new SpannableString(tabTextView.getText());
|
2018-08-18 18:20:42 +00:00
|
|
|
WordtoSpan.setSpan(new ForegroundColorSpan(globalActivity.getResources().getColor(R.color.lightGrayClear)), 0, tabTextView.getText().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
2018-08-17 05:43:03 +00:00
|
|
|
tabTextView.setText(WordtoSpan);
|
|
|
|
tabTextView.setTypeface(tabTextView.getTypeface(), Typeface.NORMAL);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onTabReselected(TabLayout.Tab tab) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2018-09-03 21:59:32 +00:00
|
|
|
});
|
2018-08-17 05:43:03 +00:00
|
|
|
|
2017-12-14 05:02:00 +00:00
|
|
|
// Appbar animation
|
|
|
|
mSurfaceView.getHolder().addCallback(new SurfaceHolder.Callback() {
|
|
|
|
@Override
|
|
|
|
public void surfaceCreated(SurfaceHolder surfaceHolder) {
|
|
|
|
//Log.d(TAG,"surfaceCreated");
|
|
|
|
MediaPlayer mediaPlayer = MediaPlayer.create(BoardActivity.this, R.raw.appbar_background);
|
|
|
|
mediaPlayer.setDisplay(mSurfaceView.getHolder());
|
|
|
|
mediaPlayer.setLooping(true);
|
|
|
|
mediaPlayer.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {
|
|
|
|
//Log.d(TAG,"surfaceChanged");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
|
|
|
|
//Log.d(TAG,"surfaceDestroyed");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2017-10-08 03:03:59 +00:00
|
|
|
boardAdapter = new BoardPagerAdapter(getSupportFragmentManager());
|
|
|
|
mPager.setAdapter(boardAdapter);
|
2018-06-20 22:25:29 +00:00
|
|
|
tabLayout.setupWithViewPager(mPager);
|
2017-11-17 05:43:10 +00:00
|
|
|
|
2017-12-08 04:59:18 +00:00
|
|
|
fabReceive.setOnClickListener(new View.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
public void onClick(View view) {
|
|
|
|
receiveToThisAccount();
|
|
|
|
}
|
|
|
|
});
|
2017-12-04 02:05:47 +00:00
|
|
|
fabSend.setOnClickListener(new View.OnClickListener() {
|
2017-11-17 05:43:10 +00:00
|
|
|
@Override
|
|
|
|
public void onClick(View view) {
|
2017-12-04 02:05:47 +00:00
|
|
|
sendFromThisAccount();
|
2017-11-17 05:43:10 +00:00
|
|
|
}
|
2017-12-04 02:05:47 +00:00
|
|
|
});
|
2017-11-17 06:05:41 +00:00
|
|
|
|
2017-11-17 06:05:41 +00:00
|
|
|
// Hide Add Contact fab, it won't hide until first page changed...
|
2017-11-29 07:40:41 +00:00
|
|
|
// Convert 72dp to pixels (fab is 56dp in diameter + 16dp margin)
|
2018-01-12 01:15:50 +00:00
|
|
|
final int fabDistanceToHide = (int) (72 * Resources.getSystem().getDisplayMetrics().density);
|
2017-11-29 07:40:41 +00:00
|
|
|
fabAddContact.animate().translationY(fabDistanceToHide)
|
|
|
|
.setInterpolator(new LinearInterpolator()).start();
|
2017-11-17 05:43:10 +00:00
|
|
|
|
2017-11-17 06:05:41 +00:00
|
|
|
// Hide and show respective fabs when convenient
|
2017-11-17 05:43:10 +00:00
|
|
|
mPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
|
|
|
@Override
|
|
|
|
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onPageSelected(int position) {
|
|
|
|
|
|
|
|
switch (position) {
|
|
|
|
case 0:
|
|
|
|
fabReceive.show();
|
|
|
|
fabSend.show();
|
2017-11-29 07:40:41 +00:00
|
|
|
fabAddContact.animate().translationY(fabDistanceToHide)
|
|
|
|
.setInterpolator(new LinearInterpolator()).start();
|
2017-11-17 05:43:10 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
fabReceive.show();
|
|
|
|
fabSend.show();
|
2017-11-29 07:40:41 +00:00
|
|
|
fabAddContact.animate().translationY(fabDistanceToHide)
|
|
|
|
.setInterpolator(new LinearInterpolator()).start();
|
2017-11-17 05:43:10 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
fabReceive.hide();
|
|
|
|
fabSend.hide();
|
2017-11-29 07:40:41 +00:00
|
|
|
fabAddContact.animate().translationY(0)
|
|
|
|
.setInterpolator(new LinearInterpolator()).start();
|
2017-11-17 05:43:10 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onPageScrollStateChanged(int state) {
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
2018-04-23 00:27:46 +00:00
|
|
|
|
|
|
|
ContextWrapper cw = new ContextWrapper(getApplicationContext());
|
|
|
|
photoDirectory = cw.getDir("profile", Context.MODE_PRIVATE);
|
|
|
|
if (!photoDirectory.exists()) {
|
|
|
|
photoDirectory.mkdir();
|
|
|
|
}
|
|
|
|
loadUserImage();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void onResume() {
|
|
|
|
super.onResume();
|
|
|
|
|
|
|
|
loadUserImage();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void loadUserImage(){
|
|
|
|
//Search for a existing photo
|
|
|
|
File photoFile = new File(photoDirectory + File.separator + "photo.png");
|
|
|
|
|
|
|
|
if (photoFile.exists()){
|
|
|
|
Bitmap bitmap = BitmapFactory.decodeFile(photoFile.getPath());
|
|
|
|
userImage.setImageBitmap(bitmap);
|
|
|
|
}
|
2017-12-22 05:34:43 +00:00
|
|
|
}
|
|
|
|
|
2018-03-15 20:12:46 +00:00
|
|
|
/**
|
2017-12-22 05:34:43 +00:00
|
|
|
* dispatch the user to the accounts fragment
|
|
|
|
*/
|
|
|
|
@OnClick(R.id.toolbar_user_img)
|
|
|
|
public void accounts() {
|
2018-01-12 01:15:50 +00:00
|
|
|
Intent intent = new Intent(this, AccountsActivity.class);
|
|
|
|
|
2018-01-16 23:26:35 +00:00
|
|
|
// SharedElementTransition is only available from API level 21
|
|
|
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {
|
|
|
|
Pair p1 = Pair.create(userImage, "gravatarTransition");
|
|
|
|
Pair p2 = Pair.create(lightning, "lightningTransition");
|
|
|
|
Pair p3 = Pair.create(triangle, "triangleTransition");
|
2018-01-09 07:22:08 +00:00
|
|
|
|
2018-01-16 23:26:35 +00:00
|
|
|
ActivityOptions options = ActivityOptions
|
|
|
|
.makeSceneTransitionAnimation(this, p1, p2, p3);
|
|
|
|
|
|
|
|
startActivity(intent, options.toBundle());
|
|
|
|
} else {
|
|
|
|
startActivity(intent);
|
|
|
|
}
|
2017-10-08 03:03:59 +00:00
|
|
|
}
|
|
|
|
|
2018-02-05 01:43:20 +00:00
|
|
|
@OnClick(R.id.fabAddContact)
|
|
|
|
public void beginCreateContact(){
|
|
|
|
Intent intent = new Intent(this, CreateContactActivity.class);
|
|
|
|
startActivity(intent);
|
|
|
|
}
|
|
|
|
|
2017-12-08 04:59:18 +00:00
|
|
|
/*
|
|
|
|
* dispatch the user to the receive fragment using this account
|
|
|
|
*/
|
2018-01-12 01:15:50 +00:00
|
|
|
public void receiveToThisAccount() {
|
2017-12-08 04:59:18 +00:00
|
|
|
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
|
|
|
Fragment prev = getSupportFragmentManager().findFragmentByTag("ReceiveDialog");
|
|
|
|
if (prev != null) {
|
|
|
|
ft.remove(prev);
|
|
|
|
}
|
|
|
|
ft.addToBackStack(null);
|
|
|
|
|
2018-03-15 20:12:46 +00:00
|
|
|
long receiveCryptoNetAccountId;
|
2018-02-21 01:49:51 +00:00
|
|
|
if (this.cryptoNetAccountId != -1){
|
|
|
|
receiveCryptoNetAccountId = this.cryptoNetAccountId;
|
|
|
|
} else {
|
|
|
|
CryptoNetBalanceListViewModel cryptoNetBalanceListViewModel = ViewModelProviders.of(this).get(CryptoNetBalanceListViewModel.class);
|
|
|
|
receiveCryptoNetAccountId = cryptoNetBalanceListViewModel.getFirstBitsharesAccountId();
|
|
|
|
}
|
|
|
|
|
2017-12-08 04:59:18 +00:00
|
|
|
// Create and show the dialog.
|
2018-02-21 01:49:51 +00:00
|
|
|
ReceiveTransactionFragment newFragment = ReceiveTransactionFragment.newInstance(receiveCryptoNetAccountId);
|
2017-12-08 04:59:18 +00:00
|
|
|
newFragment.show(ft, "ReceiveDialog");
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* dispatch the user to the send fragment using this account
|
|
|
|
*/
|
2018-01-12 01:15:50 +00:00
|
|
|
public void sendFromThisAccount() {
|
2017-12-04 02:05:47 +00:00
|
|
|
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
|
|
|
Fragment prev = getSupportFragmentManager().findFragmentByTag("SendDialog");
|
|
|
|
if (prev != null) {
|
|
|
|
ft.remove(prev);
|
|
|
|
}
|
|
|
|
ft.addToBackStack(null);
|
|
|
|
|
2018-03-15 20:12:46 +00:00
|
|
|
long sendCryptoNetAccountId;
|
2018-01-21 21:20:09 +00:00
|
|
|
if (this.cryptoNetAccountId != -1){
|
|
|
|
sendCryptoNetAccountId = this.cryptoNetAccountId;
|
|
|
|
} else {
|
|
|
|
CryptoNetBalanceListViewModel cryptoNetBalanceListViewModel = ViewModelProviders.of(this).get(CryptoNetBalanceListViewModel.class);
|
|
|
|
sendCryptoNetAccountId = cryptoNetBalanceListViewModel.getFirstBitsharesAccountId();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-12-04 02:05:47 +00:00
|
|
|
// Create and show the dialog.
|
2018-01-21 21:20:09 +00:00
|
|
|
SendTransactionFragment newFragment = SendTransactionFragment.newInstance(sendCryptoNetAccountId);
|
2017-12-04 02:05:47 +00:00
|
|
|
newFragment.show(ft, "SendDialog");
|
|
|
|
}
|
|
|
|
|
2017-10-08 03:03:59 +00:00
|
|
|
private class BoardPagerAdapter extends FragmentStatePagerAdapter {
|
2018-01-12 01:15:50 +00:00
|
|
|
BoardPagerAdapter(FragmentManager fm) {
|
2017-10-08 03:03:59 +00:00
|
|
|
super(fm);
|
|
|
|
}
|
|
|
|
|
2018-06-20 22:25:29 +00:00
|
|
|
// Titles of the tabs
|
2018-09-18 17:45:01 +00:00
|
|
|
int[] tabTitles = {R.string.balances, R.string.transactions, R.string.contacts,R.string.Merchants};
|
2018-06-20 22:25:29 +00:00
|
|
|
|
2017-10-08 03:03:59 +00:00
|
|
|
@Override
|
|
|
|
public Fragment getItem(int position) {
|
|
|
|
switch (position){
|
|
|
|
case 0:
|
|
|
|
return new BalanceFragment();
|
|
|
|
case 1:
|
|
|
|
return new TransactionsFragment();
|
|
|
|
case 2:
|
|
|
|
return new ContactsFragment();
|
2018-09-18 17:45:01 +00:00
|
|
|
case 3:
|
|
|
|
return new MerchantsFragment();
|
2017-10-08 03:03:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return null; //new OnConstructionFragment();
|
|
|
|
}
|
|
|
|
|
2018-06-20 22:25:29 +00:00
|
|
|
@Override
|
|
|
|
public CharSequence getPageTitle(int position) {
|
|
|
|
return getString(tabTitles[position]);
|
|
|
|
}
|
|
|
|
|
2017-10-08 03:03:59 +00:00
|
|
|
@Override
|
|
|
|
public int getCount() {
|
2018-09-18 17:45:01 +00:00
|
|
|
return 4;
|
2017-10-08 03:03:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|