我想以编程方式同时显示两个动画而不是XML文件.它应该ROTATE和TRANSLATE 我该怎么做?
请建议我一些方法??????
这是ma代码:>
ImageView snowImg1 = (ImageView) findViewById(R.id.snowimg1);
snowImg1.setVisibility(0);
ImageView snowImg2 = (ImageView) findViewById(R.id.snowimg2);
snowImg2.setVisibility(0);
ImageView snowImg3 = (ImageView) findViewById(R.id.snowimg3);
snowImg3.setVisibility(0);
ImageView snowImg4 = (ImageView) findViewById(R.id.snowimg4);
snowImg4.setVisibility(0);
ImageView snowImg6 = (ImageView) findViewById(R.id.snowimg6);
snowImg6.setVisibility(0);
ImageView snowImg5 = (ImageView) findViewById(R.id.snowimg5);
snowImg5.setVisibility(0);
View snowArray[] = {snowImg1, snowImg2, snowImg3, snowImg4, snowImg5, snowImg6};
Animation snowMov7 = new RotateAnimation(0,360, Animation.RELATIVE_TO_SELF,0.5f , Animation.RELATIVE_TO_SELF,0.5f );
snowMov7.setRepeatCount(Animation.INFINITE);
Animation snowMov1 = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.1f, Animation.RELATIVE_TO_PARENT, 0.3f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.9f);
snowMov1.setDuration(10000);
Animation snowMov2 = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.3f, Animation.RELATIVE_TO_PARENT, …Run Code Online (Sandbox Code Playgroud) animation android-2.1-eclair rotateanimation translate-animation
如何获取在布局中动态添加的视图的ID?
public class Display
{
static int i;
Dynamic_UIActivity dyn;
private Context context;
View mField= null;
TextView text;
protected int mYear;
protected int mMonth;
protected int mDay;
LinearLayout ll;
Mynewdialog dialognew;
public Display(Context mcontext)
{
context=mcontext;
ll = new LinearLayout(mcontext);
ll.setOrientation(LinearLayout.VERTICAL);
dyn = new Dynamic_UIActivity();
}
public void addLabel(String text)
{
TextView textview = new TextView(context);
textview.setText(text);
ll.addView(textview);
}
public void addField(String Type,String Tag)
{
mField.setId(i);
i++;
if(Type.equalsIgnoreCase("text"))
{
mField= new EditText(context);
mField.setTag(Tag);
//int id = mField.getResources().getIdentifier((String) mField.getTag(),"id" ,dyn.getPackageName());
//EditText …Run Code Online (Sandbox Code Playgroud) 我有一个JFrame和Jpanel超过在其中various buttons的placed.so 上的一个按钮的点击我已经被称为new class是also having containers placed in a Jpanel.所以我想show这new class panel在main Jframe panel.如何我能做到这一点?
如果我们在其中使用卡片布局,那么我如何使用它作为点击按钮我已经调用了新类的对象.如
Card layout consider each component in a container as card and i want whole Jpanel as a card so is it possible to do that???
我们可以在其中嵌套Jpanels吗?
请建议我这样做的正确方法?
这是SSCCE:
// this is the main class on which i want to use panel of other class
public class mymain
{ …Run Code Online (Sandbox Code Playgroud) 嘿,我有一个新的困境......
我有 3 个 div,就像 3 个框,每个 div 中都有一个图像和一些文字,我希望当我单击任何框中的任意位置时,它会转到另一个页面,例如,如果我在主页上,则单击框上,然后它将转到网站中的 service.html 页面。
我已经这样做了
<div onClick="document.location='service.html';">
Run Code Online (Sandbox Code Playgroud)
及其工作。但我希望当用户单击第一个 div时,它会转到 service.html,在该特定部分和第二个框中,它将转到 service.html 的另一个部分,依此类推......
更清楚地说,我想将 div 链接到特定页面的特定部分。
我怎样才能做到这一点??
我已经使用Intent在我的活动的ImageView中从SD卡中选择了一个图像.现在我想显示一个固定大小的移动矩形,即我们必须使用手势和我们想要的图像的任何部分,然后我们能够裁剪它.我们怎么做呢?对我来说真的很难吗?请帮帮我这样做?
更新 - >我已经能够带来矩形,我在裁剪和保存选定的部分时遇到问题.如何做到这一点?
我在SD卡的Music文件夹中有歌曲.
在我的应用程序中,我想从音乐文件列表中选择SD卡中的一首歌,当我选择任何一首歌时,然后使用播放按钮就可以播放.我怎样才能做到这一点?
我已经使用内容解析器完成了它并得到了一个歌曲列表.是否有办法使用意图从存储的歌曲中挑选SD卡?
我已经通过这两种方式做到了这一点.检查一下.
嘿我wana准备unix的各种基本命令,所以我需要这个ans.在unix中cat foo foo foo的输出是什么?我很困惑它会显示foo文件的输出三次或者我可能不知道的任何其他内容吗?任何帮助表示赞赏?
更新:实际上我没有安装UNIX,我只是准备测试.我知道这个问题不被问到,但除了这个之外我没有别的办法.甚至我已经搜索过了.