This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void addRange() { | |
if (mHandler == null) { | |
mHandler = new Handler(); | |
} | |
SliceItem style = SliceQuery.findSubtype(mRangeItem, FORMAT_INT, SUBTYPE_RANGE_MODE); | |
final boolean isIndeterminate = style != null && style.getInt() == INDETERMINATE_RANGE; | |
final boolean isSeekBar = FORMAT_ACTION.equals(mRangeItem.getFormat()); | |
final boolean renderInNewLine = mStartItem == null; | |
final ProgressBar progressBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Style.Input.layout(() -> { | |
Style.Input.text(() -> { | |
text(mInput); | |
... | |
}); | |
// clear input button | |
Style.deleteButton(() -> onClick(v -> mInput = "")); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<layout xmlns:android="http://schemas.android.com/apk/res/android"> | |
<data> | |
<variable name="counter" type="com.example.Counter"/> | |
<variable name="counter" type="com.example.ClickHandler"/> | |
</data> | |
<LinearLayout | |
android:orientation="vertical" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<TextView android:layout_width="wrap_content" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bind(R.id.tv_clicks) mCounterText; | |
@OnClick(R.id.btn_increment) | |
public void onSubmitClicked(View v) { | |
mClicks++; | |
mCounterText.setText("" + mClicks); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var clicks = 0; | |
$('.incr-button').on('click', function() { | |
clicks++; | |
$('.counter').text(clicks); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TextView mCounterText; | |
Button mCounterIncrementButton; | |
int mClicks = 0; | |
public void onCreate(Bundle b) { | |
super.onCreate(b); | |
mCounterText = (TextView) findViewById(R.id.tv_clicks); | |
mCounterIncrementButton = (Button) findViewById(R.id.btn_increment); |