use of com.gc.materialdesign.views.LayoutRipple in project UltimateAndroid by cymcsg.
the class MaterialDesignActivity method onCreate.
@SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.material_design_activity_main);
buttonSelectColor = (ButtonFloatSmall) findViewById(R.id.buttonColorSelector);
buttonSelectColor.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
ColorSelector colorSelector = new ColorSelector(MaterialDesignActivity.this, backgroundColor, MaterialDesignActivity.this);
colorSelector.show();
}
});
LayoutRipple layoutRipple = (LayoutRipple) findViewById(R.id.itemButtons);
setOriginRiple(layoutRipple);
layoutRipple.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(MaterialDesignActivity.this, ButtonsActivity.class);
intent.putExtra("BACKGROUND", backgroundColor);
startActivity(intent);
}
});
layoutRipple = (LayoutRipple) findViewById(R.id.itemSwitches);
setOriginRiple(layoutRipple);
layoutRipple.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(MaterialDesignActivity.this, SwitchActivity.class);
intent.putExtra("BACKGROUND", backgroundColor);
startActivity(intent);
}
});
layoutRipple = (LayoutRipple) findViewById(R.id.itemProgress);
setOriginRiple(layoutRipple);
layoutRipple.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(MaterialDesignActivity.this, ProgressActivity.class);
intent.putExtra("BACKGROUND", backgroundColor);
startActivity(intent);
}
});
layoutRipple = (LayoutRipple) findViewById(R.id.itemWidgets);
setOriginRiple(layoutRipple);
layoutRipple.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(MaterialDesignActivity.this, WidgetActivity.class);
intent.putExtra("BACKGROUND", backgroundColor);
startActivity(intent);
}
});
}
use of com.gc.materialdesign.views.LayoutRipple in project MaterialDesignLibrary by navasmdc.
the class MainActivity method onCreate.
@SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
buttonSelectColor = (ButtonFloatSmall) findViewById(R.id.buttonColorSelector);
buttonSelectColor.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
ColorSelector colorSelector = new ColorSelector(MainActivity.this, backgroundColor, MainActivity.this);
colorSelector.show();
}
});
LayoutRipple layoutRipple = (LayoutRipple) findViewById(R.id.itemButtons);
setOriginRiple(layoutRipple);
layoutRipple.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(MainActivity.this, ButtonsActivity.class);
intent.putExtra("BACKGROUND", backgroundColor);
startActivity(intent);
}
});
layoutRipple = (LayoutRipple) findViewById(R.id.itemSwitches);
setOriginRiple(layoutRipple);
layoutRipple.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(MainActivity.this, SwitchActivity.class);
intent.putExtra("BACKGROUND", backgroundColor);
startActivity(intent);
}
});
layoutRipple = (LayoutRipple) findViewById(R.id.itemProgress);
setOriginRiple(layoutRipple);
layoutRipple.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(MainActivity.this, ProgressActivity.class);
intent.putExtra("BACKGROUND", backgroundColor);
startActivity(intent);
}
});
layoutRipple = (LayoutRipple) findViewById(R.id.itemWidgets);
setOriginRiple(layoutRipple);
layoutRipple.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Intent intent = new Intent(MainActivity.this, WidgetActivity.class);
intent.putExtra("BACKGROUND", backgroundColor);
startActivity(intent);
}
});
}
Aggregations