use of com.moez.QKSMS.ui.view.QKTextView in project qksms by moezbhatti.
the class ConversationSettingsDialog method onCreateDialog.
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
setTitle(getArguments().getString(ARG_NAME));
mThreadId = getArguments().getLong(ARG_THREAD_ID);
mRes = getActivity().getResources();
mConversationPrefs = new ConversationPrefsHelper(getActivity(), mThreadId);
mLedColors = new int[] { mRes.getColor(R.color.blue_light), mRes.getColor(R.color.purple_light), mRes.getColor(R.color.green_light), mRes.getColor(R.color.yellow_light), mRes.getColor(R.color.red_light), mRes.getColor(R.color.white_pure) };
int padding = Units.dpToPx(getActivity(), 16);
QKTextView premiumWarning = new QKTextView(getActivity());
premiumWarning.setLayoutParams(mLayoutParams);
premiumWarning.setPadding(padding, padding, padding, padding);
LinearLayout list = new LinearLayout(getActivity());
list.setOrientation(LinearLayout.VERTICAL);
list.addView(new QKPreference(getActivity(), this, SettingsFragment.THEME, R.string.pref_theme, R.string.pref_theme_summary_alt).getView());
list.addView(new QKSwitchPreference(getActivity(), this, SettingsFragment.NOTIFICATION_LED, mConversationPrefs.getConversationPrefs(), mConversationPrefs.getNotificationLedEnabled(), R.string.pref_led, 0).getView());
list.addView(new QKPreference(getActivity(), this, SettingsFragment.NOTIFICATION_LED_COLOR, R.string.pref_theme_led, 0).getView());
list.addView(new QKSwitchPreference(getActivity(), this, SettingsFragment.WAKE, mConversationPrefs.getConversationPrefs(), mConversationPrefs.getWakePhoneEnabled(), R.string.pref_wake, R.string.pref_wake_summary).getView());
list.addView(new QKSwitchPreference(getActivity(), this, SettingsFragment.NOTIFICATION_TICKER, mConversationPrefs.getConversationPrefs(), mConversationPrefs.getTickerEnabled(), R.string.pref_ticker, R.string.pref_ticker_summary).getView());
list.addView(new QKSwitchPreference(getActivity(), this, SettingsFragment.NOTIFICATION_VIBRATE, mConversationPrefs.getConversationPrefs(), mConversationPrefs.getVibrateEnabled(), R.string.pref_vibration, R.string.pref_vibration_summary).getView());
list.addView(new QKRingtonePreference(getActivity(), this, SettingsFragment.NOTIFICATION_TONE, R.string.pref_ringtone, R.string.pref_ringtone_summary).getView());
list.addView(new QKSwitchPreference(getActivity(), this, SettingsFragment.NOTIFICATION_CALL_BUTTON, mConversationPrefs.getConversationPrefs(), mConversationPrefs.getCallButtonEnabled(), R.string.pref_notification_call, R.string.pref_notification_call_summary).getView());
setCustomView(list);
return super.onCreateDialog(savedInstanceState);
}
use of com.moez.QKSMS.ui.view.QKTextView in project qksms by moezbhatti.
the class ConversationDetailsDialog method showDetails.
@Override
public void showDetails(Conversation conversation) {
ViewGroup.LayoutParams params = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
AbsListView.LayoutParams listParams = new AbsListView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
View view = View.inflate(mContext, R.layout.dialog_conversation_details, null);
view.setLayoutParams(listParams);
((QKTextView) view.findViewById(R.id.date)).setText(DateFormatter.getDate(mContext, conversation.getDate()));
((QKTextView) view.findViewById(R.id.message_count)).setText(Integer.toString(conversation.getMessageCount()));
((QKTextView) view.findViewById(R.id.recipients)).setText(mContext.getString(R.string.dialog_conversation_details_recipients, Integer.toString(conversation.getRecipients().size())));
ListView listView = new ListView(mContext);
listView.setLayoutParams(params);
listView.addHeaderView(view);
listView.setDivider(null);
listView.setDividerHeight(0);
listView.setAdapter(new ConversationDetailsContactListAdapter(mContext, conversation.getRecipients()));
new QKDialog().setContext(mContext).setTitle(R.string.dialog_conversation_details_title).setCustomView(listView).setPositiveButton(R.string.okay, null).show();
}
use of com.moez.QKSMS.ui.view.QKTextView in project qksms by moezbhatti.
the class WelcomeIntroFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_welcome_greeting, container, false);
QKTextView start = (QKTextView) view.findViewById(R.id.welcome_start);
start.setOnClickListener(this);
return view;
}
use of com.moez.QKSMS.ui.view.QKTextView in project qksms by moezbhatti.
the class WelcomeNightFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_welcome_night, container, false);
mNightTitle = (RobotoTextView) view.findViewById(R.id.welcome_night_title);
mNightDescription = (RobotoTextView) view.findViewById(R.id.welcome_night_description);
mNightHint = (QKTextView) view.findViewById(R.id.welcome_night_hint);
mNightHint.setOnClickListener(this);
mContext.setFinished();
return view;
}
Aggregations