首页
\
问答
\
使用宏通过电子邮件发送报告,并在记录之间使用网格边框(using macro to send reports via email with gridline borders between records)
使用宏通过电子邮件发送报告,并在记录之间使用网格边框(using macro to send reports via email with gridline borders between records)
我不知道VBA,并且想知道我是否能够凭借我的有限知识,使用send-object命令(或其他命令)通过电子邮件发送Access报告,并在输出中的字段之间使用网格边框。 我目前将宏电子邮件格式设置为html。
I do not knw VBA and would like to know if I can, with my limited knowledge, use the send-object command (or another command)to email Access reports, with gridline borders in between the fields in my output. I currently have the macro email format set to html.
原文:https://stackoverflow.com/questions/3358652
更新时间:2021-08-30 16:08
最满意答案
你可以使用SharedPreferences来知道你是否应该显示该卡。
以下是使用原始代码的示例代码 -
@Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { view = inflater.inflate(R.layout.hawker_jobs_fragment_layout, container, false); context = getContext(); button = (Button) view.findViewById(R.id.hawker_job_add_card_view_button); button.setOnClickListener(this); relativeLayout = (RelativeLayout) view.findViewById(R.id.hawker_job_relative_layout); SharedPreferences sharedPref = getPreferences(Context.MODE_PRIVATE); boolean shouldDisplayCard = sharedPref.getBoolean("should_display_card", false); if(shouldDisplayCard) createCardView(); return view; } @Override public void onClick(View v) { SharedPreferences sharedPref = getActivity().getPreferences(Context.MODE_PRIVATE); SharedPreferences.Editor editor = sharedPref.edit(); editor.putBoolean("should_display_card", true); editor.apply(); createCardView(); }
You can use SharedPreferences in order to know whether you should display the card.
Here's a sample code using your original one -
@Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { view = inflater.inflate(R.layout.hawker_jobs_fragment_layout, container, false); context = getContext(); button = (Button) view.findViewById(R.id.hawker_job_add_card_view_button); button.setOnClickListener(this); relativeLayout = (RelativeLayout) view.findViewById(R.id.hawker_job_relative_layout); SharedPreferences sharedPref = getPreferences(Context.MODE_PRIVATE); boolean shouldDisplayCard = sharedPref.getBoolean("should_display_card", false); if(shouldDisplayCard) createCardView(); return view; } @Override public void onClick(View v) { SharedPreferences sharedPref = getActivity().getPreferences(Context.MODE_PRIVATE); SharedPreferences.Editor editor = sharedPref.edit(); editor.putBoolean("should_display_card", true); editor.apply(); createCardView(); }
相关问答
更多-
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
Activity.finish()方法(引用) : 当您的活动完成并将其关闭时,请将其调用。 What about the Activity.finish() method (quoting) : Call this when your activity is done and should be closed.
-
你正在寻找的是: CardView card = ... card.setCardBackgroundColor(color); 在XML中 card_view:cardBackgroundColor="@android:color/white" What you are looking for is: CardView card = ... card.setCardBackgroundColor(color); In XML card_view:cardBackgroundColor="@and ...
-
使用cardview.setMaxCardElevation(8); 代替 Ok , i had a tricky problem , my Cardview wrapped its Parent up so there is no space available to show its shadow. finally I added margin to the Cardview and now It works !!
-
您的imageView托管在RelativeLayout中,而不是Cardview中。 改变这个 CardView.LayoutParams parms = new CardView.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT,height); imageView.setLayoutParams(parms); 对此 ViewGroup.LayoutParams params = imageView.getLayoutParams() ...
-
是的,这是一个非常古老的问题,我使用recyclerview动态创建了卡片,当然还有CardView,深入的文档可以在这里找到http://developer.android.com/training/material/lists-cards.html和http:/ /code.tutsplus.com/tutorials/getting-started-with-recyclerview-and-cardview-on-android--cms-23465 Yes this is a very old q ...
-
Cardview onclick活动(Cardview onclick activity)[2023-08-07]
宣布卡片视图 static class ProductViewHolder extends RecyclerView.ViewHolder{ private TextView tvPatientName; private TextView tvPatientAge; private CardView cvPatient; public ProductViewHolder(View itemView) { super(itemView); ... -
我不知道有什么特别的推理。 但是,如果你对围绕这个遗漏感兴趣... 所有CardView都使用此属性创建一个使用颜色绘制的圆角矩形,然后将其指定为CardView的背景。 如果您真的想以编程方式设置颜色,可以创建RoundRectDrawableWithShadow的副本,然后执行以下操作: mCardView.setBackgroundDrawable(new MyRoundRectDrawableWithShadow(getResources(), color, radius)); 您不能将Round ...
-
如果我理解正确,您正在尝试避免裁剪CardView海拔阴影。 尝试将cardUseCompatPadding设置为true ,而不是操纵边距, 如果要动态更改高程 ,则应在CardView初始化时调用setMaxCardElevation(float) 。 (你可以通过xml和编程方式来设置)。 为CardView设置最大高程使其占用较大阴影的空间,但也会为较低高程添加此空间。 顺便说一句,如果你想为一些视图设置LayoutParams ,你需要使用这些视图的父对象 。 例如: LinearLayout有一 ...
-
即使在关闭活动之后仍然以编程方式保存cardview(Saving a cardview programmatically even after closing the activity)[2023-06-14]
你可以使用SharedPreferences来知道你是否应该显示该卡。 以下是使用原始代码的示例代码 - @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { view = inflater.inflate(R.layout.hawker_jobs_fragment_layout, contain ...