创建选项卡滑动视图失败

时间:2015-11-20 06:24:28

标签: android swipe swipeview

如何修复SELECT J.Id, J.date, J.drac, D.name as draccount, J.crac, C.name as craccount, J.dramt, J.cramt, J.lf, J.description, J.voucherType, J.reg_date, J.last_update, J.active FROM Journal J INNER JOIN Ledger D ON J.drac = D.Id INNER JOIN Ledger C ON J.crac = C.Id ?不确定我是否以正确的方法实现,但是调试器说Main is not abstract and does not override abstract method onTabReselected(Tab,FragmentTransaction) in TabListener是未使用的语句。

我从here获得了来源。

import android.app.FragmentTransaction;

2 个答案:

答案 0 :(得分:1)

ActionBar.TabListener是一个界面。因此,如果您在活动中实施ActionBar.TabListener,则必须在活动中实施这些方法:

onTabReselected(ActionBar.Tab tab, FragmentTransaction ft){}
onTabSelected(ActionBar.Tab tab, FragmentTransaction ft){}
onTabUnselected(ActionBar.Tab tab, FragmentTransaction ft){}

参考:http://developer.android.com/reference/android/app/ActionBar.TabListener.html

答案 1 :(得分:0)

在公众面前添加摘要

public abstract class Main extends FragmentActivity implements ActionBar.TabListener {