Spinner Firebase Android Studio

Поделиться
HTML-код
  • Опубликовано: 2 дек 2024

Комментарии • 29

  • @汪俊岳
    @汪俊岳 2 года назад +1

    java.lang.nullpointerexception: attempt to invoke virtual method 'java.lang.string java.lang.object.tostring()' on a null object reference
    how can i solve it please

  • @CeceBusAddict
    @CeceBusAddict 3 года назад +1

    Terimakasih mas, works perfectly!
    for someone using fragment, try this:
    ArrayAdapter arrayAdapter = new ArrayAdapter(getActivity(), R.layout.style_spinner, arrayList);
    spinner.setAdapter(arrayAdapter);

  • @alfianrizaldi5242
    @alfianrizaldi5242 4 года назад

    bikin tutorial lanjutan ini buat ambil data dari spinner terus simpan di firebase dong bang...

    • @budyfriend_code
      @budyfriend_code  4 года назад +1

      Menggamil data dari spinner itu, simple
      kamu buat variabel dulu String vals = spinner.getSelectedItem().toString();
      nanti vals dimasukan didalam setValue pada databse firebase : database.child("path").push().setValue(vals);

    • @budyfriend_code
      @budyfriend_code  4 года назад +1

      untuk lebih lanjutnya coba kamu pelajari CRUD firebase, hanya bedanya klo EditText dia di jadikan stringnya : String vals_txt = txtEditText.getText().toString(); sedangkan yang Spinner : String vals_sp = txtSpinner.getSelectedItem().toString();

    • @officialjasakuy6205
      @officialjasakuy6205 4 года назад

      @@budyfriend_code kok ini Null ya bang pas saya coba?

  • @aya4053
    @aya4053 2 года назад

    sir how can i select an item from this spinner

  • @officialjasakuy6205
    @officialjasakuy6205 4 года назад

    bang mau nanya, kalau spinner nya mau pakai yg custom bisa gak ya?

    • @budyfriend_code
      @budyfriend_code  4 года назад

      kamu bisa liat tutorial ini ruclips.net/video/7MKgq1M0UEA/видео.html

  • @informatika_tkj
    @informatika_tkj 4 года назад

    om kalo ambilnya datanya dari sqlite gmna yah..?

  • @yogarajand5455
    @yogarajand5455 4 года назад

    Could you please tell me how to do onclick item in spinner to get the data?

    • @budyfriend_code
      @budyfriend_code  4 года назад

      The requirement to create a spinner to add data is a String array, ListArray and ArrayAdapter, the string array is replaced by a string looped in the item section, then added to the ListArray with arrayList.add (items) and then after completing ListArray adding the data, then the arraylist is inserted into the array adapter, and then the adpter is inserted into the spinner by spinner.setAdapter (arrayAdapter)

    • @pradnyakumavat5153
      @pradnyakumavat5153 4 года назад

      @@budyfriend_code can you make video on it ?

    • @budyfriend_code
      @budyfriend_code  4 года назад

      @@pradnyakumavat5153 you can watch this video

    • @pradnyakumavat5153
      @pradnyakumavat5153 4 года назад

      @@budyfriend_code which video for onclick item in spinner to get the data into another activity ?

  • @littleD3mon
    @littleD3mon Год назад

    Omm boleh bagi source code nya

    • @budyfriend_code
      @budyfriend_code  Год назад

      ini dikit loh mas wkwkw, di ketik ulang aja yah, sambil dipelajari juga

  • @shreyaspatel6667
    @shreyaspatel6667 4 года назад

    thanks a lot

  • @thirdshoot2318
    @thirdshoot2318 4 года назад

    Thank you !

  • @Liquid179
    @Liquid179 3 года назад

    Bro. you save me

  • @ZoHaTips
    @ZoHaTips 4 года назад

    Great video, can you provide source code please

    • @budyfriend_code
      @budyfriend_code  4 года назад

      You will get this source code, when you finish this tutorial, because with it you can better understand the flow or process in this program when you watch this tutorial.

    • @ZoHaTips
      @ZoHaTips 4 года назад

      @@budyfriend_code i create a app , i watch your tutorial , now i want to store this spinner value in firebase please make a video