Skip to content
Snippets Groups Projects
Commit 6fc98590 authored by unknown's avatar unknown
Browse files

Fix route

parent aa2e663c
Branches
No related merge requests found
......@@ -17,10 +17,8 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".LoadingActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"></activity>
<activity android:name=".LoginActivity"></activity>
<activity android:name=".LoginActivity"/>
<activity android:name=".RegistrationActivity"/>
</application>
</manifest>
\ No newline at end of file
package com.example.leo.fitnessdiy;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
public class LoadingActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_loading);
Thread welcomeThread = new Thread() {
@Override
public void run() {
try {
super.run();
sleep(10000);
} catch (Exception e) {
e.printStackTrace();
} finally {
findViewById(R.id.loading_progress).setVisibility(View.GONE);
Intent i = new Intent(LoadingActivity.this, MainActivity.class);
startActivity(i);
finish();
}
}
};
welcomeThread.start();
}
}
......@@ -4,6 +4,7 @@ import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
......@@ -12,6 +13,28 @@ public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.registration);
requestWindowFeature( Window.FEATURE_NO_TITLE );
getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN );
setContentView(R.layout.activity_main);
Thread welcomeThread = new Thread() {
@Override
public void run() {
try {
super.run();
sleep(10000);
} catch (Exception e) {
e.printStackTrace();
} finally {
Intent i = new Intent(getApplicationContext(), LoginActivity.class);
startActivity(i);
finish();
}
}
};
welcomeThread.start();
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.leo.fitnessdiy.LoadingActivity"
android:background="@drawable/main_background"
android:gravity="center"
android:padding="36dp"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/logo"/>
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"
android:id="@+id/loading_progress"/>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.leo.fitnessdiy.MainActivity"
android:orientation="horizontal">
android:background="@drawable/main_background"
android:gravity="center"
android:padding="36dp"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/logo"/>
</LinearLayout>
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:indeterminate="true"
android:indeterminateTint="#3d3d3d"
android:id="@+id/loading_progress" />
</LinearLayout>
\ No newline at end of file
......@@ -4,9 +4,6 @@
<string name="email">Email</string>
<string name="password">Password</string>
<string name="login">Login</string>
<string name="email">Email</string>
<string name="password">Password</string>
<string name="login">Login</string>
<string name="name">Name</string>
<string name="phone">Phone</string>
<string name="address">Address</string>
......
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment