Search in sources :

Example 6 with CircledImageView

use of android.support.wearable.view.CircledImageView in project Talon-for-Twitter by klinker24.

the class RetweetButtonFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_retweet_button, parent, false);
    CircledImageView button = (CircledImageView) view.findViewById(R.id.retweet_button);
    button.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            ((WearActivity) getActivity()).sendRetweetRequest(getArguments().getLong(ARG_TWEET_ID));
        }
    });
    SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());
    int accentColor = sharedPreferences.getInt(KeyProperties.KEY_ACCENT_COLOR, getResources().getColor(R.color.orange_accent_color));
    button.setCircleColor(accentColor);
    return view;
}
Also used : SharedPreferences(android.content.SharedPreferences) CircledImageView(android.support.wearable.view.CircledImageView) View(android.view.View) CircledImageView(android.support.wearable.view.CircledImageView)

Aggregations

CircledImageView (android.support.wearable.view.CircledImageView)6 View (android.view.View)6 SharedPreferences (android.content.SharedPreferences)5 Intent (android.content.Intent)1 Bundle (android.os.Bundle)1 Handler (android.os.Handler)1 ImageView (android.widget.ImageView)1 TextView (android.widget.TextView)1 SettingsActivity (com.klinker.android.twitter.activity.SettingsActivity)1 File (java.io.File)1