Android Open Source - markj Jwc From Project Back to project page markj .
License The source code is released under:
GNU Lesser General Public License
If you think the Android project markj listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code package com.markjmind.mobile.api.android.controller;
/ * f r o m w w w . j a v a 2 s . c o m * /
import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.text.Html;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
/**
* start : 2012.08.30<br>
* <br>
* ????? Layout Controll??? JwViewController? ??? ?????????.<br>
* Layout?? ????? Util??? ???? ??.<br>
*
* @author ???
* @version 2013.11.17
*/
public class Jwc extends JwViewController{
public static Drawable getDrawable(int R_drawable_id,View view){
return view.getResources().getDrawable(R_drawable_id);
}
public static Drawable getDrawable(int R_drawable_id,Context context){
return context.getResources().getDrawable(R_drawable_id);
}
public static void setBackgroundDrawable(int R_drawable_id,View view){
Drawable d = getDrawable(R_drawable_id, view);
if (d!=null){
view.setBackgroundDrawable(d);
}
}
public static void setBackgroundResouceTag(String tag, int R_drawable_id, View parents){
getViewTag(tag,parents).setBackgroundResource(R_drawable_id);
}
// public static void setBackground(int R_drawable_id,View view){
// Drawable d = getDrawable(R_drawable_id, view);
// if(d!=null){
// view.setBackground(d); //????????? ??
// }
// }
//
public static void setTextColor(TextView txt,int R_color_id){
txt.setTextColor(txt.getContext().getResources().getColor(R_color_id));
}
public static void setTextTag(String tag,String text,View parants){
TextView txt = (TextView)getViewTag(tag, parants);
if (txt!=null){
txt.setText(text);
}
}
public static void setTextId(int R_id,String text,Activity activity){
TextView txt = (TextView)getView(R_id, activity);
if (txt!=null){
txt.setText(text);
}
}
public static void setTextHtmlTag(String tag,String text,View parents){
TextView txt = (TextView)getViewTag(tag, parents);
if (txt!=null){
txt.setText(Html.fromHtml(text));
}
}
public static void setImageResourceTag(String tag, int R_drawable_id, View parents){
ImageView img = (ImageView)getViewTag(tag, parents);
img.setImageResource(R_drawable_id);
}
public static View setVisible(String tag, View parants, int visiblility){
View view = getTagView(tag, parants);
view.setVisibility(visiblility);
return view;
}
public static View gone(String tag, View parants){
return setVisible(tag,parants,View.GONE);
}
public static View visible(String tag, View parants){
return setVisible(tag,parants,View.VISIBLE);
}
public static View invisible(String tag, View parants){
return setVisible(tag,parants,View.INVISIBLE);
}
public static int getColor(String color){
return Color.parseColor(color);
}
public static void setOnClickListener(Object receiver, String methodName, int R_id_view, Activity activity){
OnClickListenerReceiver.setOnClickListener(receiver, methodName, R_id_view, activity);
}
public static float getDensity(Context context){
return context.getResources().getDisplayMetrics().density;
}
public static float getDensity(Activity context){
return context.getResources().getDisplayMetrics().density;
}
public static float getDensity(View view){
return view.getContext().getResources().getDisplayMetrics().density;
}
}
Java Source Code List com.markjmind.mobile.api.android.controller.JwAsyncTask.java com.markjmind.mobile.api.android.controller.JwMapperException.java com.markjmind.mobile.api.android.controller.JwMemberMapper.java com.markjmind.mobile.api.android.controller.JwStringID.java com.markjmind.mobile.api.android.controller.JwViewController.java com.markjmind.mobile.api.android.controller.JwViewerCache.java com.markjmind.mobile.api.android.controller.JwViewer.java com.markjmind.mobile.api.android.controller.Jwc.java com.markjmind.mobile.api.android.controller.OnClickListenerReceiver.java com.markjmind.mobile.api.android.controller.ViewerXmlMapper.java com.markjmind.mobile.api.android.exception.JwErrorCode.java com.markjmind.mobile.api.android.exception.JwException.java com.markjmind.mobile.api.android.json.JSONMsgString.java com.markjmind.mobile.api.android.json.JwJOSNTreeArray.java com.markjmind.mobile.api.android.json.JwJSONReader.java com.markjmind.mobile.api.android.ui.JwAnimation.java com.markjmind.mobile.api.android.ui.JwGroup.java com.markjmind.mobile.api.android.ui.JwMenu.java com.markjmind.mobile.api.android.ui.JwOnGroupSelect.java com.markjmind.mobile.api.android.ui.JwTabGroup.java com.markjmind.mobile.api.android.ui.JwTouchGroupListener.java com.markjmind.mobile.api.android.ui.JwTouchGroup.java com.markjmind.mobile.api.android.ui.JwTouchMotionGroupLisener.java com.markjmind.mobile.api.android.ui.JwTouchMotionGroup.java com.markjmind.mobile.api.android.ui.drawgraph.GraphBoard.java com.markjmind.mobile.api.android.ui.drawgraph.GraphSkin.java com.markjmind.mobile.api.android.ui.drawgraph.HBackLineSkin.java com.markjmind.mobile.api.android.ui.drawgraph.LineGraphSkin.java com.markjmind.mobile.api.android.ui.drawgraph.PieGraph.java com.markjmind.mobile.api.android.ui.drawgraph.RectGraphSkin.java com.markjmind.mobile.api.android.ui.drawgraph.SimpleStyle.java com.markjmind.mobile.api.android.ui.drawgraph.TextArraySkin.java com.markjmind.mobile.api.android.ui.drawgraph.VBackLineSkin.java com.markjmind.mobile.api.android.ui.graph.Arc.java com.markjmind.mobile.api.android.ui.graph.BarElement.java com.markjmind.mobile.api.android.ui.graph.BarLayout.java com.markjmind.mobile.api.android.ui.graph.Bar.java com.markjmind.mobile.api.android.ui.graph.IPieSkin.java com.markjmind.mobile.api.android.ui.graph.LineLayout.java com.markjmind.mobile.api.android.ui.graph.MeasureLayout.java com.markjmind.mobile.api.android.ui.graph.PieArcRoundSkin.java com.markjmind.mobile.api.android.ui.graph.PieLayout.java com.markjmind.mobile.api.android.ui.graph.PiePercentSkin.java com.markjmind.mobile.api.android.ui.view.JwBaseDropDown.java com.markjmind.mobile.api.android.ui.view.JwDropDown.java com.markjmind.mobile.api.android.ui.view.JwSlidingLayout.java com.markjmind.mobile.api.android.ui.view.JwWheelView.java com.markjmind.mobile.api.android.ui.view.StickerListener.java com.markjmind.mobile.api.android.ui.view.StickerView.java com.markjmind.mobile.api.android.ui.view.textview.JwTextViewAutoScale.java com.markjmind.mobile.api.android.ui.view.textview.JwTextViewFonts.java com.markjmind.mobile.api.android.ui.view.textview.JwTextViewWrapScale.java com.markjmind.mobile.api.android.ui.wrapper.JwAlertDialog.java com.markjmind.mobile.api.android.ui.wrapper.JwToast.java com.markjmind.mobile.api.android.util.JwFile.java com.markjmind.mobile.api.android.util.JwPreferenceList.java com.markjmind.mobile.api.android.util.JwPreference.java com.markjmind.mobile.api.android.util.JwSound.java com.markjmind.mobile.api.android.util.JwTextUtils.java com.markjmind.mobile.api.android.util.PhoneInfo.java com.markjmind.mobile.api.android.util.WebConnection.java com.markjmind.mobile.api.android.xml.JwDomHandler.java com.markjmind.mobile.api.android.xml.JwDomLoader.java com.markjmind.mobile.api.android.xml.JwEditElementHandler.java com.markjmind.mobile.api.android.xml.JwXmlLoader.java com.markjmind.mobile.api.android.xml.JwXmlResoure.java com.markjmind.mobile.api.hub.ArrayJDhub.java com.markjmind.mobile.api.hub.DBhub.java com.markjmind.mobile.api.hub.JDhub.java com.markjmind.mobile.api.hub.Loader.java com.markjmind.mobile.api.hub.StoreList.java com.markjmind.mobile.api.hub.Store.java