ikutan Milis dgn PushMail

by Milis Android » Thu, 13 Aug 2009 06:40:15 GMT


Sponsored Links
 Bapak2, Ibu2 ...

apakah sudah pakai push mail?
ini ada email Exchange Server gratis..
kapasitas 150 MB, upload attachment 25MB
register di  http://win.alol.net.br/owa 

atau install app seven di android
ini linknya 
 http://community.seven.com/files/Z7-20_0-336010-def_seven-preview.apk 

Hajaaaaar....

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



Other Threads

1. startActivityForResult on tab

Hi Experts,

i need to start startActivityForResult on a tab click,

here is my activity senario:

Activity A  calling startActivityForResult -> B (tab activity)
startActivityForResult -> C onResult -> A
 
-> D onResult -> A



tabHost.addTab(tabHost.newTabSpec("Search")
                .setIndicator("",getResources().getDrawable
(R.drawable.search_icon))
                .setContent(new Intent(this, MyClass.class)));

how can i call the above MyClass as startActivityForResult ?

also can i call any function on tab click?
--~--~---------~--~----~------------~-------~--~----~

2. Using Preferences to login?

Hi,
I want to use Preferences to get data in EditText to login my app. So
I can get data in EditText but I can't compare the data of EditText in
file Login and in file Preferences. Would you tell me how I can do?
Preferences file :
XML:

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/
android">
     <PreferenceCategory android:title="UserName">
          <EditTextPreference
               android:key="cusername"
               android:title="Change UserName"
               android:summary="Click to pop up a field for entry"
               android:dialogTitle="Enter new User"/>
     </PreferenceCategory>
     <PreferenceCategory android:title="Password">
          <EditTextPreference
               android:key="cpassword"
               android:title="Change Password"
               android:summary="Click to pop up a field for entry"
               android:password="true"
               android:dialogTitle="Enter new Password"/>
     </PreferenceCategory>
</PreferenceScreen>

Java:
Java:

import android.os.Bundle;
import android.preference.PreferenceActivity;

public class ChangeUser extends PreferenceActivity {
     @Override
      protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           addPreferencesFromResource(R.xml.changeuser);
     }
}


This is my Login file:
Java:

public class Login extends Activity  {
        private TextView tempUser;
     private TextView tempPass;

     private EditText eUser;
     private EditText ePass;
     private Button mLog;
     private Button mClose;
 public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.login);

        eUser = (EditText) findViewById(R.id.username);
        ePass = (EditText) findViewById(R.id.password);

        SharedPreferences
prefs=PreferenceManager.getDefaultSharedPreferences(this);
        tempUser.setText(prefs.getString("cusername", ""));
        tempPass.setText(prefs.getString("cpassword", ""));

        mLog = (Button) findViewById(R.id.loginbutton);
        mLog.setOnClickListener (mLogListener);
        mClose = (Button) findViewById(R.id.closebutton);
        mClose.setOnClickListener (mCloListener);
}
 private OnClickListener mLogListener = new OnClickListener()
{
     public void onClick(View v) {

     }
    };

    private OnClickListener mCloListener = new OnClickListener() {
     public void onClick(View v) {
          finish();
     }
    };
}

Login.xml
XML:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
     android:layout_width="fill_parent"
        android:layout_height="fill_parent">
<ScrollView
     android:layout_width="fill_parent"
        android:layout_height="fill_parent">
<LinearLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:scrollbars="vertical">
     <TextView
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_gravity="center_vertical|center_horizontal|
center"/>
     <TextView
         android:id="@+id/logintext"
         android:layout_height="wrap_content"
         android:text="TEST"
          android:textStyle="bold"
          android:textSize="20px" android:layout_gravity="center"
android:layout_width="fill_parent"/>
     <TextView
          android:layout_width="fill_parent"
          android:layout_height="20px"
          android:layout_gravity="center_vertical|center_horizontal|
center"/>
     <TextView
         android:id="@+id/usertext"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_gravity="center_vertical|center_horizontal|
center"
         android:text="USERNAME"/>
    <EditText
         android:id="@+id/username"
         android:layout_height="wrap_content"
          android:focusableInTouchMode="true"
          android:layout_gravity="center_horizontal"
          android:layout_marginRight="5dip"
          android:layout_marginLeft="5dip"
          android:layout_width="320dip" android:singleLine="true"
android:focusable="true"/>
     <TextView
          android:layout_width="fill_parent"
          android:layout_height="10px"
          android:layout_gravity="center_vertical|center_horizontal|
center"/>
     <TextView
         android:id="@+id/passtext"
         android:text="PASSWORD"
         android:layout_width="fill_parent"
         android:layout_height="wrap_content"
         android:layout_gravity="center_vertical|center_horizontal|
center"/>
    <EditText
         android:id="@+id/password"
         android:layout_height="wrap_content"
          android:focusableInTouchMode="true"
          android:layout_gravity="center_horizontal"
          android:layout_marginRight="5px"
          android:layout_marginLeft="5dip"
          android:layout_width="320dip"
          android:password="true" android:singleLine="true"/>
     <TextView
          android:layout_width="fill_parent"
          android:layout_height="30px"
          android:layout_gravity="center_vertical|center_horizontal|
center"/>
<LinearLayout
     android:orientation="horizontal"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_width="wrap_content">
     <Button
         android:id="@+id/loginbutton"
         android:layout_height="50dip"
          android:text="LOGIN"
          android:layout_width="103dip"/>
     <Button
          android:id="@+id/closebutton"
          android:layout_height="50dip"
          android:text="CLOSE"
          android:layout_width="103dip"/>
</LinearLayout>
     <TextView
          android:layout_width="fill_parent"
          android:layout_height="30px"
          android:layout_gravity="center_vertical|center_horizontal|
center"/>
</LinearLayout>
</ScrollView>
</RelativeLayout>


Thanks,

--Alex
--~--~---------~--~----~------------~-------~--~----~

3. Android Killswitch

4. Doesn't Android-1.0 support Recording Video well?

5. How to communicate between 2 activities

6. How to use two different icon in two different themes

7. restore savedInstance