Best aia Files Also Know As Project Files For Android Apps For Online Platforms And New Healt and Technology Updates For You !

Search This Blog

Showing posts with label Android Studio. Show all posts
Showing posts with label Android Studio. Show all posts

Friday, 16 November 2018

November 16, 2018

Open New Screen - Free AIDE Source codes and zip


AIDE Source codes

AndroidManifes
#AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.w4apk.ONS" >

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SecondActivity"/>
</application>

</manifest>

MAIN (.xml)
# main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">

<Button
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="Button"
android:id="@+id/button1"/>

</LinearLayout>

Secon (.xml)
# secon.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="#665E5D">

</LinearLayout>

MainActivity (.java)
#MainActivity.java
package com.w4apk.ONS;

import android.app.*;
import android.os.*;
import android.widget.*;
import android.view.*;
import android.view.View.*;
import android.content.*;

public class MainActivity extends Activity
{
private Button but1;
private Intent i = new Intent();

@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

but1=(Button) findViewById(R.id.button1);
but1.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View v){
i.setClass(getApplicationContext(),SecondActivity.class);
startActivity(i);
}
});
}
}

SecondActivity (.java)
#SecondActivity.java
package com.w4apk.ONS;
import android.app.*;
import android.os.*;


public class SecondActivity extends Activity
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.secon);
}}

Download AIDE Source File (.zip)