Skip to content

fix runtime error #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
import android.support.v7.widget.SnapHelper;
import android.view.Menu;
import android.view.MenuItem;
import com.commonsware.cwac.crossport.design.widget.TabLayout;
import com.commonsware.cwac.crossport.design.widget.TabLayoutLite;

public class MainActivity extends FragmentActivity {
private final SnapHelper snapperCarr=new PagerSnapHelper();
private RecyclerViewEx pager;
private PageAdapter adapter;
private LinearLayoutManager layoutManager;
private TabLayout tabs;
private TabLayoutLite tabs;
private MenuItem remove;
private EditorViewModel viewModel;

Expand Down Expand Up @@ -60,19 +60,19 @@ public void onCreate(Bundle savedInstanceState) {
tabs.addTab(tabs.newTab().setText(adapter.getTabText(i)));
}

tabs.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
tabs.addOnTabSelectedListener(new TabLayoutLite.OnTabSelectedListener() {
@Override
public void onTabSelected(TabLayout.Tab tab) {
public void onTabSelected(TabLayoutLite.Tab tab) {
pager.smoothScrollToPosition(tab.getPosition());
}

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

@Override
public void onTabReselected(TabLayout.Tab tab) {
public void onTabReselected(TabLayoutLite.Tab tab) {
// unused
}
});
Expand Down Expand Up @@ -167,8 +167,8 @@ private void swap() {

adapter.swap(first, second);

TabLayout.Tab firstTab=tabs.getTabAt(first);
TabLayout.Tab secondTab=tabs.getTabAt(second);
TabLayoutLite.Tab firstTab=tabs.getTabAt(first);
TabLayoutLite.Tab secondTab=tabs.getTabAt(second);
CharSequence firstText=firstTab.getText();

firstTab.setText(secondTab.getText());
Expand Down