Category : java

Friend, sorry for not clear english, i am get username and id from server to spinner then i select username from spinner click name how to show all relative data of this username on recyclerview .how can i solve this problem .thanks HashMap<String ,String> map = new HashMap<>(); User_Interface api = ApiClient.getClient().create(User_Interface.class); Call<List<OrdersListModel>> userlistcall = ..

Read more

i am experiencing some problems when I try to add an image to my contraint layout. I have the next CL: I add also the xml code: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".pl.view.activities.Test1Activity" android:id="@+id/test_layout"> <TextView android:id="@+id/textView3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="64dp" android:fontFamily="sans-serif-black" android:text="1. Galdera: bla bla bla…" android:textColor="#1E0354" android:textSize="18sp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> ..

Read more

I am populating Recycler View with a List of 7 string items but Recycler view only loads two of them by the way my data is long text and it loads all items when text is short this is my ContentAdapter.java public class ContentAdapter extends RecyclerView.Adapter<ContentAdapter.ViewHolder> { private LayoutInflater mInflater; private List<String> mContent; ContentAdapter(Context context, ..

Read more

public void Match(View v) { //Button String skill = skillspin.getSelectedItem().toString(); //spinner skill can select 1-5 value String technique = techniquespin.getSelectedItem().toString(); //spinner "" String control = controlspin.getSelectedItem().toString(); // spinner "" String management = managementspin.getSelectedItem().toString(); // spinner "" //s //@@@@ //s //@@@@@@ //sa CollectionReference coachskillref = firebaseFirestore.collection("prfcoachskill"); //i want to get coachskill to firestore and display the ..

Read more

I am trying to use the android web-api wrapper from this link: https://github.com/kaaes/spotify-web-api-android On the link it suggests to do the following: 1)Clone the repository: git clone https://github.com/kaaes/spotify-web-api-android.git 2)Build: ./gradlew assemble 3)Grab the aar that can be found in spotify-api/build/outputs/aar/spotify-web-api-android-0.4.1.aar When I try to run "gradlew assemble", I get the following error: FAILURE: Build failed ..

Read more

Let’s say I have two classes A and B. public class myClassA { private void asyncMethodA(String url){ Observable.fromCallable((Callable<Void>) () -> null //common part of the code ).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer<Void>() { @Override public void onSubscribe(@NonNull Disposable d) { } @Override public void onNext(@NonNull Void aVoid) { someACode(); //This part is different for each class } @Override public ..

Read more

I’m writing a program (for learning purposes). Its basically a recyclerView showing popular movies from TMdb. Everything works fine but my main issue is that Json code from the API shows ImageURL or "Poster_path" like this: "page":1, "results":[ { "adult":false, "backdrop_path":"/srYya1ZlI97Au4jUYAktDe3avyA.jpg", "genre_ids":[ 14, 28, 12 ], "id":464052, "original_language":"en", "original_title":"Wonder Woman 1984", "overview":"Wonder Woman comes into ..

Read more

I have this method that is using the deprecated module AsyncTask: private void createNewNote() { AsyncTask<ContentValues, Void, Uri> task = new AsyncTask<ContentValues, Void, Uri>() { @Override protected Uri doInBackground(ContentValues… params) { ContentValues insertValues = params[0]; Uri rowUri = getContentResolver().insert(Notes.CONTENT_URI, insertValues); return rowUri; } @Override protected void onPostExecute(Uri uri) { mNoteUri = uri; } }; ContentValues ..

Read more