Search in sources :

Example 26 with TabLayout

use of com.google.android.material.tabs.TabLayout in project twicalico by moko256.

the class MainActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    setTheme(R.style.MainActivityTheme);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    disposable = new CompositeDisposable();
    client = GlobalApplicationKt.getClient(this);
    accountsModel = GlobalApplicationKt.getAccountsModel(this);
    Toolbar toolbar = findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    toolbar.getChildAt(0).setOnClickListener(v -> {
        Fragment fragment = getMainFragment();
        if (fragment instanceof MovableTopInterface) {
            ((MovableTopInterface) fragment).moveToTop();
        }
    });
    drawer = findViewById(R.id.drawer_layout);
    if (drawer != null) {
        ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
        toggle.setDrawerSlideAnimationEnabled(false);
        toggle.syncState();
        drawer.addDrawerListener(this);
    } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        getWindow().setStatusBarColor(ContextCompat.getColor(this, R.color.color_primary_dark));
    }
    navigationView = findViewById(R.id.nav_view);
    navigationView.setNavigationItemSelectedListener(item -> {
        int id = item.getItemId();
        if (!item.isChecked()) {
            switch(id) {
                case R.id.nav_timeline:
                    replaceFragment(new HomeTimeLineFragment());
                    break;
                case R.id.nav_mentions:
                    replaceFragment(new MentionsFragment());
                    break;
                case R.id.nav_account:
                    startMyUserActivity();
                    break;
                case R.id.nav_follow_and_follower:
                    replaceFragment(new MyFollowFollowerFragment());
                    break;
                case R.id.nav_like:
                    replaceFragment(UserLikeFragment.Companion.newInstance(client.getAccessToken().getUserId()));
                    break;
                case R.id.nav_lists:
                    replaceFragment(SelectListsEntriesFragment.Companion.newInstance(client.getAccessToken().getUserId()));
                    break;
                case R.id.nav_settings:
                    startActivity(new Intent(this, SettingsActivity.class));
                    break;
            }
        }
        if (drawer != null) {
            drawer.closeDrawer(GravityCompat.START);
        }
        return (id != R.id.nav_settings) && (id != R.id.nav_account);
    });
    View headerView = navigationView.inflateHeaderView(R.layout.nav_header_main);
    userNameText = headerView.findViewById(R.id.user_name);
    userIdText = headerView.findViewById(R.id.user_id);
    userImage = headerView.findViewById(R.id.user_image);
    userToggleImage = headerView.findViewById(R.id.toggle_account);
    userBackgroundImage = headerView.findViewById(R.id.user_bg_image);
    userBackgroundImage.setOnClickListener(v -> changeIsDrawerAccountsSelection());
    accountListView = new RecyclerView(this);
    accountListView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
    accountListView.setLayoutManager(new LinearLayoutManager(this));
    accountListView.setOverScrollMode(View.OVER_SCROLL_NEVER);
    accountListView.setVisibility(View.GONE);
    navigationView.addHeaderView(accountListView);
    adapter = new SelectAccountsAdapter(this);
    adapter.onImageButtonClickListener = accessToken -> {
        if (accessToken.getUserId() != client.getAccessToken().getUserId()) {
            changeIsDrawerAccountsSelection();
            if (drawer != null) {
                drawer.closeDrawer(GravityCompat.START);
            }
            GlobalApplicationKt.preferenceRepository.putString(KEY_ACCOUNT_KEY, accessToken.getKeyString());
            ((GlobalApplication) getApplication()).initCurrentClient(accessToken);
            client = GlobalApplicationKt.getClient(this);
            adapter.updateSelectedPosition(accessToken);
            updateDrawerImage();
            clearAndPrepareFragment();
        }
    };
    adapter.onAddButtonClickListener = v -> startActivityForResult(new Intent(this, OAuthActivity.class), REQUEST_OAUTH);
    adapter.onRemoveButtonClickListener = v -> new AlertDialog.Builder(this).setMessage(R.string.confirm_logout).setCancelable(true).setPositiveButton(R.string.do_logout, (dialog, i) -> {
        AccessToken token = accountsModel.get(GlobalApplicationKt.preferenceRepository.getString(KEY_ACCOUNT_KEY, "-1"));
        accountsModel.delete(token);
        adapter.removeAccessTokensAndUpdate(token);
        int point = accountsModel.size() - 1;
        if (point != -1) {
            AccessToken accessToken = accountsModel.getAccessTokens().get(point);
            GlobalApplicationKt.preferenceRepository.putString(KEY_ACCOUNT_KEY, accessToken.getKeyString());
            ((GlobalApplication) getApplication()).initCurrentClient(accessToken);
            client = GlobalApplicationKt.getClient(this);
            adapter.updateSelectedPosition(accessToken);
            updateDrawerImage();
            updateAccountsList();
            clearAndPrepareFragment();
        } else {
            GlobalApplicationKt.preferenceRepository.putString(KEY_ACCOUNT_KEY, "-1");
            ((GlobalApplication) getApplication()).clearCurrentClient();
            startActivityForResult(new Intent(this, OAuthActivity.class), REQUEST_OAUTH);
        }
    }).setNegativeButton(android.R.string.cancel, null).show();
    accountListView.setAdapter(adapter);
    findViewById(R.id.fab).setOnClickListener(v -> startActivity(new Intent(this, PostActivity.class)));
    tabLayout = findViewById(R.id.toolbar_tab);
    tabLayout.addOnTabSelectedListener(this);
    alwaysCloseApp = GlobalApplicationKt.preferenceRepository.getBoolean(KEY_ALWAYS_CLOSE_APP, true);
    recycledViewPool = new RecyclerView.RecycledViewPool();
    recycledViewPool.setMaxRecycledViews(R.layout.layout_post_card, 16);
    getSupportFragmentManager().addOnBackStackChangedListener(() -> attachFragment(getMainFragment()));
    if (client == null) {
        startActivityForResult(new Intent(this, OAuthActivity.class), REQUEST_OAUTH);
    } else {
        updateDrawerImage();
        updateAccountsList();
        if (savedInstanceState == null) {
            prepareFragment();
        }
        if (client.getAccessToken().getToken().isEmpty()) {
            Toast.makeText(this, R.string.please_re_login, Toast.LENGTH_LONG).show();
        }
    }
}
Also used : LinearLayout(android.widget.LinearLayout) Bundle(android.os.Bundle) NonNull(androidx.annotation.NonNull) ImageView(android.widget.ImageView) AccountsModel(com.github.moko256.twitlatte.model.AccountsModel) AppCompatActivity(androidx.appcompat.app.AppCompatActivity) AndroidSchedulers(io.reactivex.android.schedulers.AndroidSchedulers) DrawableTransitionOptions(com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions) ActivityOptionsCompat(androidx.core.app.ActivityOptionsCompat) RequestManager(com.bumptech.glide.RequestManager) ActionBarDrawerToggle(androidx.appcompat.app.ActionBarDrawerToggle) Fragment(androidx.fragment.app.Fragment) View(android.view.View) ListEntry(com.github.moko256.latte.client.base.entity.ListEntry) EmojiToTextViewSetter(com.github.moko256.twitlatte.view.EmojiToTextViewSetter) Schedulers(io.reactivex.schedulers.Schedulers) RecyclerView(androidx.recyclerview.widget.RecyclerView) ContextCompat(androidx.core.content.ContextCompat) MediaUrlConverter(com.github.moko256.latte.client.base.MediaUrlConverter) TabLayout(com.google.android.material.tabs.TabLayout) ViewGroup(android.view.ViewGroup) Objects(java.util.Objects) DpToPxKt(com.github.moko256.twitlatte.view.DpToPxKt) List(java.util.List) CompositeDisposable(io.reactivex.disposables.CompositeDisposable) TextView(android.widget.TextView) Nullable(androidx.annotation.Nullable) KEY_ALWAYS_CLOSE_APP(com.github.moko256.twitlatte.repository.PreferenceRepositoryKt.KEY_ALWAYS_CLOSE_APP) Toolbar(androidx.appcompat.widget.Toolbar) Emoji(com.github.moko256.latte.client.base.entity.Emoji) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) DrawerLayout(androidx.drawerlayout.widget.DrawerLayout) KeyEvent(android.view.KeyEvent) AlertDialog(androidx.appcompat.app.AlertDialog) NavigationView(com.google.android.material.navigation.NavigationView) User(com.github.moko256.latte.client.base.entity.User) Pair(android.util.Pair) Intent(android.content.Intent) Single(io.reactivex.Single) MenuItem(android.view.MenuItem) ArrayList(java.util.ArrayList) TwitterStringUtils(com.github.moko256.twitlatte.text.TwitterStringUtils) Toast(android.widget.Toast) Menu(android.view.Menu) Build(android.os.Build) FragmentManager(androidx.fragment.app.FragmentManager) GravityCompat(androidx.core.view.GravityCompat) Client(com.github.moko256.twitlatte.entity.Client) VerifyCredentialOnSubscribe(com.github.moko256.twitlatte.rx.VerifyCredentialOnSubscribe) KEY_ACCOUNT_KEY(com.github.moko256.twitlatte.repository.PreferenceRepositoryKt.KEY_ACCOUNT_KEY) CachedUsersSQLiteOpenHelper(com.github.moko256.twitlatte.database.CachedUsersSQLiteOpenHelper) AccessToken(com.github.moko256.latte.client.base.entity.AccessToken) Glide(com.bumptech.glide.Glide) FragmentPagerAdapter(com.github.moko256.twitlatte.widget.FragmentPagerAdapter) ActionBarDrawerToggle(androidx.appcompat.app.ActionBarDrawerToggle) Intent(android.content.Intent) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) Fragment(androidx.fragment.app.Fragment) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TextView(android.widget.TextView) NavigationView(com.google.android.material.navigation.NavigationView) AccessToken(com.github.moko256.latte.client.base.entity.AccessToken) RecyclerView(androidx.recyclerview.widget.RecyclerView) CompositeDisposable(io.reactivex.disposables.CompositeDisposable) LinearLayout(android.widget.LinearLayout) Toolbar(androidx.appcompat.widget.Toolbar)

Example 27 with TabLayout

use of com.google.android.material.tabs.TabLayout in project FlexibleAdapter by davideas.

the class ViewPagerActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_view_pager);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    HeaderView headerView = (HeaderView) findViewById(R.id.toolbar_header_view);
    headerView.bindTo(getString(R.string.app_name), getString(R.string.viewpager));
    // Create the adapter that will return a fragment for each of the three
    // primary sections of the activity.
    mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());
    // Set up the ViewPager with the sections adapter.
    mViewPager = (ViewPager) findViewById(R.id.view_pager);
    mViewPager.setAdapter(mSectionsPagerAdapter);
    TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs);
    tabLayout.setupWithViewPager(mViewPager);
    // Coordinatorlayout Status Bar Padding Disappears From Viewpager 2nd-page
    // http://stackoverflow.com/questions/31368781/coordinatorlayout-status-bar-padding-disappears-from-viewpager-2nd-page
    ViewCompat.setOnApplyWindowInsetsListener(mViewPager, new OnApplyWindowInsetsListener() {

        @Override
        public WindowInsetsCompat onApplyWindowInsets(View v, WindowInsetsCompat insets) {
            insets = ViewCompat.onApplyWindowInsets(v, insets);
            if (insets.isConsumed()) {
                return insets;
            }
            boolean consumed = false;
            for (int i = 0, count = mViewPager.getChildCount(); i < count; i++) {
                ViewCompat.dispatchApplyWindowInsets(mViewPager.getChildAt(i), insets);
                if (insets.isConsumed()) {
                    consumed = true;
                }
            }
            return consumed ? insets.consumeSystemWindowInsets() : insets;
        }
    });
}
Also used : WindowInsetsCompat(androidx.core.view.WindowInsetsCompat) HeaderView(eu.davidea.samples.flexibleadapter.views.HeaderView) OnApplyWindowInsetsListener(androidx.core.view.OnApplyWindowInsetsListener) TabLayout(com.google.android.material.tabs.TabLayout) View(android.view.View) HeaderView(eu.davidea.samples.flexibleadapter.views.HeaderView) Toolbar(androidx.appcompat.widget.Toolbar)

Example 28 with TabLayout

use of com.google.android.material.tabs.TabLayout in project kcanotify by antest1.

the class ResourceLogActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_resourcelog);
    toolbar = findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    getSupportActionBar().setTitle(getStringWithLocale(R.string.action_reslog));
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    dbHelper = new KcaDBHelper(getApplicationContext(), null, KCANOTIFY_DB_VERSION);
    resourceLogger = new KcaResourceLogger(getApplicationContext(), null, KCANOTIFY_RESOURCELOG_VERSION);
    KcaApiData.setDBHelper(dbHelper);
    tabLayout = findViewById(R.id.reslog_tab);
    tabLayout.addTab(tabLayout.newTab().setText(getStringWithLocale(R.string.reslog_label_resource)));
    tabLayout.addTab(tabLayout.newTab().setText(getStringWithLocale(R.string.reslog_label_consumable)));
    tabLayout.setTabGravity(TabLayout.GRAVITY_FILL);
    export_msg = findViewById(R.id.export_msg);
    viewPager = findViewById(R.id.reslog_pager);
    pageAdapter = new KcaResourceLogPageAdapter(getSupportFragmentManager());
    viewPager.setAdapter(pageAdapter);
    viewPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {

        @Override
        public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
            tab_position = position;
            tabLayout.setScrollPosition(position, positionOffset, true);
            Log.e("KCA", "onPageScrolled " + position);
        }

        @Override
        public void onPageSelected(int position) {
        }

        @Override
        public void onPageScrollStateChanged(int state) {
        }
    });
    tabLayout.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {

        @Override
        public void onTabSelected(TabLayout.Tab tab) {
            tab_position = tab.getPosition();
            viewPager.setCurrentItem(tab.getPosition());
        }

        @Override
        public void onTabUnselected(TabLayout.Tab tab) {
        }

        @Override
        public void onTabReselected(TabLayout.Tab tab) {
            tab_position = tab.getPosition();
            viewPager.setCurrentItem(tab.getPosition());
        }
    });
    showhide_btn = findViewById(R.id.reslog_showhide);
    showhide_btn.setColorFilter(ContextCompat.getColor(getApplicationContext(), R.color.black), PorterDuff.Mode.MULTIPLY);
    showhide_btn.setImageResource(R.mipmap.ic_arrow_down);
    showhide_btn.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            is_hidden = !is_hidden;
            if (is_hidden) {
                showhide_btn.setImageResource(R.mipmap.ic_arrow_up);
            } else {
                showhide_btn.setImageResource(R.mipmap.ic_arrow_down);
            }
            pageAdapter.notifyDataSetChanged();
        }
    });
    start_date = findViewById(R.id.reslog_date_start);
    start_date.setOnClickListener(dateViewListener);
    end_date = findViewById(R.id.reslog_date_end);
    end_date.setOnClickListener(dateViewListener);
    interval_d = findViewById(R.id.reslog_interval_day);
    interval_d.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            if (interval_value != INTERVAL_1D) {
                interval_value = INTERVAL_1D;
                setFragmentChartInfo(interval_value);
                interval_select.setSelection(INTERVAL_1D);
            } else {
                pageAdapter.notifyDataSetChanged();
            }
        }
    });
    interval_w = findViewById(R.id.reslog_interval_week);
    interval_w.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            if (interval_value != INTERVAL_1W) {
                interval_value = INTERVAL_1W;
                setFragmentChartInfo(interval_value);
                interval_select.setSelection(INTERVAL_1W);
            } else {
                pageAdapter.notifyDataSetChanged();
            }
        }
    });
    interval_m = findViewById(R.id.reslog_interval_month);
    interval_m.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            if (interval_value != INTERVAL_1M) {
                interval_value = INTERVAL_1M;
                setFragmentChartInfo(interval_value);
                interval_select.setSelection(INTERVAL_1M);
            } else {
                pageAdapter.notifyDataSetChanged();
            }
        }
    });
    interval_select = findViewById(R.id.reslog_date_interval);
    final ArrayAdapter<CharSequence> interval_adapter = ArrayAdapter.createFromResource(this, R.array.time_interval_array, R.layout.spinner_item_14dp);
    interval_adapter.setDropDownViewResource(R.layout.spinner_dropdown_item_14dp);
    interval_select.setAdapter(interval_adapter);
    interval_select.setSelection(INTERVAL_1D);
    interval_select.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {

        @Override
        public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
            Log.e("KCA-RL", "onItemSelected");
            interval_value = position;
            setFragmentChartInfo(interval_value);
            KcaResourcelogItemAdpater.setListViewItemList(convertData(resourceLog));
            pageAdapter.notifyDataSetChanged();
        }

        @Override
        public void onNothingSelected(AdapterView<?> adapterView) {
        }
    });
    long current_time = System.currentTimeMillis();
    current_time = KcaUtils.getCurrentDateTimestamp(current_time);
    SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy", Locale.US);
    String[] time_list = dateFormat.format(new Date(current_time)).split("\\-");
    int year = Integer.parseInt(time_list[2]);
    int month = Integer.parseInt(time_list[0]);
    start_timestamp = current_time - DAY_MILLISECOND * KcaUtils.getLastDay(year, month == 1 ? 12 : month - 1);
    end_timestamp = current_time + DAY_MILLISECOND - 1;
    start_date.setText(convertMillsToDate(start_timestamp));
    end_date.setText(convertMillsToDate(end_timestamp));
    resourceLog = resourceLogger.getResourceLogInRange(start_timestamp, end_timestamp);
    KcaResourcelogItemAdpater.setListViewItemList(convertData(resourceLog));
    pageAdapter.notifyDataSetChanged();
}
Also used : ViewPager(androidx.viewpager.widget.ViewPager) ImageView(android.widget.ImageView) View(android.view.View) AdapterView(android.widget.AdapterView) TextView(android.widget.TextView) Date(java.util.Date) DropLogActivity.convertMillsToDate(com.antest1.kcanotify.DropLogActivity.convertMillsToDate) TabLayout(com.google.android.material.tabs.TabLayout) AdapterView(android.widget.AdapterView) SimpleDateFormat(java.text.SimpleDateFormat)

Example 29 with TabLayout

use of com.google.android.material.tabs.TabLayout in project syncthing-android by syncthing.

the class MainActivity method onCreate.

/**
 * Initializes tab navigation.
 */
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    ((SyncthingApp) getApplication()).component().inject(this);
    setContentView(R.layout.activity_main);
    mDrawerLayout = findViewById(R.id.drawer_layout);
    FragmentManager fm = getSupportFragmentManager();
    if (savedInstanceState != null) {
        mFolderListFragment = (FolderListFragment) fm.getFragment(savedInstanceState, FolderListFragment.class.getName());
        mDeviceListFragment = (DeviceListFragment) fm.getFragment(savedInstanceState, DeviceListFragment.class.getName());
        mDrawerFragment = (DrawerFragment) fm.getFragment(savedInstanceState, DrawerFragment.class.getName());
    } else {
        mFolderListFragment = new FolderListFragment();
        mDeviceListFragment = new DeviceListFragment();
        mDrawerFragment = new DrawerFragment();
    }
    mViewPager = findViewById(R.id.pager);
    mViewPager.setAdapter(mSectionsPagerAdapter);
    TabLayout tabLayout = findViewById(R.id.tabContainer);
    tabLayout.setupWithViewPager(mViewPager);
    if (savedInstanceState != null) {
        mViewPager.setCurrentItem(savedInstanceState.getInt("currentTab"));
        if (savedInstanceState.getBoolean(IS_SHOWING_RESTART_DIALOG)) {
            showRestartDialog();
        }
        mBatteryOptimizationDialogDismissed = savedInstanceState.getBoolean(BATTERY_DIALOG_DISMISSED);
        if (savedInstanceState.getBoolean(IS_QRCODE_DIALOG_DISPLAYED)) {
            showQrCodeDialog(savedInstanceState.getString(DEVICEID_KEY), savedInstanceState.getParcelable(QRCODE_BITMAP_KEY));
        }
    }
    fm.beginTransaction().replace(R.id.drawer, mDrawerFragment).commit();
    mDrawerToggle = new Toggle(this, mDrawerLayout);
    mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_LOCKED_CLOSED);
    mDrawerLayout.addDrawerListener(mDrawerToggle);
    setOptimalDrawerWidth(findViewById(R.id.drawer));
    // SyncthingService needs to be started from this activity as the user
    // can directly launch this activity from the recent activity switcher.
    Intent serviceIntent = new Intent(this, SyncthingService.class);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
        startForegroundService(serviceIntent);
    } else {
        startService(serviceIntent);
    }
    onNewIntent(getIntent());
}
Also used : FragmentManager(androidx.fragment.app.FragmentManager) DrawerFragment(com.nutomic.syncthingandroid.fragments.DrawerFragment) TabLayout(com.google.android.material.tabs.TabLayout) FolderListFragment(com.nutomic.syncthingandroid.fragments.FolderListFragment) ActionBarDrawerToggle(androidx.appcompat.app.ActionBarDrawerToggle) DeviceListFragment(com.nutomic.syncthingandroid.fragments.DeviceListFragment) Intent(android.content.Intent)

Example 30 with TabLayout

use of com.google.android.material.tabs.TabLayout in project collect by opendatakit.

the class QRCodeTabsActivity method setupViewPager.

private void setupViewPager() {
    fragmentTitleList = new String[] { getString(R.string.scan_qr_code_fragment_title), getString(R.string.view_qr_code_fragment_title) };
    ViewPager2 viewPager = findViewById(R.id.viewPager);
    TabLayout tabLayout = findViewById(R.id.tabLayout);
    QRCodeTabsAdapter adapter = new QRCodeTabsAdapter(this);
    viewPager.setAdapter(adapter);
    new TabLayoutMediator(tabLayout, viewPager, (tab, position) -> tab.setText(fragmentTitleList[position])).attach();
}
Also used : ViewPager2(androidx.viewpager2.widget.ViewPager2) Analytics(org.odk.collect.analytics.Analytics) AppBarUtils(org.odk.collect.androidshared.utils.AppBarUtils) Bundle(android.os.Bundle) TabLayout(com.google.android.material.tabs.TabLayout) Intent(android.content.Intent) ViewPager2(androidx.viewpager2.widget.ViewPager2) ODKAppSettingsImporter(org.odk.collect.settings.ODKAppSettingsImporter) PermissionListener(org.odk.collect.permissions.PermissionListener) MenuItem(android.view.MenuItem) FileProvider(org.odk.collect.android.utilities.FileProvider) Inject(javax.inject.Inject) DaggerUtils(org.odk.collect.android.injection.DaggerUtils) CurrentProjectProvider(org.odk.collect.android.projects.CurrentProjectProvider) CollectAbstractActivity(org.odk.collect.android.activities.CollectAbstractActivity) MultiClickGuard(org.odk.collect.androidshared.ui.multiclicksafe.MultiClickGuard) Menu(android.view.Menu) R(org.odk.collect.android.R) IntentLauncher(org.odk.collect.androidshared.system.IntentLauncher) TabLayoutMediator(com.google.android.material.tabs.TabLayoutMediator) Scheduler(org.odk.collect.async.Scheduler) TabLayout(com.google.android.material.tabs.TabLayout) TabLayoutMediator(com.google.android.material.tabs.TabLayoutMediator)

Aggregations

TabLayout (com.google.android.material.tabs.TabLayout)36 View (android.view.View)19 Bundle (android.os.Bundle)13 Toolbar (androidx.appcompat.widget.Toolbar)13 NonNull (androidx.annotation.NonNull)12 ViewPager (androidx.viewpager.widget.ViewPager)12 ViewPager2 (androidx.viewpager2.widget.ViewPager2)11 TabLayoutMediator (com.google.android.material.tabs.TabLayoutMediator)11 Fragment (androidx.fragment.app.Fragment)10 Intent (android.content.Intent)9 LayoutInflater (android.view.LayoutInflater)9 ViewGroup (android.view.ViewGroup)9 TextView (android.widget.TextView)7 Nullable (androidx.annotation.Nullable)7 FragmentStateAdapter (androidx.viewpager2.adapter.FragmentStateAdapter)7 Context (android.content.Context)6 R (de.danoeh.antennapod.R)5 SharedPreferences (android.content.SharedPreferences)3 MenuItem (android.view.MenuItem)3 FrameLayout (android.widget.FrameLayout)3