where should I implement SeekBar.onSeekBarChangeListener?

Soheil

I'm inflating an xml resource ant set it as the view of an AlertDialoge. the xml contains a SeekBar and I want to define SeekBar.onSeekBarChangeListener for that. I tried to implement it in the onCreate() method of the activity in which the AlertDialoge is going to be showed, but the app gets force closed. where to implement the listener ?

Sambuca

Without seeing your code it's quite difficult. But here's a little hint.

You should have some code like this, where you inflate your dialog's content view:

LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(R.layout.myAlertDialog, (ViewGroup) activity.findViewById(R.id.layout_root));

Use your view to get your SeekBar instance and assign your listener:

SeekBar seekBar = (SeekBar) layout.findViewById(R.id.mySeekBar);
seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {...});

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

where should I implement SeekBar.onSeekBarChangeListener?

From Dev

How to update SeekBar not firing OnSeekBarChangeListener?

From Dev

How to update SeekBar not firing OnSeekBarChangeListener?

From Dev

Where should I implement my class method?

From Dev

where should I implement security/Authorization in n-tier architecture?

From Dev

In the Repository Pattern, where should I implement a Distinct method?

From Dev

Where should I implement the facebook login in a tab based app?

From Dev

where should i implement click function help me with code

From Dev

Where should I implement onClick method in a NavigationDrawer Activity?

From Dev

Where should I implement e-mail logic in N-tier application?

From Dev

Should I implement IEquatable, or IComparable?

From Dev

Where authorization should implement in MVC4 ?

From Dev

How can i draw image and text upon thumb of seekbar. while sliding image and value should be attach with the thumb of seekbar

From Dev

Where should i place the route

From Dev

Where should I use done()

From Dev

Where should i put the function?

From Dev

Where should I include <string>?

From Dev

.tolowerCase() Where should I put it?

From Dev

Where should I be putting css

From Dev

Where should I add that tag?

From Dev

Where should I install sagemath?

From Dev

Where should I put the codes?

From Dev

Where should i place the route

From Dev

Where should I save the data?

From Dev

How to implement price range seekbar?

From Dev

When should I separately implement IEnumerator<T>?

From Dev

Should I really implement IDisposable in this case?

From Dev

Should I implement equals and hashCode in a domain class?

From Dev

Should I implement business logic on a Model or a ViewModel

Related Related

  1. 1

    where should I implement SeekBar.onSeekBarChangeListener?

  2. 2

    How to update SeekBar not firing OnSeekBarChangeListener?

  3. 3

    How to update SeekBar not firing OnSeekBarChangeListener?

  4. 4

    Where should I implement my class method?

  5. 5

    where should I implement security/Authorization in n-tier architecture?

  6. 6

    In the Repository Pattern, where should I implement a Distinct method?

  7. 7

    Where should I implement the facebook login in a tab based app?

  8. 8

    where should i implement click function help me with code

  9. 9

    Where should I implement onClick method in a NavigationDrawer Activity?

  10. 10

    Where should I implement e-mail logic in N-tier application?

  11. 11

    Should I implement IEquatable, or IComparable?

  12. 12

    Where authorization should implement in MVC4 ?

  13. 13

    How can i draw image and text upon thumb of seekbar. while sliding image and value should be attach with the thumb of seekbar

  14. 14

    Where should i place the route

  15. 15

    Where should I use done()

  16. 16

    Where should i put the function?

  17. 17

    Where should I include <string>?

  18. 18

    .tolowerCase() Where should I put it?

  19. 19

    Where should I be putting css

  20. 20

    Where should I add that tag?

  21. 21

    Where should I install sagemath?

  22. 22

    Where should I put the codes?

  23. 23

    Where should i place the route

  24. 24

    Where should I save the data?

  25. 25

    How to implement price range seekbar?

  26. 26

    When should I separately implement IEnumerator<T>?

  27. 27

    Should I really implement IDisposable in this case?

  28. 28

    Should I implement equals and hashCode in a domain class?

  29. 29

    Should I implement business logic on a Model or a ViewModel

HotTag

Archive