我突然停止了我的应用程序的开发,因为我意识到这个库中不支持PreferenceFragments.新手Android开发人员可以使用任何替代方案来克服这个障碍吗?
这是我现在的主要窗口
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabHost
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_weight="0"/>
<FrameLayout
android:id="@+android:id/realtabcontent"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"/>
</LinearLayout>
<TabWidget
android:id="@android:id/tabs"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
/>
</TabHost>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
对于我的TabActivity,我使用的是我在网上找到的东西.这是一个片段:
public class TabControlActivity extends FragmentActivity implements TabHost.OnTabChangeListener
{
public static final int INSERT_ID = Menu.FIRST;
public static TabControlActivity thisCtx;
private TabHost mTabHost;
private HashMap mapTabInfo = new HashMap();
private TabInfo mLastTab = null;
private class TabInfo {
private String …Run Code Online (Sandbox Code Playgroud) 我是Android新手.目前,我已adt-bundle-windows-x86-20131030.zip安装(Windows 32位) - 并已成功安装Android SDK和Eclipse.此外,我已经更新了Android SDK管理器中的所有内容.现在,我正在使用Android v-4.4.2
我的项目成功运行,但是当我导入时android.support.v7.app.ActionBarActivity;,import android.support.v7.app.ActionBar;项目将无法调试.我收到了错误The Import android.support.v7 cannot be resolved
我在谷歌搜索并安装Android Support Library然后添加v7到我的项目中.
截图

成功添加,appCompat但我仍然得到错误.