Guest User

Untitled

a guest
Jan 18th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.87 KB | None | 0 0
  1. import android.content.Intent;
  2. import android.graphics.Color;
  3. import android.graphics.drawable.ColorDrawable;
  4. import android.os.Bundle;
  5.  
  6. import android.content.Intent;
  7. import android.support.v7.app.ActionBar;
  8. import android.support.v7.app.AppCompatActivity;
  9. import android.os.Bundle;
  10. import android.view.WindowManager;
  11.  
  12. public class SplashActivity extends AppCompatActivity {
  13.  
  14.  
  15. @Override
  16. protected void onCreate(Bundle savedInstanceState) {
  17. super.onCreate(savedInstanceState);
  18. setContentView(R.layout.activity_splash);
  19. getSupportActionBar().hide();
  20.  
  21.  
  22. Thread myThread = new Thread() {
  23. @Override
  24. public void run() {
  25. try {
  26. sleep(3000);
  27. Intent intent = new Intent(getApplicationContext(), OnBoardActivity.class);
  28. startActivity(intent);
  29. finish();
  30.  
  31. } catch (InterruptedException e) {
  32. e.printStackTrace();
  33. }
  34. }
  35. };
  36. myThread.start();
  37. }
  38. }
  39.  
  40. import android.content.Intent;
  41. import android.content.SharedPreferences;
  42. import android.graphics.Color;
  43. import android.os.Bundle;
  44.  
  45.  
  46. import com.hololo.tutorial.library.Step;
  47. import com.hololo.tutorial.library.TutorialActivity;
  48.  
  49.  
  50.  
  51. public class OnBoardActivity extends TutorialActivity {
  52.  
  53. @Override
  54. protected void onCreate(Bundle savedInstanceState) {
  55. super.onCreate(savedInstanceState);
  56.  
  57. //slide1
  58. addFragment(new Step.Builder().setTitle("WELCOME.NAMASTE!!")
  59. .setSummary("It seems like you are a New User!!nWe welcome you
  60. to GFeed.")
  61. .setBackgroundColor(Color.parseColor("#FFA600")) // int
  62. background color
  63. .setDrawable(R.drawable.gh) // int top drawable
  64.  
  65. .build());
  66. //slide2
  67. addFragment(new Step.Builder().setTitle("CAREER ORIENTED")
  68. .setSummary("This app includes some awesome career oriented
  69. elements such as Internship,different courses related to CS/IT,career
  70. tips by experts.")
  71. .setBackgroundColor(Color.parseColor("#FFA600")) // int
  72. background color
  73. .setDrawable(R.drawable.human) // int top drawable
  74.  
  75. .build());
  76. //slide3
  77. addFragment(new Step.Builder().setTitle("COLLEGE ORIENTED")
  78. .setSummary("This app includes some awesome college oriented
  79. elements such as college club news,aktu feed,H.O.D'corner and Gsim")
  80. .setBackgroundColor(Color.parseColor("#FFA600")) // int
  81. background color
  82. .setDrawable(R.drawable.college) // int top drawable
  83.  
  84. .build());
  85. }
  86.  
  87. @Override
  88. public void finishTutorial() {
  89.  
  90.  
  91.  
  92. // Launch the main Activity, called MainActivity
  93. Intent main = new Intent(this, MainActivity.class);
  94. startActivity(main);
  95.  
  96. // Close the OnboardingActivity
  97. finish();
  98.  
  99.  
  100. // Check if onboarding_complete is false
  101.  
  102. }
  103. }
  104.  
  105. <uses-permission android:name="android.permission.INTERNET" />
  106.  
  107. <application
  108. android:allowBackup="true"
  109. android:icon="@drawable/vtry"
  110. android:label="@string/app_name"
  111. android:largeHeap="true"
  112. android:supportsRtl="true"
  113. android:theme="@style/AppTheme">
  114. <activity
  115. android:name=".SplashActivity"
  116. android:screenOrientation="portrait">
  117. <intent-filter>
  118. <action android:name="android.intent.action.MAIN" />
  119.  
  120. <category android:name="android.intent.category.LAUNCHER" />
  121. </intent-filter>
  122. </activity>
  123. <activity
  124. android:name=".MainActivity"
  125. android:label="@string/app_name"
  126. android:screenOrientation="portrait"
  127. android:theme="@style/AppTheme.NoActionBar">
  128. <intent-filter>
  129. <action android:name="MAINACTIVITY" />
  130.  
  131. <category android:name="android.intent.category.DEFAULT" />
  132. </intent-filter>
  133. </activity>
  134. <activity android:name=".developer"
  135. android:screenOrientation="portrait">
  136. </activity>
  137. <activity android:name=".notify"
  138. android:screenOrientation="portrait">
  139. <intent-filter>
  140. <action android:name="NOTIFY" />
  141.  
  142. <category android:name="android.intent.category.DEFAULT" />
  143. </intent-filter>
  144. </activity>
  145. <activity android:name=".download"
  146. android:screenOrientation="portrait">
  147. </activity>
  148. <activity android:name=".webvr"
  149. android:screenOrientation="portrait">
  150. />
  151. <intent-filter>
  152. <action android:name="WEBVR" />
  153.  
  154. <category android:name="android.intent.category.DEFAULT" />
  155. </intent-filter>
  156. </activity>
  157. <activity android:name=".gsim"
  158. android:screenOrientation="portrait">
  159. />
  160. </activity>
  161. <activity android:name=".Internship"
  162. android:screenOrientation="portrait">
  163. />
  164. </activity>
  165. <activity android:name=".Courses"
  166. android:screenOrientation="portrait">
  167. />
  168. </activity>
  169. <activity android:name=".Aktu"
  170. android:screenOrientation="portrait">
  171. />
  172. </activity>
  173. <activity android:name=".Interview"
  174. android:screenOrientation="portrait">
  175. </activity>
  176. <activity android:name=".Reachus"
  177. android:screenOrientation="portrait">
  178. </activity>
  179. <activity android:name=".OnBoardActivity"
  180. android:screenOrientation="portrait">
  181.  
  182. </activity>
  183. <service
  184. android:name=".FirebaseMessagingService">
  185. <intent-filter>
  186. <action android:name="com.google.firebase.MESSAGING_EVENT"/>
  187.  
  188.  
  189. </intent-filter>
  190. </service>
  191. <!-- Set custom default icon. This is used when no icon is set for incoming notification messages.
  192.  
  193. <meta-data
  194. android:name="com.google.firebase.messaging.default_notification_icon"
  195. android:resource="@drawable/vtry" />
  196. <!-- Set color used with incoming notification messages. This is used when no color is set for the incoming
  197.  
  198. <meta-data
  199. android:name="com.google.firebase.messaging.default_notification_color"
  200. android:resource="@color/colorAccent" />
  201.  
  202. </application>
Add Comment
Please, Sign In to add comment