Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Galakart committed Dec 2, 2013
1 parent 9b999b2 commit 0cab002
Show file tree
Hide file tree
Showing 28 changed files with 430 additions and 6 deletions.
9 changes: 9 additions & 0 deletions .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="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<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="output" path="bin/classes"/>
</classpath>
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
*.class

# Package Files #
*.jar
*.war
*.ear
bin
gen
33 changes: 33 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MajorDroid</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
4 changes: 4 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
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
40 changes: 40 additions & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="https://schemas.android.com/apk/res/android"
package="ru.galakart.majordroid"
android:versionCode="1"
android:versionName="1.0" >

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

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />

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

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="ru.galakart.majordroid.ControsActivity"
android:label="@string/title_activity_contros"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="ru.galakart.majordroid.Prefs"
android:label="@string/action_settings"
android:screenOrientation="portrait" >
</activity>
</application>

</manifest>
Binary file added ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added libs/android-support-v4.jar
Binary file not shown.
14 changes: 14 additions & 0 deletions project.properties
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 added res/drawable-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions res/layout/activity_contros.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<RelativeLayout xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:tools="https://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=".ControsActivity" >

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

</RelativeLayout>
16 changes: 16 additions & 0 deletions res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<RelativeLayout xmlns:android="https://schemas.android.com/apk/res/android"
xmlns:tools="https://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >

<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:layout_alignParentRight="true" />

</RelativeLayout>
9 changes: 9 additions & 0 deletions res/menu/contros.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<menu xmlns:android="https://schemas.android.com/apk/res/android" >

<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>

</menu>
15 changes: 15 additions & 0 deletions res/menu/main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<menu xmlns:android="https://schemas.android.com/apk/res/android" >

<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/action_settings"/>

<item
android:id="@+id/action_controls"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/title_activity_contros"/>

</menu>
8 changes: 8 additions & 0 deletions res/values-sw600dp/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<resources>

<!--
Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw600dp devices (e.g. 7" tablets) here.
-->

</resources>
9 changes: 9 additions & 0 deletions res/values-sw720dp-land/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<resources>

<!--
Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here.
-->
<dimen name="activity_horizontal_margin">128dp</dimen>

</resources>
11 changes: 11 additions & 0 deletions res/values-v11/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<resources>

<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light">
<!-- API 11 theme customizations can go here. -->
</style>

</resources>
12 changes: 12 additions & 0 deletions res/values-v14/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<resources>

<!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>

</resources>
7 changes: 7 additions & 0 deletions res/values/arrays.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="dostup">
<item>Локальный</item>
<item>Глобальный</item>
</string-array>
</resources>
7 changes: 7 additions & 0 deletions res/values/dimens.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<resources>

<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">48dp</dimen>

</resources>
19 changes: 19 additions & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<string name="app_name">MajorDroid</string>
<string name="action_settings">Настройки</string>
<string name="hello_world">Hello world!</string>
<string name="title_activity_contros">Кнопки управления</string>
<string name="localUrl">Локальный адрес</string>
<string name="localUrl_summary">Адрес сервера в локальной сети</string>
<string name="globalUrl">Глобальный адрес</string>
<string name="globalUrl_summary">Внешний адрес сервера</string>
<string name="login">Логин</string>
<string name="login_summary">Имя для внешнего доступа</string>
<string name="passw">Пароль</string>
<string name="passw_summary">Пароль для внешнего доступа</string>
<string name="dostup">Режим доступа</string>
<string name="dostup_summary">Доступ локальный или глобальный</string>

</resources>
20 changes: 20 additions & 0 deletions res/values/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<resources>

<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>

</resources>
34 changes: 34 additions & 0 deletions res/xml/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="https://schemas.android.com/apk/res/android" >

<ListPreference
android:defaultValue="1"
android:dialogTitle="Режим:"
android:entries="@array/dostup"
android:entryValues="@array/dostup"
android:key="@string/dostup"
android:summary="@string/dostup_summary"
android:title="@string/dostup" />

<EditTextPreference
android:dialogTitle="Адрес сервера:"
android:key="@string/localUrl"
android:summary="@string/localUrl_summary"
android:title="@string/localUrl" />
<EditTextPreference
android:dialogTitle="Адрес сервера:"
android:key="@string/globalUrl"
android:summary="@string/globalUrl_summary"
android:title="@string/globalUrl" />
<EditTextPreference
android:dialogTitle="Логин:"
android:key="@string/login"
android:summary="@string/login_summary"
android:title="@string/login" />
<EditTextPreference
android:dialogTitle="Пароль:"
android:key="@string/passw"
android:summary="@string/passw_summary"
android:title="@string/passw" />

</PreferenceScreen>
22 changes: 22 additions & 0 deletions src/ru/galakart/majordroid/ControsActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package ru.galakart.majordroid;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

public class ControsActivity extends Activity {

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

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

}
Loading

0 comments on commit 0cab002

Please sign in to comment.