Android Open Source - custom-touch-examples Touch Forward Activity

From Project

Back to project page custom-touch-examples.


The source code is released under:

Copyright (c) 2012 Wireless Designs, LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in ...

If you think the Android project custom-touch-examples 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

 * Copyright (c) 2012 Wireless Designs, LLC
 *//from   ww w.j  av  a 2  s. c om
 * See the file license.txt for copying permission.
package com.examples.customtouch;

import android.os.Bundle;
import android.view.Gravity;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;
import android.widget.FrameLayout;
import com.examples.customtouch.widget.TouchForwardLayout;

public class TouchForwardActivity extends Activity {

  protected void onCreate(Bundle savedInstanceState) {
    TouchForwardLayout layout = new TouchForwardLayout(this);
    Button button = new Button(this);
    button.setText("You Can't Miss Me!");
    FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
                LayoutParams.WRAP_CONTENT, Gravity.CENTER);
    layout.addView(button, lp);

Java Source Code List