Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

This constructor that you shared should work exactly as you expect.

public ExtendedSeekbarLayout (Context context, AttributeSet attributeSet, int defStyle, int position) { super(context, attributeSet, defStyle); init(position); } 

Btw you don't necessarily need to have this constructor, as long as you call

super(context); 

You can do this in case of programmatically instantiating a view:

public ExtendedSeekbarLayout (Context context, int position) { super(context); init(position); } 

But if you are talking about sending a custom value from xml, where you don't actually call a constructor, then you should look at this answer: http://stackoverflow.com/a/7608739/2534007https://stackoverflow.com/a/7608739/2534007

This constructor that you shared should work exactly as you expect.

public ExtendedSeekbarLayout (Context context, AttributeSet attributeSet, int defStyle, int position) { super(context, attributeSet, defStyle); init(position); } 

Btw you don't necessarily need to have this constructor, as long as you call

super(context); 

You can do this in case of programmatically instantiating a view:

public ExtendedSeekbarLayout (Context context, int position) { super(context); init(position); } 

But if you are talking about sending a custom value from xml, where you don't actually call a constructor, then you should look at this answer: http://stackoverflow.com/a/7608739/2534007

This constructor that you shared should work exactly as you expect.

public ExtendedSeekbarLayout (Context context, AttributeSet attributeSet, int defStyle, int position) { super(context, attributeSet, defStyle); init(position); } 

Btw you don't necessarily need to have this constructor, as long as you call

super(context); 

You can do this in case of programmatically instantiating a view:

public ExtendedSeekbarLayout (Context context, int position) { super(context); init(position); } 

But if you are talking about sending a custom value from xml, where you don't actually call a constructor, then you should look at this answer: https://stackoverflow.com/a/7608739/2534007

added 298 characters in body
Source Link

This constructor that you shared should work exactly as you expect.

public ExtendedSeekbarLayout (Context context, AttributeSet attributeSet, int defStyle, int position) { super(context, attributeSet, defStyle); init(position); } 

Btw you don't necessarily need to have this constructor, as long as you call

super(context); 

You can do this in case of programmatically instantiating a view:

public ExtendedSeekbarLayout (Context context, int position) { super(context); init(position); } 

But if you are talking about sending a custom value from xml, where you don't actually call a constructor, then you should look at this answer: http://stackoverflow.com/a/7608739/2534007

This constructor that you shared should work exactly as you expect.

public ExtendedSeekbarLayout (Context context, AttributeSet attributeSet, int defStyle, int position) { super(context, attributeSet, defStyle); init(position); } 

But if you are talking about sending a custom value from xml, where you don't actually call a constructor, then you should look at this answer: http://stackoverflow.com/a/7608739/2534007

This constructor that you shared should work exactly as you expect.

public ExtendedSeekbarLayout (Context context, AttributeSet attributeSet, int defStyle, int position) { super(context, attributeSet, defStyle); init(position); } 

Btw you don't necessarily need to have this constructor, as long as you call

super(context); 

You can do this in case of programmatically instantiating a view:

public ExtendedSeekbarLayout (Context context, int position) { super(context); init(position); } 

But if you are talking about sending a custom value from xml, where you don't actually call a constructor, then you should look at this answer: http://stackoverflow.com/a/7608739/2534007

Source Link

This constructor that you shared should work exactly as you expect.

public ExtendedSeekbarLayout (Context context, AttributeSet attributeSet, int defStyle, int position) { super(context, attributeSet, defStyle); init(position); } 

But if you are talking about sending a custom value from xml, where you don't actually call a constructor, then you should look at this answer: http://stackoverflow.com/a/7608739/2534007