小编Abd*_*tou的帖子

Xcode 5 - 没有找到遥控器

以下是步骤:

  1. 为beanstalkapp添加了一个repo.
  2. 在Xcode 5中添加了首选项>帐户中的repo.
  3. 用本地git创建了一个新项目.
  4. 选定的源代码管理>推送...

Xcode告诉我没有找到遥控器.我究竟做错了什么?

git version-control xcode5

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

iPhone - 具有双引号转义字符的Localizable.strings

在Localizable.strings文件中,如果我添加转义字符",则文件将无法构建进程.

例如:

"Now open ""Phone"" application" = "Maintenant ouvert ""Téléphone"" application";
Run Code Online (Sandbox Code Playgroud)

由于这条线我得到一个错误.如果注释掉,它就可以了.

iphone xcode objective-c ios

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

Xcode 5 - 静态表视图不会出现在模拟器上

我正在使用故事板.虽然静态表视图出现在故事​​板中,但在模拟器上运行后它不会出现.为了更准确,只显示节标题.如果我将样式更改为动态,则会显示表格视图!

storyboard uitableview xcode5

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

iOS - 我可以在运行时更改localizable.strings内容吗?

每次启动应用程序时,我都会通过JSON文件加载翻译.我可以解析那个JSON,清理它并将它放在localizable.strings文件中吗?

如果没有,我是否可以从Documents目录中创建的可本地化文件加载本地化?

iphone xcode localization localizable.strings ios

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

Android - 禁用ListView选择突出显示但保持OnClick启用

我想禁用用户从代码中选择行(listSelector)时出现的突出显示.我不想禁用onClick和启用的设置(我仍然想听点击,只想删除突出显示).

java android listview

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

样式无法解析

这是我正在使用的代码:

public ASSwitch(Context context, AttributeSet attrs) {
    super(context, attrs);
    TypedArray sharedTypedArray = context.getTheme().obtainStyledAttributes(
            attrs,
            R.styleable.ASSwitch,
            0, 0);

       try {
           onText = sharedTypedArray.getText(R.styleable.ASSwtich_onText, null);

       } finally {
           sharedTypedArray.recycle();
       }
}
Run Code Online (Sandbox Code Playgroud)

这是attrs.xml文件(添加到values文件夹):

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <declare-styleable name="ASSwitch">
        <attr name="onText" format="string" />
        <attr name="offText" format="string" />
        <attr name="onState" format="boolean" />
        <attr name="toogleDrawable" format="string" />
        <attr name="frameDrawable" format="string" />
    </declare-styleable>
</resources>
Run Code Online (Sandbox Code Playgroud)

这些问题的答案无法解决问题。请不要认为我的问题是重复的。


更新:似乎我导入了错误的R类。它R不是应用程序的类android.R

xml android android-custom-view styleable declare-styleable

5
推荐指数
2
解决办法
3792
查看次数

Android - 使用另一个位图屏蔽位图

我有两个位图.这是位图1:

位图1:背景

这是位图2:

位图2:帧

最终结果应为:

位图决赛

我会很感激代码,但是,我更感谢对文档或教程的引用.我想完全理解代码,我一直在developer.android.com上搜索这么久没有运气.谢谢.

java android mask bitmap filter

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

overridePendingTransition中只出现一个动画

我有两个活动A和B.在A中,我打电话给B:

Intent intent = new Intent(this, ActivityB.class);
this.startActivity(intent);
overridePendingTransition(R.anim.activity_animation_right_to_left, R.anim.activity_animation_zoom_in);
Run Code Online (Sandbox Code Playgroud)

但是,只有R.anim.activity_animation_right_to_left作品.其他动画未应用.此外,从B回到A:

finish();
overridePendingTransition(R.anim.activity_animation_zoom_out, R.anim.activity_animation_left_to_right);
Run Code Online (Sandbox Code Playgroud)

onl R.anim.activity_animation_left_to_right工作.我相信其他动画在其他情况下就像魅力一样(它们没有任何问题).我甚至在调用外部活动(例如打开浏览器窗口)时使用相同的转换.动画有效.仅适用于我的活动B,它不起作用.

编辑:这是动画XML:

R.anim.activity_animation_right_to_left

<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="300"
    android:fromXDelta="100%"
    android:interpolator="@android:anim/linear_interpolator"
    android:toXDelta="0%" /> 
Run Code Online (Sandbox Code Playgroud)

R.anim.activity_animation_left_to_right

<?xml version="1.0" encoding="utf-8"?>
<translate xmlns:android="http://schemas.android.com/apk/res/android"
    android:duration="300"
    android:fromXDelta="0%"
    android:interpolator="@android:anim/linear_interpolator"
    android:toXDelta="100%" /> 
Run Code Online (Sandbox Code Playgroud)

R.anim.activity_animation_zoom_in

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" >

    <scale
        android:duration="500"
        android:fillAfter="false"
        android:fromXScale="1.0"
        android:fromYScale="1.0"
        android:interpolator="@android:anim/linear_interpolator"
        android:pivotX="50%"
        android:pivotY="50%"
        android:startOffset="0"
        android:toXScale="0.85"
        android:toYScale="0.85" />

</set>
Run Code Online (Sandbox Code Playgroud)

animation android transition android-activity

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

未找到 Android Studio 测试报告/结果

我按照这里的说明操作:https : //developer.android.com/studio/test/index.html。我将此块添加到 app-module gradle 文件中的 Android 块中:

testOptions {
// Changes the directory where Gradle saves test reports. By default, Gradle saves test reports
// in the path_to_your_project/module_name/build/outputs/reports/ directory.
// '$rootDir' sets the path relative to the root directory of the current project.
reportDir "$rootDir/test-reports"
// Changes the directory where Gradle saves test results. By default, Gradle saves test results
// in the path_to_your_project/module_name/build/outputs/test-results/ directory.
// '$rootDir' sets the path relative to the root directory of the …
Run Code Online (Sandbox Code Playgroud)

android-studio android-gradle-plugin android-studio-2.3

5
推荐指数
0
解决办法
692
查看次数

Android Wear - 在手机上启动 Google Play

我遵循了这里的示例: https: //github.com/googlesamples/android-WearVerifyRemoteApp。我在 Wear Emulator (Android 6.0.1) 上运行该应用程序。我已经达到了应用程序未安装在手机上并且想要在设备上的 Google Play 上启动应用程序链接的程度:

// Create Remote Intent to open Play Store listing of app on remote device.
            Intent intentAndroid =
                    new Intent(Intent.ACTION_VIEW)
                            .addCategory(Intent.CATEGORY_BROWSABLE)
                            .setData(Uri.parse(PLAY_STORE_APP_URI));

            RemoteIntent.startRemoteActivity(
                    getApplicationContext(),
                    intentAndroid,
                    mResultReceiver);
Run Code Online (Sandbox Code Playgroud)

我连接了调试器,是的,我到达了这一行,但没有任何反应。手机上未启动 Google Play。我确定我已连接到手机,因为来自手机(真实设备)的其他通知出现在模拟器上。

编辑:

不清楚原因,但从手机到模拟器的连接确实有问题。真是令人沮丧,问题解决了,但断开连接并重新连接多次。

android wear-os

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