【问题标题】:GuidedStepFragment option is editable by defaultGuidedStepFragment 选项默认是可编辑的
【发布时间】:2016-02-12 13:26:03
【问题描述】:

我尝试使用 GuidedStepFragment 来组织我的电视应用程序的设置。我遇到了问题,该步骤选项像 EditText 字段一样工作,但我不使用 GuidedAction.Builder.editable() 方法。

设置片段代码

public static class SettingsFragment extends GuidedStepSupportFragment {

    @Override
    public GuidanceStylist.Guidance onCreateGuidance(Bundle savedInstanceState) {
        String title = "Настройки1";
        String description = "Настройки2";
        String breadcrumb = "Настройки3";
        Drawable icon = getActivity().getResources().getDrawable(R.drawable.app_icon_quantum);
        return new GuidanceStylist.Guidance(title, description, breadcrumb, icon);
    }

    @Override
    public void onCreateActions(@NonNull List<GuidedAction> actions,  Bundle savedInstanceState) {
        actions.add(new GuidedAction.Builder()
                    .id(1)
                    .infoOnly(true)
                    .title("Адрес сервера")
                    .build());
    }
}

我如何添加片段

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    GuidedStepSupportFragment.add(getSupportFragmentManager(), new SettingsFragment());
}
  • Android Studio 版本:Beta 4
  • Gradle 插件版本:2.0.0-beta4
  • 构建工具版本:23.0.2

【问题讨论】:

    标签: android android-tv


    【解决方案1】:

    经过一番调查,我注意到这些错误仅在应用程序在平板电脑上运行时出现,或者我尝试在模拟器上通过鼠标导航。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-20
      相关资源
      最近更新 更多