Newbie questions.

by F999KR » Thu, 26 Jun 2008 23:53:59 GMT


Sponsored Links
 Hey everyone. I'm a super newbie, and when I say super newbie, I mean
this is college level speech to a baby for me .

First of, I know I need to know Java, but what other program languages
would I need to know to jump right in there?

Second, does anyone know if the Android UI will be customizable, like
to your own made ones (like themes for windows).

OK, so i know I'm really new at this, if anyone doesn't understand the
questions let me know, and thanks in advanced for answering to this
post .

--~--~---------~--~----~------------~-------~--~----~



Newbie questions.

by Mark Murphy » Fri, 27 Jun 2008 00:01:17 GMT


 > Hey everyone. I'm a super newbie, and when I say super newbie, I mean

You may also be interested in the android-beginners Google Group, then, in
addition to this one.


It's not a programming language, but screen layouts and other resources
are written in XML.


Android has themes and styles, though it is unclear to me to what extent
the framework itself will support an end user "skinning" an arbitrary 
application. If you want to create a "skinnable" application, though, more
power to you, and it shouldn't be significantly more difficult than doing
so in any other run-of-the-mill programming environment.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
_The Busy Coder's Guide to Android Development_ -- Available Now!



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Does Camera API really works ?

I tried google's camera API sample code. I found there are 2 problems:
1> It only can take picture in Landscape orientation
2> After click the space "key", the application crashes. WOw:)

XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:layout_width="fill_parent"
android:layout_height="fill_parent"
    android:orientation="vertical">
    <SurfaceView android:id="@+id/surface"
        android:layout_width="fill_parent"
android:layout_height="10dip"
        android:layout_weight="1">
    </SurfaceView>
</LinearLayout>
Java code:
/**
 * Copyright (c) 2007, Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
 * See the License for the specific language governing permissions
and
 * limitations under the License.
 */

package com.android.cameraapitest;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Handler;
import android.os.Message;
import android.os.Bundle;
import android.provider.MediaStore.Images;
import android.provider.MediaStore.Video;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.KeyEvent;
import android.hardware.Camera;

import android.util.Log;

public class CameraApiTest extends Activity implements
SurfaceHolder.Callback
{
    private static final String TAG = "CameraApiTest";
    Camera mCamera;
    boolean mPreviewRunning = false;

    public void onCreate(Bundle icicle)
    {
        super.onCreate(icicle);

        Log.e(TAG, "onCreate");

        getWindow().setFormat(PixelFormat.TRANSLUCENT);

        setContentView(R.layout.camera_api_test);
        mSurfaceView = (SurfaceView)findViewById(R.id.surface);

        mSurfaceHolder = mSurfaceView.getHolder();
        mSurfaceHolder.addCallback(this);
        mSurfaceHolder.setType
(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
    }

    public boolean onCreateOptionsMenu(android.view.Menu menu) {
        MenuItem item = menu.add(0, 0, 0, "goto gallery");
        item.setOnMenuItemClickListener(new
MenuItem.OnMenuItemClickListener() {
            public boolean onMenuItemClick(MenuItem item) {
                Uri target = Uri.parse("content://media/external/
images/media");
                Intent intent = new Intent(Intent.ACTION_VIEW,
target);
                startActivity(intent);
                return true;
            }
        });
        return true;
    }

    @Override
    protected void onRestoreInstanceState(Bundle savedInstanceState)
    {
        super.onRestoreInstanceState(savedInstanceState);
    }

    Camera.PictureCallback mPictureCallback = new
Camera.PictureCallback() {
        public void onPictureTaken(byte[] data, Camera c) {
            Log.e(TAG, "PICTURE CALLBACK: data.length = " +
data.length);
            mCamera.startPreview();
        }
    };

    public boolean onKeyDown(int keyCode, KeyEvent event)
    {
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            return super.onKeyDown(keyCode, event);
        }

        if (keyCode == KeyEvent.KEYCODE_SPACE) {
            mCamera.takePicture(null, mPictureCallback);
            return true;
        }

        return false;
    }

    protected void onResume()
    {
        Log.e(TAG, "onResume");
        super.onResume();
    }

    protected void onSaveInstanceState(Bundle outState)
    {
        super.onSaveInstanceState(outState);
    }

    protected void onStop()
    {
        Log.e(TAG, "onStop");
        super.onStop();
    }

    public void surfaceCreated(SurfaceHolder holder)
    {
        Log.e(TAG, "surfaceCreated");
        mCamera = Camera.open();
        //mCamera.startPreview();
    }

    public void surfaceChanged(SurfaceHolder holder, int format, int
w, int h)
    {
        Log.e(TAG, "surfaceChanged");

        // XXX stopPreview() will crash if preview is not running
        if (mPreviewRunning) {
            mCamera.stopPreview();
        }

        Camera.Parameters p = mCamera.getParameters();
        p.setPreviewSize(w, h);
        mCamera.setParameters(p);
        mCamera.setPreviewDisplay(holder);
        mCamera.startPreview();
        mPreviewRunning = true;
    }

    public void surfaceDestroyed(SurfaceHolder holder)
    {
        Log.e(TAG, "surfaceDestroyed");
        mCamera.stopPreview();
        mPreviewRunning = false;
        mCamera.release();
    }

    private SurfaceView mSurfaceView;
    private SurfaceHolder mSurfaceHolder;
}


--~--~---------~--~----~------------~-------~--~----~

2. XMLHttpRequest

Nobody made a note , that ajax is implemented in android 1.5 ..
 only after making my own xhr object , i tried to test run ajax , and
it was working otherwise ...
my 10 days of hardwork went into vain
--~--~---------~--~----~------------~-------~--~----~

3. List in Gallery

4. Slow searching in large sqlite database ?

5. Dialog in wrong orientation

6. HTC Hero has multi-touch. SDK support?

7. get applications onto the HTC Dream