Started working on a new 'Add'-Activity

This commit is contained in:
Michael Schättgen 2016-08-24 01:26:33 +02:00
parent 8063ba11f1
commit c5626a41a7
5 changed files with 95 additions and 6 deletions

2
.idea/misc.xml generated
View file

@ -37,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" /> <ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" /> <ConfirmationsSetting value="0" id="Remove" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">

View file

@ -15,13 +15,16 @@
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar"> android:theme="@style/AppTheme.NoActionBar">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".ScannerActivity"> <activity android:name=".ScannerActivity">
</activity> </activity>
<activity android:name=".AddProfileActivity"
android:theme="@style/Theme.AppCompat.NoActionBar" >
</activity>
</application> </application>
</manifest> </manifest>

View file

@ -0,0 +1,15 @@
package me.impy.aegis;
import android.app.Activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Window;
public class AddProfileActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_add_profile);
}
}

View file

@ -113,8 +113,9 @@ public class MainActivity extends AppCompatActivity {
} }
keyProfile.Code = otp; keyProfile.Code = otp;
Intent intent = new Intent(this, AddProfileActivity.class);
new LovelyTextInputDialog(this, R.style.EditTextTintTheme) startActivity(intent);
/* new LovelyTextInputDialog(this, R.style.EditTextTintTheme)
.setTopColorRes(R.color.colorHeaderSuccess) .setTopColorRes(R.color.colorHeaderSuccess)
.setTitle("New profile added") .setTitle("New profile added")
.setMessage("How do you want to call it?") .setMessage("How do you want to call it?")
@ -141,7 +142,7 @@ public class MainActivity extends AppCompatActivity {
} }
} }
}) })
.show(); .show();*/
//TODO: do something with the result. //TODO: do something with the result.
} }

View file

@ -0,0 +1,70 @@
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/viewA"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.6"
android:background="@color/colorPrimary"
android:orientation="horizontal">
<LinearLayout
android:orientation="vertical"
android:layout_width="360dp"
android:layout_height="80dp"
android:paddingLeft="50dp"
android:layout_gravity="center_vertical">
<TextView
android:text="Profile name"
android:layout_width="111dp"
android:layout_height="wrap_content"
android:id="@+id/textView"
android:layout_weight="0.53"
android:gravity="bottom"
android:textSize="18sp"
android:layout_marginLeft="3dp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:ems="10"
android:paddingTop="0dp"
android:id="@+id/editText3"
android:textSize="28sp"
/>
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/viewB"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.4"
android:background="@color/background"
android:orientation="horizontal"/>
</LinearLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:clickable="true"
app:layout_anchor="@id/viewA"
app:layout_anchorGravity="bottom|right|end"/>
<!--android:src="@drawable/ic_done"-->
</android.support.design.widget.CoordinatorLayout>