Search in sources :

Example 6 with QKTextView

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);
}
Also used : QKPreference(com.moez.QKSMS.ui.view.QKPreference) QKTextView(com.moez.QKSMS.ui.view.QKTextView) LinearLayout(android.widget.LinearLayout) ConversationPrefsHelper(com.moez.QKSMS.common.ConversationPrefsHelper) QKSwitchPreference(com.moez.QKSMS.ui.view.QKSwitchPreference) QKRingtonePreference(com.moez.QKSMS.ui.view.QKRingtonePreference)

Example 7 with QKTextView

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();
}
Also used : AbsListView(android.widget.AbsListView) ListView(android.widget.ListView) QKDialog(com.moez.QKSMS.ui.dialog.QKDialog) ViewGroup(android.view.ViewGroup) AbsListView(android.widget.AbsListView) QKTextView(com.moez.QKSMS.ui.view.QKTextView) View(android.view.View) AbsListView(android.widget.AbsListView) ListView(android.widget.ListView) QKTextView(com.moez.QKSMS.ui.view.QKTextView)

Example 8 with QKTextView

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;
}
Also used : QKTextView(com.moez.QKSMS.ui.view.QKTextView) View(android.view.View) QKTextView(com.moez.QKSMS.ui.view.QKTextView)

Example 9 with QKTextView

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;
}
Also used : QKTextView(com.moez.QKSMS.ui.view.QKTextView) RobotoTextView(com.moez.QKSMS.ui.view.RobotoTextView) View(android.view.View)

Aggregations

QKTextView (com.moez.QKSMS.ui.view.QKTextView)9 View (android.view.View)7 ListView (android.widget.ListView)4 AdapterView (android.widget.AdapterView)3 Dialog (android.app.Dialog)2 SharedPreferences (android.content.SharedPreferences)2 ColorDrawable (android.graphics.drawable.ColorDrawable)2 Preference (android.preference.Preference)2 LayoutInflater (android.view.LayoutInflater)2 Window (android.view.Window)2 LinearLayout (android.widget.LinearLayout)2 ScrollView (android.widget.ScrollView)2 QKSwitchPreference (com.moez.QKSMS.ui.view.QKSwitchPreference)2 Animator (android.animation.Animator)1 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)1 ArgbEvaluator (android.animation.ArgbEvaluator)1 ValueAnimator (android.animation.ValueAnimator)1 AlarmManager (android.app.AlarmManager)1 Fragment (android.app.Fragment)1 PendingIntent (android.app.PendingIntent)1