Back to project page STweaks.
The source code is released under:
GNU General Public License
If you think the Android project STweaks listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.gokhanmoral.stweaks.app; /*from w w w .ja v a2 s .co m*/ import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.content.Context; import android.view.LayoutInflater; import android.widget.LinearLayout; import android.widget.TextView; public class SyhPane { public String description; public String name; public List<SyhControl> controls = new ArrayList<SyhControl>(); public void addPaneToUI(Activity activity, LinearLayout layout) { Context context = activity; TextView paneNameView = new TextView(context); paneNameView = (TextView)LayoutInflater.from(context).inflate(R.layout.template_panelname, layout, false); paneNameView.setText(this.name.toUpperCase()); layout.addView(paneNameView); if ((this.description != null) && (!this.description.equals(""))) { TextView paneDescriptionView = new TextView(context); paneDescriptionView = (TextView)LayoutInflater.from(context).inflate(R.layout.template_paneldesc, layout, false); paneDescriptionView.setText(this.description); paneDescriptionView.setPadding(0, 5, 0, 10); layout.addView(paneDescriptionView); } } }