Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Styling attributes not functioning on merge tags

Background

I have found styling attributes not functioning on the merge tags, either apply attributes separately or apply a style.

Known Solutions

  1. Apply styling attributes on the tag that make use of the layout works. For example, include tags and custom tags.

  2. Just don't make use of merge.

  3. Apply styling programmatically.

However, I am looking for better solutions.

Why?

  1. It is messy. I have to apply the styling attributes every time I make use of the layout. I make it as an separated layout because they are meant to be reused.

  2. I am intentionally using merge tag as they have to be the immediate children of the parent layout. For example, the tags are children of a LinearLayout. I apply layout_width="0dp" and layout_weight="1" to have them equally spanning in the parent layout.

  3. Reason #2 plus the tags are generated programmatically. Thus, I can only apply styling programmatically. It is ugly and extra efforts are needed for maintenance.

Goal

Satisfactory workaround(s).

XML Tags for Illustration Purpose

<merge xmlns:android="http://schemas.android.com/apk/res/android"
    style="@style/CustomStyle">
    <!-- Omitted -->
</merge>

And

<merge xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:layout_weight="1">
    <!-- Omitted -->
</merge>

Both the above tags are not styled.

like image 635
Gavin Avatar asked Aug 30 '14 15:08

Gavin


People also ask

Why is Mailchimp merge tag not working?

If it still seems like merge tags aren't working, try to send a test email to yourself or a small test segment. Be sure your test email accounts have default values for each merge value in your campaign, and segment your audience to send to only these test addresses.

How do I change a merge tag in Mailchimp?

Click the Manage Audience drop-down and choose Settings. On the Settings page, click Audience fields and *|MERGE|* tags. In the fields in the Default value column, type the default values for your merge tags. When you're done, click Save Changes.

What is Live merge tag info in Mailchimp?

The information you collect through your Mailchimp signup form is saved in an audience field and tied to a unique label, called a merge tag. Use merge tags to insert personalized or dynamic content into the campaigns you send.

What are merge tags?

Merge tags are also known as personalization fields or personalization tags. Merge tags allow you to insert ("merge") data from your mailing list directly into your email campaigns. For example, if you'd like to insert your subscriber's first name into your email, you use the merge tag #[FNAME]#.


1 Answers

attributes in a merge tag are ignored. When the XML parser sees a merge tag, it tells it, "Skip this tag and add all of the children directly."

like image 165
hellowill89 Avatar answered Oct 02 '22 09:10

hellowill89