Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android App #21

Open
gradnik opened this issue Oct 10, 2016 · 3 comments
Open

Android App #21

gradnik opened this issue Oct 10, 2016 · 3 comments

Comments

@gradnik
Copy link
Collaborator

gradnik commented Oct 10, 2016

Ich habe nun eine Applikation mit zwei Knöpfen (Backup und Recovery) erstellt.
Beide Knöpfe funktionieren und wenn man sie drückt, erscheint eine Kurzmitteilung mit der Nachricht "Tapped".

Ich arbeite nun daran, die App zu verbessern.

Update meiner letzen Arbeitsschritte: Ich habe

  • Der App eine zweite Activity hinzugefügt, welche on button click (bei Knopfdruck) startet.
  • Der zweiten Activity eine Uhr hinzugefügt, die es erlaubt eine Zeit auszuwählen und darunter habe ich einen Knopf erstellt, welcher die ausgewählte Zeit speichern soll.

-> Ich habe es bis jetzt noch nicht geschafft, die Zeit abzuspeichern, deswegen habe ich eine Zweite App erstellt, um das Ziel eine Datei über die App zu erstellen und auf dem Gerät abzuspeichern, zu erreichen.

  • Bei der neuen App, habe ich wieder einen Knopf "Backup" erstellt, welcher eine neue Activity öffnet.
  • Die neue Activity " select time for Backup" habe ich so programmiert, dass sich in der mitte des Bildschirms ein Textfeld befindet, in welches man, eine Nachricht (z.B.) eine Zeitangabe, eintragen kann.
  • Unter dem Textfeld befindet sich ein weiterer Knopf, mit welchem man die eingetragene Nachricht, im ordner Notes abspeichern kann. Sobald man also "save" clickt, speichter es die Nachricht auf dem Gerät und teilt dies dem Benutzer mit.
  • Ich habe das Layout der App ansprechender gemacht, ein neues Logo eingefügt und einen animierten Splashscreen. der beim Start der App erscheint, erstellt.
  • Ich habe die App mehrmals auf einem "virtual device" getestet, bin auf verschiedene Fehler gestossen und habe diese korrigiert. Die App funktioniert, so wie sie soll.
  • Ich konnte nun die app auf meinem Smartphone testen. Es funktioniert.
@gradnik
Copy link
Collaborator Author

gradnik commented Oct 17, 2016

Ich habe probleme damit, die app so zu ändern damit sie "on button click" direkt (d.h. ohne eingabe in den Text-Editor) eine Datei generiert mit dem Bashscript als inhalt.

@gradnik
Copy link
Collaborator Author

gradnik commented Oct 20, 2016

@gradnik
Copy link
Collaborator Author

gradnik commented Oct 26, 2016

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"

android:background="#222222"
android:id="@+id/activity_first"
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="com.example.niklaus.abcd.first">

<Button
    android:text="Backup"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="155dp"
    android:id="@+id/butt1"
    android:background="#FF6644"
    android:textColor="#FFFFFF"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:textSize="20sp" />

<LinearLayout 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:background="#222222"
android:orientation="vertical" >

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_marginTop="10dp"
    android:text="Select Time for Backup"
    android:textColor="#FF8866"
    android:textSize="25sp"
    android:textStyle="bold"
    android:typeface="monospace" />


<EditText

    android:id="@+id/contenttxt"
    android:layout_width="315dp"
    android:layout_height="207dp"
    android:layout_gravity="center"
    android:layout_marginBottom="10dp"
    android:layout_marginLeft="10dp"
    android:layout_marginRight="10dp"
    android:background="#222222"
    android:textColor="#111"
    android:layout_marginTop="10dp"
    android:gravity="top|left"
    android:scrollHorizontally="false"
    android:singleLine="false"
    android:text="Enter Time" />

<TextView

    android:id="@+id/resulttxt"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_marginTop="10dp"
    android:text=""
    android:textColor="#ffffff"
    android:textSize="20sp"
    android:textStyle="bold"
    android:typeface="monospace" />

<Button
    android:id="@+id/exportbtn"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_marginTop="10dp"
    android:background="#FF6644"
    android:gravity="center"
    android:paddingBottom="10dp"
    android:paddingLeft="10dp"
    android:paddingRight="10dp"
    android:paddingTop="10dp"
    android:text="Save"
    android:textColor="#FFFFFF"
    android:textSize="20sp" />

<ImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:srcCompat="@mipmap/ic_launcher"
    android:layout_centerVertical="true"
    android:layout_centerHorizontal="true"
    android:id="@+id/imageView4" />

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

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

            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </activity>
    <activity android:name=".second" />
    <activity android:name=".WelcomScreen" />
    <activity android:name=".WelcomeActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant