2014-04-13 2 views
1

siyamed의 위성 메뉴를 구현하려고하는데 스택 전체에서이 인기있는 질문에 직면하고 있습니다. 그러나 모든 대답을 읽었을지라도 지금까지 작동하지는 못했습니다. 누구든지 ID 작업을 할 수있는 다른 아이디어가 있습니까? 감사 ! 여기 siyamed의 위성 메뉴를 구현하는 방법은 무엇입니까?

은 다음과 같습니다

라이브러리 :

main_activity.xml :

<android.support.v4.widget.DrawerLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 

    android:id="@+id/drawer_layout" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    > 

    <!-- The main content view --> 

    <LinearLayout 
     xmlns:android="http://schemas.android.com/apk/res/android" 
     xmlns:tools="http://schemas.android.com/tools" 
     xmlns:sat="http://schemas.android.com/apk/res/android.view.ext" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     tools:context=".MainActivity" 
     android:background="@drawable/front" 
     android:gravity="bottom" 
     android:orientation="vertical" > 


     <TextView 
      android:id="@+id/textView2" 
      android:layout_width="150dp" 
      android:layout_height="60dp" 
      android:layout_marginBottom="21dp" 
      android:text="@string/cd" 
      android:textSize="15sp" 
      android:gravity="center_horizontal"/> 
    <TextView 
      android:id="@+id/textView1" 
      android:layout_width="150dp" 
      android:layout_height="wrap_content" 
      android:textAppearance="?android:attr/textAppearanceLarge" 
      android:color="@color/white" 
      android:textSize="25sp" 
      android:gravity="center_horizontal"/> 

      <com.cngcnasaud.orar 
     android:id="@+id/menu" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_gravity="bottom|right" 
     android:layout_margin="8dp" 
     sat:satelliteDistance="170dp" 
     sat:mainImage="@drawable/ic_launcher" 
     sat:totalSpacingDegree="90" 
     sat:closeOnClick="true" 
     sat:expandDuration="500"/> 





    </LinearLayout> 

    <!-- The navigation drawer --> 

    <ListView 
     android:id="@+id/drawer" 
     android:layout_width="300dp" 
     android:layout_height="match_parent" 
     android:layout_gravity="start" 
     android:background="@drawable/sdb" 
     android:choiceMode="singleChoice" 
     android:divider="@android:color/black" 
     android:dividerHeight="0dp" 
     android:textColor="@android:color/white" 
     /> 






</android.support.v4.widget.DrawerLayout> 

여기 https://github.com/siyamed/android-satellite-menu

가있다

오류는 다음과 같습니다

Multiple annotations found at this line: 
    - error: No resource identifier found for attribute 'satelliteDistance' in package 
    'android.view.ext' 
    - error: No resource identifier found for attribute 'mainImage' in package 'android.view.ext' 
    - error: No resource identifier found for attribute 'closeOnClick' in package 
    'android.view.ext' 
    - error: No resource identifier found for attribute 'expandDuration' in package 
    'android.view.ext' 
    - error: No resource identifier found for attribute 'totalSpacingDegree' in package 
    'android.view.ext' 

답변

0

이 시도 ..

난 당신이 다른에 satellite-menu 라이브러리 이름을 바꾼 생각합니다. 라이브러리를 제거하고 적용하십시오. 그리고 그 라이브러리에 apply를 다시 추가하십시오. 해결 될 것입니다.

프로젝트를 마우스 오른쪽 버튼으로 클릭하고 속성을 클릭하면 아래와 같은 Android 화면을 클릭하면 대화 상자가 나타납니다. 빨간색 이름이 라이브러리를 선택 버튼 추가 제거 버튼을 클릭 오른쪽에서 그것을 제거 표시된 것을

enter image description here

을 클릭합니다. 이 도움이 될 것입니다

희망, 적용을 클릭하고 오류가 해결 된 것을 확인 제공, 당신의 main_activity.xml에서

+0

이 방법도 작동하지 않습니다. – Ezekiel

1

이 줄 바꿉니다.이와

xmlns:sat="http://schemas.android.com/apk/res/android.view.ext 

:

xmlns:sat="http://schemas.android.com/apk/res/<your_package_name> 
0

을 네임 스페이스에 다음을 추가하십시오.

xmlns : app = "http://schemas.android.com/apk/res - 자동 "

대신 sat : use app : (즉, 토 : satelliteDistance -> 응용 프로그램 : satelliteDistance)이 작동합니다

xmlns:sat="http://schemas.android.com/apk/res/android.view.ext 

xmlns:sat="http://schemas.android.com/apk/res-auto" 

2

변경,하지만 나를 위해 일했다.

관련 문제