use of android.support.v7.widget.AppCompatTextView in project wire-android by wireapp.
the class BasePreferenceActivity method onCreate.
@SuppressLint("PrivateResource")
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
replaceFragmentStrategy = new PreferenceScreenStrategy.ReplaceFragment(this, R.anim.abc_fade_in, R.anim.abc_fade_out, R.anim.abc_fade_in, R.anim.abc_fade_out);
toolbar = ViewUtils.getView(this, R.id.toolbar);
setSupportActionBar(toolbar);
ActionBar ab = getSupportActionBar();
assert ab != null;
ab.setDisplayHomeAsUpEnabled(true);
title = getTitle();
titleSwitcher = new TextSwitcher(toolbar.getContext());
titleSwitcher.setFactory(new ViewSwitcher.ViewFactory() {
@Override
public View makeView() {
TextView tv = new AppCompatTextView(toolbar.getContext());
TextViewCompat.setTextAppearance(tv, R.style.TextAppearance_AppCompat_Widget_ActionBar_Title);
return tv;
}
});
titleSwitcher.setCurrentText(title);
ab.setCustomView(titleSwitcher);
ab.setDisplayShowCustomEnabled(true);
ab.setDisplayShowTitleEnabled(false);
titleSwitcher.setInAnimation(this, R.anim.abc_fade_in);
titleSwitcher.setOutAnimation(this, R.anim.abc_fade_out);
}
use of android.support.v7.widget.AppCompatTextView in project AndroidDevelop by 7449.
the class FilterActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_filter);
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
recyclerView.setHasFixedSize(true);
recyclerView.setLayoutManager(new GridLayoutManager(recyclerView.getContext(), 3));
filterAdapter = new FilterAdapter(RVUtils.initFilterData());
recyclerView.setAdapter(filterAdapter);
findViewById(R.id.ok).setOnClickListener(this);
textView = (AppCompatTextView) findViewById(R.id.tv);
}
use of android.support.v7.widget.AppCompatTextView in project AndroidDevelop by 7449.
the class ShowAppAdapter method onBind.
@Override
protected void onBind(ViewHolder holder, int position, AppModel appModel) {
if (appModel.getAppIcon() != null && appModel.getAppLabel() != null) {
AppCompatTextView textView = holder.getAppCompatTextView(R.id.show_tv_app_name);
textView.setText(appModel.getAppLabel());
TextDrawableUtils.setAppDrawable(textView, appModel.getAppIcon());
}
}
use of android.support.v7.widget.AppCompatTextView in project AndroidDevelop by 7449.
the class EasyCityView method initView.
private void initView() {
//初始化数据,必须先执行这一步
JsonDataUtils.get().init(getContext());
rootView = getActivity().getLayoutInflater().inflate(R.layout.city_easy_view, null);
AppCompatTextView tvTitle = (AppCompatTextView) rootView.findViewById(R.id.easy_title);
provinceView = (NumberPickerView) rootView.findViewById(R.id.easy_province);
cityView = (NumberPickerView) rootView.findViewById(R.id.easy_city);
areaView = (NumberPickerView) rootView.findViewById(R.id.easy_area);
rootView.findViewById(R.id.easy_cancel).setOnClickListener(this);
rootView.findViewById(R.id.easy_next).setOnClickListener(this);
tvTitle.setText(title);
initViewData();
}
use of android.support.v7.widget.AppCompatTextView in project AndroidDevelop by 7449.
the class EasyPickerView method initView.
private void initView() {
rootView = getActivity().getLayoutInflater().inflate(R.layout.picker_easy_view, null);
AppCompatTextView tvTitle = (AppCompatTextView) rootView.findViewById(R.id.easy_title);
pickerView = (NumberPickerView) rootView.findViewById(R.id.easy_picker);
rootView.findViewById(R.id.easy_cancel).setOnClickListener(this);
rootView.findViewById(R.id.easy_next).setOnClickListener(this);
tvTitle.setText(title);
initPickerView();
}
Aggregations