Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
silvermist committed Mar 21, 2014
1 parent c2c5736 commit 60f2c78
Show file tree
Hide file tree
Showing 47 changed files with 350 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.source=1.6
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- From: file:/Users/mohamedfarghal/megasoft-14/FrameworkTask/Component3/FrontEnd/MegaTODO/app/src/main/AndroidManifest.xml -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.megasoft.todo">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19"/>

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

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

</manifest>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** Automatically generated file. DO NOT MODIFY */
package com.megasoft.todo;

public final class BuildConfig {
public final static boolean DEBUG = true;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-19
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ public static final class dimen {
public static final int activity_vertical_margin=0x7f040001;
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
public static final int button_style=0x7f020000;
public static final int ic_launcher=0x7f020001;
public static final int list_style=0x7f020002;
}
public static final class id {
public static final int action_settings=0x7f080000;
public static final int action_settings=0x7f080003;
public static final int button1=0x7f080001;
public static final int editText=0x7f080000;
public static final int sampleListView=0x7f080002;
}
public static final class layout {
public static final int activity_main=0x7f030000;
Expand All @@ -35,7 +40,7 @@ public static final class menu {
public static final class string {
public static final int action_settings=0x7f050001;
public static final int app_name=0x7f050000;
public static final int hello_world=0x7f050002;
public static final int button1=0x7f050002;
}
public static final class style {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape>
<solid
android:color="#FF3333" />
<stroke
android:width="1dp"
android:color="#000000" />
<corners
android:radius="6dp" />
<padding
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
</shape>
</item>
<item>
<shape>
<solid
android:color="#6600CC" />
<stroke
android:width="1dp"
android:color="#000000" />
<corners
android:radius="6dp" />
<padding
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
</shape>
</item>
</selector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<gradient
android:startColor="#660066"
android:endColor="#FF3399"
android:angle="270" />

<corners
android:radius="6dp" />
<padding
android:left="10dp"
android:top="10dp"
android:right="10dp"
android:bottom="10dp" />
</shape>
</item>
</selector>
Original file line number Diff line number Diff line change
@@ -1,16 +1,50 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:clickable="true"
>

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >

<EditText
android:id="@+id/editText"
android:layout_width="193dp"
android:layout_height="wrap_content"
android:inputType="text" >
</EditText>

<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/button_style"
android:text="@string/button1"
android:textColor="#000000" />
</LinearLayout>

<ListView
android:id="@+id/sampleListView"
android:layout_width="wrap_content"
android:layout_height="0dip"
android:layout_marginBottom="10dp"
android:layout_marginTop="5dp"
android:layout_weight="1"
android:background="@drawable/list_style"
android:cacheColorHint="@android:color/transparent"
android:divider="#000000"
android:dividerHeight="3dp"
android:paddingLeft="2dp" >
</ListView>



</LinearLayout>



<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />

</RelativeLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

<string name="app_name">MegaTODO</string>
<string name="action_settings">Settings</string>
<string name="hello_world">Hello world!</string>
<string name="button1">Create!</string>

</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
package com.megasoft.todo;

import org.json.JSONException;
import org.json.JSONObject;


import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
SharedPreferences config = getSharedPreferences("AppConfig", 0);
//aw whatever l login activity 3ndna esmaha a
final Intent intent = new Intent(this, LoginActivity2.class);

if(!config.contains("sessionId")){
startActivity(intent);
}
final String sessionId = config.getString("sessionId", null);

setContentView(R.layout.activity_main);
Button create = (Button) findViewById(R.id.button1);
final EditText text = (EditText) findViewById(R.id.editText);
final JSONObject obj = new JSONObject();

create.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
String listName = text.getText().toString();
try {
JSONObject json = new JSONObject();
json.put("text", listName);
//we might enter the initial tasks for the list in this phase as well
json.put("sessionId", sessionId);
(new HTTPPostRequest(){

public void onPostExecute() {
//was ist das??
Log.d(" ", " ");
}

}).execute(json.toString(), "/lists");

} catch (JSONException ex) {
ex.printStackTrace();
}

}
});

}


@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}

}
9 changes: 9 additions & 0 deletions SampleCodes/MegaTweet/app/src/main/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.source=1.6
28 changes: 28 additions & 0 deletions SampleCodes/MegaTweet/app/src/main/bin/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.megasoft.tweet" >

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".activities.LoginActivity"
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=".activities.TweetActivity"
android:label="@string/title_activity_tweet" >
</activity>
</application>

</manifest>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** Automatically generated file. DO NOT MODIFY */
package com.megasoft.tweet;

public final class BuildConfig {
public final static boolean DEBUG = true;
}
59 changes: 59 additions & 0 deletions SampleCodes/MegaTweet/app/src/main/gen/com/megasoft/tweet/R.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/

package com.megasoft.tweet;

public final class R {
public static final class attr {
}
public static final class dimen {
/** Default screen margins, per the Android Design guidelines.
Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
*/
public static final int activity_horizontal_margin=0x7f040000;
public static final int activity_vertical_margin=0x7f040001;
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
}
public static final class id {
public static final int action_settings=0x7f080008;
public static final int loginButton=0x7f080002;
public static final int myLabel=0x7f080003;
public static final int password=0x7f080001;
public static final int refresh=0x7f080006;
public static final int text=0x7f080004;
public static final int tweet=0x7f080005;
public static final int tweetsContainer=0x7f080007;
public static final int username=0x7f080000;
}
public static final class layout {
public static final int activity_login=0x7f030000;
public static final int activity_tweet=0x7f030001;
}
public static final class menu {
public static final int main=0x7f070000;
public static final int tweet=0x7f070001;
}
public static final class string {
public static final int action_settings=0x7f050002;
public static final int app_name=0x7f050000;
public static final int hello_world=0x7f050001;
public static final int login=0x7f050004;
public static final int refresh=0x7f050007;
public static final int title_activity_tweet=0x7f050005;
public static final int tweet=0x7f050006;
public static final int username=0x7f050003;
}
public static final class style {
/** Base application theme.
*/
public static final int AppTheme=0x7f060000;
}
}
Loading

0 comments on commit 60f2c78

Please sign in to comment.