Search in sources :

Example 11 with CircleImageView

use of net.iGap.module.CircleImageView in project iGap-Android by KianIranian-STDG.

the class ViewMaker method getViewItemCall.

// *******************************************************************************************
public static View getViewItemCall(Context context) {
    LinearLayout linearLayout_205 = new LinearLayout(context);
    linearLayout_205.setId(R.id.mainContainer);
    LinearLayout.LayoutParams layout_218 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    linearLayout_205.setLayoutParams(layout_218);
    TypedValue rippleView = new TypedValue();
    context.getTheme().resolveAttribute(android.R.attr.selectableItemBackground, rippleView, true);
    linearLayout_205.setBackgroundResource(rippleView.resourceId);
    FrameLayout avatarContainer = new FrameLayout(context);
    avatarContainer.setId(R.id.avatarContainer);
    linearLayout_205.addView(avatarContainer, LayoutCreator.createLinear(LayoutCreator.WRAP_CONTENT, LayoutCreator.WRAP_CONTENT, CENTER, 10, 0, 10, 0));
    CheckBox checkBox = new CheckBox(context);
    checkBox.setId(R.id.fcsl_check_box);
    checkBox.setVisibility(View.VISIBLE);
    checkBox.setClickable(false);
    CircleImageView fcsl_imv_picture = new CircleImageView(context);
    fcsl_imv_picture.setId(R.id.fcsl_imv_picture);
    avatarContainer.addView(fcsl_imv_picture, LayoutCreator.createFrame(48, 48, CENTER));
    avatarContainer.addView(checkBox, LayoutCreator.createFrame(20, 20, Gravity.BOTTOM | END));
    LinearLayout linearLayout_71 = new LinearLayout(context);
    linearLayout_71.setOrientation(VERTICAL);
    LinearLayout.LayoutParams layout_794 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, i_Dp(R.dimen.dp68));
    linearLayout_71.setLayoutParams(layout_794);
    LinearLayout linearLayout_470 = new LinearLayout(context);
    linearLayout_470.setOrientation(HORIZONTAL);
    LinearLayout.LayoutParams layout_822 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 0, 1);
    linearLayout_470.setPadding(0, i_Dp(R.dimen.dp12), 0, 0);
    linearLayout_470.setLayoutParams(layout_822);
    LinearLayout linearLayout_983 = new LinearLayout(context);
    linearLayout_983.setOrientation(VERTICAL);
    LinearLayout.LayoutParams layout_313 = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.MATCH_PARENT, 1);
    layout_313.leftMargin = i_Dp(R.dimen.dp6);
    linearLayout_983.setLayoutParams(layout_313);
    AppCompatTextView fcsl_txt_name = new AppCompatTextView(context);
    fcsl_txt_name.setId(R.id.fcsl_txt_name);
    fcsl_txt_name.setPadding(0, 0, 0, dpToPixel(1));
    fcsl_txt_name.setText("Name");
    fcsl_txt_name.setSingleLine(true);
    fcsl_txt_name.setTextColor(Theme.getInstance().getTitleTextColor(context));
    setTextSize(fcsl_txt_name, R.dimen.standardTextSize);
    fcsl_txt_name.setTypeface(ResourcesCompat.getFont(fcsl_txt_name.getContext(), R.font.main_font));
    LinearLayout.LayoutParams layout_415 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    layout_415.gravity = Gravity.START;
    fcsl_txt_name.setLayoutParams(layout_415);
    linearLayout_983.addView(fcsl_txt_name);
    LinearLayout linearLayout_976 = new LinearLayout(G.context);
    linearLayout_976.setOrientation(HORIZONTAL);
    LinearLayout.LayoutParams layout_106 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    linearLayout_976.setLayoutParams(layout_106);
    AppCompatTextView fcsl_txt_time_info = new AppCompatTextView(G.context);
    fcsl_txt_time_info.setId(R.id.fcsl_txt_time_info);
    fcsl_txt_time_info.setGravity(Gravity.START);
    fcsl_txt_time_info.setSingleLine(true);
    fcsl_txt_time_info.setText("(4) 9:24 am");
    fcsl_txt_time_info.setTextColor(Theme.getInstance().getSubTitleColor(context));
    setTextSize(fcsl_txt_time_info, R.dimen.smallTextSize);
    fcsl_txt_time_info.setTypeface(ResourcesCompat.getFont(fcsl_txt_time_info.getContext(), R.font.main_font));
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
        fcsl_txt_time_info.setTextDirection(View.TEXT_DIRECTION_LOCALE);
    }
    LinearLayout.LayoutParams layout_959 = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1);
    fcsl_txt_time_info.setLayoutParams(layout_959);
    linearLayout_976.addView(fcsl_txt_time_info);
    linearLayout_983.addView(linearLayout_976);
    linearLayout_470.addView(linearLayout_983);
    LinearLayout linearLayout_202 = new LinearLayout(context);
    linearLayout_202.setOrientation(VERTICAL);
    LinearLayout.LayoutParams layout_803 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT);
    layout_803.rightMargin = i_Dp(R.dimen.dp8);
    layout_803.leftMargin = i_Dp(R.dimen.dp8);
    linearLayout_202.setLayoutParams(layout_803);
    MaterialDesignTextView fcsl_txt_icon = new MaterialDesignTextView(context);
    fcsl_txt_icon.setId(R.id.fcsl_txt_icon);
    fcsl_txt_icon.setText(R.string.icon_single_contact);
    fcsl_txt_icon.setTextColor(ContextCompat.getColor(context, R.color.green));
    setTextSize(fcsl_txt_icon, R.dimen.dp18);
    LinearLayout.LayoutParams layout_178 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    layout_178.gravity = Gravity.END;
    fcsl_txt_icon.setLayoutParams(layout_178);
    linearLayout_202.addView(fcsl_txt_icon);
    AppCompatTextView fcsl_txt_dureation_time = new AppCompatTextView(context);
    fcsl_txt_dureation_time.setId(R.id.fcsl_txt_dureation_time);
    fcsl_txt_dureation_time.setText("2:24");
    fcsl_txt_dureation_time.setTextColor(ContextCompat.getColor(context, R.color.btn_start_page5));
    setTextSize(fcsl_txt_dureation_time, R.dimen.dp12);
    fcsl_txt_dureation_time.setTypeface(ResourcesCompat.getFont(fcsl_txt_dureation_time.getContext(), R.font.main_font));
    LinearLayout.LayoutParams layout_483 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    fcsl_txt_dureation_time.setLayoutParams(layout_483);
    linearLayout_202.addView(fcsl_txt_dureation_time);
    linearLayout_470.addView(linearLayout_202);
    linearLayout_71.addView(linearLayout_470);
    View textView_316 = new View(context);
    textView_316.setBackgroundColor(G.context.getResources().getColor(R.color.gray_3c));
    LinearLayout.LayoutParams layout_241 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 1);
    textView_316.setLayoutParams(layout_241);
    linearLayout_71.addView(textView_316);
    linearLayout_205.addView(linearLayout_71);
    return linearLayout_205;
}
Also used : CircleImageView(net.iGap.module.CircleImageView) MaterialDesignTextView(net.iGap.module.MaterialDesignTextView) CheckBox(net.iGap.module.customView.CheckBox) FrameLayout(android.widget.FrameLayout) AppCompatTextView(androidx.appcompat.widget.AppCompatTextView) AppCompatTextView(androidx.appcompat.widget.AppCompatTextView) AppCompatImageView(androidx.appcompat.widget.AppCompatImageView) View(android.view.View) MaterialDesignTextView(net.iGap.module.MaterialDesignTextView) CircleImageView(net.iGap.module.CircleImageView) TextView(android.widget.TextView) LinearLayout(android.widget.LinearLayout) TypedValue(android.util.TypedValue)

Aggregations

CircleImageView (net.iGap.module.CircleImageView)11 TextView (android.widget.TextView)9 View (android.view.View)6 LinearLayout (android.widget.LinearLayout)5 AppCompatImageView (androidx.appcompat.widget.AppCompatImageView)5 ImageView (android.widget.ImageView)4 FontIconTextView (net.iGap.module.FontIconTextView)4 FrameLayout (android.widget.FrameLayout)3 AppCompatTextView (androidx.appcompat.widget.AppCompatTextView)3 IconView (net.iGap.messenger.ui.components.IconView)3 MaterialDesignTextView (net.iGap.module.MaterialDesignTextView)3 ImageLoadingView (net.iGap.story.liststories.ImageLoadingView)3 ParamWithAvatarType (net.iGap.helper.avatar.ParamWithAvatarType)2 CheckBox (net.iGap.module.customView.CheckBox)2 ColorStateList (android.content.res.ColorStateList)1 GradientDrawable (android.graphics.drawable.GradientDrawable)1 InsetDrawable (android.graphics.drawable.InsetDrawable)1 LayerDrawable (android.graphics.drawable.LayerDrawable)1 DisplayMetrics (android.util.DisplayMetrics)1 TypedValue (android.util.TypedValue)1