bonjour
j'essai de lancer une applicatio et je reçois ce message "error: cannot find symbol class DragAdapter" sur ItemProfile.java
voilà le code sur ItemProfile.java
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
 
package com.aqar.goestate.Item;
 
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
 
import com.aqar.goestate.R;
import com.squareup.picasso.Picasso;
import com.wonshinhyo.dragrecyclerview.DragAdapter;
import com.wonshinhyo.dragrecyclerview.DragHolder;
import com.wonshinhyo.dragrecyclerview.DragRecyclerView;
 
 
import java.util.ArrayList;
 
import de.hdodenhof.circleimageview.CircleImageView;
 
/**
 * Created by otacodes on 11/16/2018.
 */
 
public class ItemProfile extends DragAdapter {
    Context context;
 
    ArrayList<String> photos;
 
    private ItemProfile.OnItemClickListener listener;
 
 
    public interface OnItemClickListener {
        void onItemClick(String item, int postion, View view);
    }
 
 
    public ItemProfile(Context context, ArrayList<String> arrayList, ItemProfile.OnItemClickListener listener)  {
        super(context,arrayList);
        this.context=context;
        photos=arrayList;
        this.listener=listener;
    }
 
    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewtype) {
 
        return new HistoryviewHolder(LayoutInflater.from(getContext()).inflate(R.layout.item_editprofile, viewGroup, false));
 
 
    }
 
 
 
    @Override
    public int getItemCount() {
        return photos.size();
    }
 
    @Override
    public void onBindViewHolder(final DragRecyclerView.ViewHolder hol, final int position) {
        super.onBindViewHolder(hol, position);
        HistoryviewHolder holder = (HistoryviewHolder) hol;
        holder.bind(photos.get(position),position,listener);
 
        if(photos.get(position).equals("")){
            holder.cancelButton.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_add));
            Picasso.with(context).load("null").placeholder(R.drawable.image_placeholder).centerCrop().resize(200,300).into(holder.image);
 
        }else {
            holder.cancelButton.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_cancel));
            Picasso.with(context).load(photos.get(position)).placeholder(R.drawable.image_placeholder).centerCrop().resize(200,300).into(holder.image);
        }
    }
    /**
     * Inner Class for a recycler getView
     */
    class HistoryviewHolder extends DragHolder {
        View getView;
        CircleImageView image;
        ImageButton cancelButton;
        public HistoryviewHolder(View itemView) {
            super(itemView);
            getView = itemView;
            image = getView.findViewById(R.id.image);
            cancelButton = getView.findViewById(R.id.button);
        }
 
 
        public void bind(final String item, final int position , final ItemProfile.OnItemClickListener listener) {
            itemView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    listener.onItemClick(item,position,v);
                }
            });
 
            cancelButton.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    listener.onItemClick(item,position,v);
                }
            });
        }
 
 
    }
 
}
build.gradle : module app

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
 
 
apply plugin: 'com.android.application'
 
android {
    signingConfigs {
    }
    compileSdkVersion 28
    defaultConfig {
        applicationId 'com.aqar.goestate'
        manifestPlaceholders = [manifestApplicationId          : "${applicationId}",
                                onesignal_app_id               : "47e2631c-6c27-4a76-b3de-8698450f32b2",
                                onesignal_google_project_number: "REMOTE"]
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            // multiDexKeepFile file('multidex-config.txt')
        }
    }
    productFlavors {
    }
}
 
dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.android.support:exifinterface:28.0.0'
    implementation 'com.onesignal:OneSignal:3.10.5@aar'
    implementation 'com.github.ornolfr:rating-view:0.1.2@aar'
    implementation 'com.github.hani-momanii:SuperNova-Emoji:1.1'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'de.hdodenhof:circleimageview:2.1.0'
    implementation 'com.makeramen:roundedimageview:2.3.0'
    implementation 'com.android.support:percent:28.0.0'
    implementation 'com.daimajia.easing:library:2.0@aar'
    implementation 'com.daimajia.androidanimations:library:2.3@aar'
    implementation 'com.daimajia.slider:library:1.1.5@aar'
    implementation 'com.nineoldandroids:library:2.4.0'
    implementation 'me.relex:circleindicator:1.2.2@aar'
    implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    implementation 'com.android.support:recyclerview-v7:28.0.0'
 
    //noinspection GradleCompatible
    implementation 'com.google.android.gms:play-services-gcm:17.0.0'
    implementation 'com.google.android.gms:play-services-maps:17.0.0'
    implementation 'com.google.android.gms:play-services-location:17.0.0'
    implementation 'com.google.android.gms:play-services-places:17.0.0'
    implementation 'com.google.android.gms:play-services-auth:17.0.0'
    implementation 'com.google.firebase:firebase-database:18.0.1'
    implementation 'com.google.firebase:firebase-auth:18.1.0'
    implementation 'com.google.firebase:firebase-messaging:19.0.1'
    implementation 'com.google.firebase:firebase-core:17.0.1'
    implementation 'com.google.firebase:firebase-storage:18.1.1'
    implementation 'com.google.android.gms:play-services-ads:18.1.1'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.github.yesterselga:country-picker-android:1.0'
    implementation 'com.soundcloud.android:android-crop:1.0.1@aar'
    implementation 'com.android.support:design:28.0.0'
    implementation project(':httpclient')
    implementation 'com.github.bumptech.glide:glide:4.4.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support:percent:28.0.0'
    implementation 'com.mindorks.android:prdownloader:0.4.0'
    implementation 'com.anjlab.android.iab.v3:library:1.0.44'
    implementation 'pl.bclogic:pulsator4droid:1.0.3'
    implementation 'me.everything:overscroll-decor-android:1.0.4'
    implementation 'com.labo.kaji:fragmentanimations:0.1.1'
    implementation 'com.mcxiaoke.volley:library-aar:1.0.0'
    implementation 'com.makeramen:roundedimageview:2.3.0'
    implementation 'com.facebook.android:facebook-android-sdk:4.26.0'
    implementation 'com.gmail.samehadar:iosdialog:1.0'
    implementation 'com.github.channguyen:rsv:1.0.1'
    implementation 'com.github.Jay-Goo:RangeSeekBar:v2.0.6'
    implementation 'net.the4thdimension:audio-wife:1.0.3'
    implementation 'org.jsoup:jsoup:1.11.3'
    implementation 'com.wonshinhyo:dragrecyclerview.realm:1.0.5'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
 
    implementation 'com.android.support:recyclerview-v7:28.0.0'
    implementation('com.giphy.sdk:core:1.0.2@aar') {
        transitive = true
    }
    annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    testImplementation 'junit:junit:4.12'
    implementation 'com.wonshinhyo:dragrecyclerview:1.1.0'
    implementation 'com.wonshinhyo:dragrecyclerview.realm.adapter:1.0.0'
    implementation 'com.wonshinhyo:dragrecyclerview.realm.adapter:1.0.0'
    implementation 'io.realm:android-adapters:3.1.0'
    implementation 'com.wonshinhyo:dragrecyclerview.realm.adapter:1.0.0'
 
}
apply plugin: 'com.google.gms.google-services'
build.gradle : project

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
 
// Top-level build file where you can add configuration options common to all sub-projects/modules.
 
buildscript {
 
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'
        classpath 'com.google.gms:google-services:4.2.0'
    }
}
 
allprojects {
    repositories {
        google()
        jcenter()
        maven { url  "https://giphy.bintray.com/giphy-sdk" }
        maven { url "https://maven.google.com" }
        maven { url 'https://jitpack.io' }
        maven { url 'https://jcenter.bintray.com/' }
        maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local'}
 
    }
}
 
task clean(type: Delete) {
    delete rootProject.buildDir
}