小编fla*_*ack的帖子

Git子模块绝对worktree路径配置

这是我的子模块redmine_dashboard配置文件:

子模块配置文件:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
    worktree = /Users/daniel/redmine/vendor/plugins/redmine_dashboard
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = git@github.com:ebc/redmine_dashboard.git
[branch "master"]
    remote = origin
    merge = refs/heads/master
[gui]
    wmstate = normal
    geometry = 841x391+-8+43 187 177
Run Code Online (Sandbox Code Playgroud)

苹果电脑

worktree = /Users/daniel/redmine/vendor/plugins/redmine_dashboard
Run Code Online (Sandbox Code Playgroud)

Linux的

worktree = /home/daniel/redmine/vendor/plugins/redmine_dashboard
Run Code Online (Sandbox Code Playgroud)

问题

我可以为亲戚更改此绝对路径吗?就像是:

worktree = ../../vendor/plugins/redmine_dashboard
Run Code Online (Sandbox Code Playgroud)

git git-submodules

12
推荐指数
2
解决办法
6118
查看次数

如何使用兼容性库获取"?android:attr/actionBarSize"

我正在尝试在Android 2.2项目中使用Fragments和ActionBar.使用"?android:attr/actionBarSize"时有一些错误,如何正确获取和设置该值?

例:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/frags">

    <fragment class="com.example.android.hcgallery.TitlesFragment"
            android:id="@+id/frag_title"
            android:visibility="gone"
            android:layout_marginTop="?android:attr/actionBarSize"
            android:layout_width="@dimen/titles_size"
            android:layout_height="match_parent" />

    <fragment class="com.example.android.hcgallery.ContentFragment"
            android:id="@+id/frag_content"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

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

错误:找不到与给定名称匹配的资源(在'layout_marginTop'中,值为'?android:attr/actionBarSize').

android android-layout android-compatibility

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