Search in sources :

Example 16 with AppCompatTextView

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);
}
Also used : PreferenceScreenStrategy(com.waz.zclient.pages.main.profile.preferences.PreferenceScreenStrategy) TextSwitcher(android.widget.TextSwitcher) AppCompatTextView(android.support.v7.widget.AppCompatTextView) AppCompatTextView(android.support.v7.widget.AppCompatTextView) TextView(android.widget.TextView) View(android.view.View) AppCompatTextView(android.support.v7.widget.AppCompatTextView) TextView(android.widget.TextView) ActionBar(android.support.v7.app.ActionBar) ViewSwitcher(android.widget.ViewSwitcher) SuppressLint(android.annotation.SuppressLint)

Example 17 with AppCompatTextView

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);
}
Also used : GridLayoutManager(android.support.v7.widget.GridLayoutManager) FilterAdapter(com.rvfilter.widget.filter.FilterAdapter) RecyclerView(android.support.v7.widget.RecyclerView)

Example 18 with AppCompatTextView

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());
    }
}
Also used : AppCompatTextView(android.support.v7.widget.AppCompatTextView)

Example 19 with AppCompatTextView

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();
}
Also used : AppCompatTextView(android.support.v7.widget.AppCompatTextView)

Example 20 with AppCompatTextView

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();
}
Also used : AppCompatTextView(android.support.v7.widget.AppCompatTextView)

Aggregations

AppCompatTextView (android.support.v7.widget.AppCompatTextView)20 View (android.view.View)10 AppCompatButton (android.support.v7.widget.AppCompatButton)4 Espresso.onView (android.support.test.espresso.Espresso.onView)3 MediumTest (android.support.test.filters.MediumTest)3 ViewGroup (android.view.ViewGroup)3 TextView (android.widget.TextView)3 File (java.io.File)3 Test (org.junit.Test)3 DialogInterface (android.content.DialogInterface)2 AlertDialog (android.support.v7.app.AlertDialog)2 RecyclerView (android.support.v7.widget.RecyclerView)2 SuppressLint (android.annotation.SuppressLint)1 Context (android.content.Context)1 ApplicationInfo (android.content.pm.ApplicationInfo)1 Resources (android.content.res.Resources)1 Bitmap (android.graphics.Bitmap)1 BitmapFactory (android.graphics.BitmapFactory)1 TestFloatingBehavior (android.support.design.testapp.custom.TestFloatingBehavior)1 ActionBar (android.support.v7.app.ActionBar)1