小编I a*_*ent的帖子

Android导航架构组件 - 导航架构组件是否仅用于单个活动?

我目前正在学习新的Android导航架构组件  (https://developer.android.com/topic/libraries/architecture/navigation/).

我有点混淆它的动机和概念,这是我的不确定性:

  1. 的Android导航建筑构件旨在消除在单一应用程序使用多个活动的需要?这意味着,整个应用程序只需要一个单一活动,所有其他页面将是片段?
  2. 在应用程序中使用多个活动,但同时使用Android导航架构组件导航片段实际上违反了Android导航架构组件的目的吗?

问题2的示例场景:

在此输入图像描述

navigation android kotlin android-jetpack android-architecture-navigation

13
推荐指数
1
解决办法
2665
查看次数

React Native - React Native Architecture

React Native Application Development 是否可以通过MVC,MVP,MVVM等软件架构实现?

谢谢.

architecture react-native react-native-android react-native-ios

12
推荐指数
1
解决办法
6781
查看次数

颤振导航栏

我刚刚开始开发应用程序,并且在导航栏中苦苦挣扎。底部的一个很好,但顶部的一个不好。我想删除按钮上方的灰色空间。

你能帮助我吗?

[图片]

码:

@override
  Widget build(BuildContext context) {   
    return new Scaffold(
        appBar: new AppBar(
          backgroundColor: Colors.grey,
          bottom: new TabBar(
            controller: controller,
            tabs: <Tab>[
              new Tab(icon: new Icon(Icons.arrow_forward)),
              new Tab(icon: new Icon(Icons.arrow_downward)),
              new Tab(icon: new Icon(Icons.arrow_back)),
            ]
          )
        ),        
        body: new TabBarView(
            controller: controller,
            children: <Widget>[
              new first.First(),
              new second.Second(),
              new third.Third(),
              new fourth.Fourth(),
              new fifth.Fifth()
            ]
        ),
    );
  }
Run Code Online (Sandbox Code Playgroud)

dart flutter

5
推荐指数
1
解决办法
5619
查看次数

(Android Studio 3.2 Beta) - 导航架构组件配置

我想尝试新的导航架构组件功能,所以我遵循了这个教程:https://www.youtube.com/watch?v = GOpeBbfyb6s.

我正在使用Android Studio 3.2 Beta 1.我安装了必要的依赖项,但当我尝试在项目中创建导航Android资源文件时,就像在上面的视频中一样,导航选项不会出现在选择菜单中.

我的问题:

尝试创建导航Android资源文件时,没有要选择的导航选项.我错过了安装中的任何步骤吗?

预期结果:

在此输入图像描述

我的情况:

没有选择的导航选项

我的build.gradle

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    // Navigation Architecture Component Configuration install HERE!!
    def nav_version = "1.0.0-alpha02"

    implementation "android.arch.navigation:navigation-fragment-ktx:$nav_version" // use -ktx for Kotlin
    implementation "android.arch.navigation:navigation-ui-ktx:$nav_version" // use -ktx for Kotlin


}
Run Code Online (Sandbox Code Playgroud)

android kotlin android-studio android-architecture-navigation

5
推荐指数
1
解决办法
1488
查看次数

Android Work Manager - Difference between ExistingPeriodicWorkPolicy.KEEP and .Replace

By referring to: Android WorkManager api for running daily task in Background

It uses the WorkManager.enqueueUniquePeriodicWork to ensure that PeriodicWorkRequest is not created multiple times.

example code:

val work = PeriodicWorkRequestBuilder<SyncWork>(15,TimeUnit.MINUTES).build()

WorkManager.getInstance().enqueueUniquePeriodicWork("TaskTag",
                                       ExistingPeriodicWorkPolicy.KEEP, work);
Run Code Online (Sandbox Code Playgroud)

However, I found it there is 2 option of ExistingPeriodicWorkPolicy which is ExistingPeriodicWorkPolicy.KEEP and ExistingPeriodicWorkPolicy.REPLACE can be use.

I try to implement it and run the code, but it does really show any differences, and it seem both of them behave the same way.

My uncertainty: …

android kotlin android-jetpack android-workmanager

4
推荐指数
2
解决办法
1966
查看次数

Android Work Manager-Work Manager是否会100%确保完成后台执行?

根据我从文档https://developer.android.com/topic/libraries/architecture/workmanager中阅读的内容,

它说:

即使您的应用被强制退出或设备重新启动,该任务仍然可以保证运行。

那么这意味着,无论如何,在后台执行的任务都会100%执行到完成为止。

例如:

应用程序具有执行工作管理器实施的按钮,该按钮可将数据上传到在线数据库,但需要Internet连接才能上传数据。因此,我的应用程序当前处于离线模式,然后单击按钮。

我的不确定性:

工作管理器是否会在后台运行该过程,并在没有Internet连接的情况下继续重试该过程?并且仅完成并停止该过程,直到建立Internet连接并完成数据上传?

android workmanagers android-workmanager

3
推荐指数
1
解决办法
3371
查看次数

Xamarin.Forms Previewer 未显示在 Visual Studio Enterprise 2017 中

我正在 Visual Studio Enterprise 2017 中使用 Xamarin 开发应用程序。我转到“查看”->“其他 Windows”,但没有 Xamarin.Forms Previewer。我很确定它昨晚还在这儿。

截屏

有谁知道发生了什么?非常感谢。

xamarin.forms visual-studio-2017

1
推荐指数
2
解决办法
6456
查看次数

如何使用同一个应用程序制作导航抽屉和底部导航?

我正在尝试在我的应用程序中使用导航抽屉和底部栏导航。因此我首先创建了导航活动。然后我尝试将底部栏导航添加到同一个活动中。我想开发这样的应用程序:

在Activity.xml 中没有BottomNavigationView,应用程序正在工作。但是当我在Activity.xml 应用程序中添加BottomNavigationView 时崩溃了。logcat 中没有任何显示。我如何在同一个活动中同时使用底部栏导航和导航抽屉,请给我一个简单的例子?谢谢

android

1
推荐指数
1
解决办法
5046
查看次数