首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我的应用程序中没有编辑文本字段正在运行。键盘没有打开

我的应用程序中没有编辑文本字段正在运行。键盘没有打开
EN

Stack Overflow用户
提问于 2018-08-27 18:55:56
回答 2查看 126关注 0票数 0

当触摸Edittext字段时,永远不会打开键盘。我不知道这个问题的原因。但是,我不能在我的应用程序中写任何编辑文本字段。我的阶梯;

代码语言:javascript
复制
apply plugin: 'com.android.application'android {
compileSdkVersion 27
defaultConfig {
    applicationId "dotdotdot"
    minSdkVersion 22
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}}dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',{
    exclude group: 'com.android.support', module: 'support-annotations'
})implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:palette-v7:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.0'
implementation 'com.android.support:support-vector-drawable:27.1.0'
implementation 'com.jakewharton:butterknife:8.5.1'
implementation 'com.github.filippudak.progresspieview:library:1.0.+'
implementation 'com.github.rahatarmanahmed:circularprogressview:2.5.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.roughike:bottom-bar:2.0.2'
implementation 'com.intuit.sdp:sdp-android:1.0.5'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation 'com.github.bumptech.glide:glide:4.6.1'
implementation 'com.github.d-max:spots-dialog:0.7@aar'
implementation 'com.github.aakira:expandable-layout:1.4.2@aar'
implementation 'com.github.mirrajabi:search-dialog:1.1'
implementation 'com.roomorama:caldroid:3.0.1'
implementation 'net.igenius:customcheckbox:1.3'
implementation 'com.evrencoskun.library:tableview:0.8.6'
implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
implementation 'com.github.piasy:GlideImageLoader:1.4.6'
implementation 'com.googlecode.json-simple:json-simple:1.1'
implementation 'org.sufficientlysecure:html-textview:3.5'
implementation 'com.github.irshulx:laser-native-editor:2.1.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
implementation 'jp.wasabeef:glide-transformations:3.1.1'
implementation 'com.github.firdausmaulan:GlideSlider:1.1.0'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.afollestad.material-dialogs:commons:0.9.6.0'
implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
implementation 'com.alespero:expandable-cardview:0.6'

我的样本EditText区域:

代码语言:javascript
复制
<LinearLayout
    android:layout_marginTop="5dp"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="30dp"
        android:text="Notlar"
        android:textStyle="bold" />
    <EditText
        android:id="@+id/notes"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/details_top_margin_large"
        android:hint="No Data.."
        android:textColor="@color/colorAccent"
        android:textSize="14sp"
        android:textStyle="bold" />
</LinearLayout>

我有两个活动。LoginActivity和MainActivity.也有很多碎片。

编辑文本在LoginActivity (用户名和密码)中运行良好,但在MainActivity中没有任何编辑文本工作。

昨天我对SDK做了一个重大的更新。我不知道它是否与它有关,因为我没有对守则作太多修改。

我解决了问题。这花了一天时间。我不知道为什么,但我把这个项目移到了一个新的项目。编辑文本字段现在正在工作。

EN

回答 2

Stack Overflow用户

发布于 2018-08-27 19:34:32

你的EditText在我的手机上运行得很好,无论是虚拟的还是真实的。

然而,

如果没有安装所有SDK工具,则可能会导致此问题。请安装SDK工具部分中列出的所有内容。

希望能帮上忙。

票数 0
EN

Stack Overflow用户

发布于 2018-08-27 21:29:46

如果其他解决方案尚未工作,您可以尝试使EditText焦点可用:

代码语言:javascript
复制
android:focusable="true"
android:focusableInTouchMode="true"
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52045431

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档