use of android.support.wearable.view.CircledImageView in project Talon-for-Twitter by klinker24.
the class ComposeButtonFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_compose_button, parent, false);
CircledImageView button = (CircledImageView) view.findViewById(R.id.compose_button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
((WearActivity) getActivity()).startComposeRequest();
}
});
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;
}
use of android.support.wearable.view.CircledImageView in project Talon-for-Twitter by klinker24.
the class ExpandableCardFragment method onCreateContentView.
@Override
public View onCreateContentView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
handler = new Handler();
View view = inflater.inflate(R.layout.card_expandable, container, false);
final TextView name = (TextView) view.findViewById(R.id.name);
final TextView screenname = (TextView) view.findViewById(R.id.screenname);
final CircledImageView profilePic = (CircledImageView) view.findViewById(R.id.profile_picture);
text = (TextView) view.findViewById(R.id.text);
Bundle args = this.getArguments();
if (args != null) {
if (args.containsKey(ARG_USER_NAME) && name != null) {
name.setText(args.getCharSequence(ARG_USER_NAME));
}
if (args.containsKey(ARG_SCREENNAME) && screenname != null) {
screenname.setText("@" + args.getCharSequence(ARG_SCREENNAME));
}
if (args.containsKey(ARG_TWEET) && text != null) {
text.setText(args.getCharSequence(ARG_TWEET));
}
}
setExpansionFactor(currentExpansionFactor);
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
currentExpansionFactor *= 5;
setExpansionFactor(currentExpansionFactor);
}
});
Thread loader = new Thread(new Runnable() {
@Override
public void run() {
if (getActivity() == null) {
return;
}
File image = new File(getActivity().getCacheDir(), getArguments().getString(ARG_PRO_PIC_URL));
checkExisting(image, profilePic, 0);
}
});
loader.setPriority(Thread.MIN_PRIORITY);
loader.start();
return view;
}
use of android.support.wearable.view.CircledImageView in project Talon-for-Twitter by klinker24.
the class FavoriteButtonFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_favorite_button, parent, false);
CircledImageView button = (CircledImageView) view.findViewById(R.id.favorite_button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
((WearActivity) getActivity()).sendFavoriteRequest(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;
}
use of android.support.wearable.view.CircledImageView in project Talon-for-Twitter by klinker24.
the class SettingsButtonFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_settings_button, parent, false);
CircledImageView button = (CircledImageView) view.findViewById(R.id.settings_button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(getActivity(), SettingsActivity.class);
startActivity(intent);
}
});
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;
}
use of android.support.wearable.view.CircledImageView in project Talon-for-Twitter by klinker24.
the class ReplyButtonFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_reply_button, parent, false);
CircledImageView button = (CircledImageView) view.findViewById(R.id.reply_button);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
((WearActivity) getActivity()).startReplyRequest(getArguments().getString(ARG_USER_SCREENNAME), 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;
}
Aggregations