Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60811e41 authored by Daniel Sandler's avatar Daniel Sandler Committed by android-build-merger
Browse files

Merge "" into oc-dev am: 0aaae4ae

am: 770a4f20

Change-Id: Idc25cc03b6c6d9f2441b90487757dea1e795d48c
parents 3d4ac192 770a4f20
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -5,6 +5,7 @@ LOCAL_MODULE_TAGS := optional
LOCAL_STATIC_JAVA_LIBRARIES := \
LOCAL_STATIC_JAVA_LIBRARIES := \
    android-support-v4 \
    android-support-v4 \
    android-support-v13 \
    android-support-v13 \
    android-support-dynamic-animation \
    android-support-v7-recyclerview \
    android-support-v7-recyclerview \
    android-support-v7-preference \
    android-support-v7-preference \
    android-support-v7-appcompat \
    android-support-v7-appcompat \
+14 −2
Original line number Original line Diff line number Diff line
@@ -19,12 +19,25 @@ Copyright (C) 2016 The Android Open Source Project
          android:versionCode="1"
          android:versionCode="1"
          android:versionName="1.0">
          android:versionName="1.0">


    <uses-sdk android:minSdkVersion="24" />
    <uses-sdk android:minSdkVersion="26" />


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


    <application android:label="@string/app_name" android:icon="@drawable/icon">
    <application android:label="@string/app_name" android:icon="@drawable/icon">

        <activity android:name=".octo.Ocquarium"
            android:theme="@android:style/Theme.DeviceDefault.NoActionBar.Fullscreen"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="com.android.internal.category.PLATLOGO" />
            </intent-filter>
        </activity>

        <!-- Android N lives on inside Android O... -->

        <!-- Long press the QS tile to get here -->
        <!-- Long press the QS tile to get here -->
        <activity android:name=".neko.NekoLand"
        <activity android:name=".neko.NekoLand"
                  android:theme="@android:style/Theme.Material.NoActionBar"
                  android:theme="@android:style/Theme.Material.NoActionBar"
@@ -57,7 +70,6 @@ Copyright (C) 2016 The Android Open Source Project
            <intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="com.android.internal.category.PLATLOGO" />
            </intent-filter>
            </intent-filter>
        </activity>
        </activity>


+17 −14
Original line number Original line Diff line number Diff line
<!--
<!--
Copyright (C) 2016 The Android Open Source Project
Copyright (C) 2017 The Android Open Source Project


   Licensed under the Apache License, Version 2.0 (the "License");
   Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    you may not use this file except in compliance with the License.
@@ -14,24 +14,27 @@ Copyright (C) 2016 The Android Open Source Project
    limitations under the License.
    limitations under the License.
-->
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="512dp"
        android:width="48dp"
        android:height="512dp"
        android:height="48dp"
        android:viewportWidth="48.0"
        android:viewportWidth="48.0"
        android:viewportHeight="48.0">
        android:viewportHeight="48.0">
    <path
    <path
        android:fillColor="#FF7E5BBF"
        android:pathData="M25.0,25.0m-20.5,0.0a20.5,20.5,0,1,1,41.0,0.0a20.5,20.5,0,1,1,-41.0,0.0"
        android:pathData="M32.0,12.5l0.0,28.0l12.0,-5.0l0.0,-28.0z"/>
        android:fillAlpha="0.066"
        android:fillColor="#000000"/>
    <path
    <path
        android:fillColor="#FF7E5BBF"
        android:pathData="M24.0,24.0m-20.0,0.0a20.0,20.0,0,1,1,40.0,0.0a20.0,20.0,0,1,1,-40.0,0.0"
        android:pathData="M4.0,40.5l12.0,-5.0l0.0,-11.0l-12.0,-12.0z"/>
        android:fillColor="#283593"/>
    <path
    <path
        android:fillColor="#40000000"
        android:pathData="M44,24.2010101 L33.9004889,14.101499 L14.101499,33.9004889 L24.2010101,44 C29.2525804,43.9497929 34.2887564,41.9975027 38.1431296,38.1431296 C41.9975027,34.2887564 43.9497929,29.2525804 44,24.2010101 Z"
        android:pathData="M44.0,35.5l-12.0,-12.0l0.0,-4.0z"/>
        android:fillColor="#1a237e"/>
    <path
    <path
        android:fillColor="#40000000"
        android:pathData="M24.0,24.0m-14.0,0.0a14.0,14.0,0,1,1,28.0,0.0a14.0,14.0,0,1,1,-28.0,0.0"
        android:pathData="M4.0,12.5l12.0,12.0l0.0,4.0z"/>
        android:fillColor="#5c6bc0"/>
    <path
    <path
        android:fillColor="#FF55C4F5"
        android:pathData="M37.7829445,26.469236 L29.6578482,18.3441397 L18.3441397,29.6578482 L26.469236,37.7829445 C29.1911841,37.2979273 31.7972024,36.0037754 33.9004889,33.9004889 C36.0037754,31.7972024 37.2979273,29.1911841 37.7829445,26.469236 Z"
        android:pathData="M32.0,23.5l-16.0,-16.0l-12.0,5.0l0.0,0.0l12.0,12.0l16.0,16.0l12.0,-5.0l0.0,0.0z"/>
        android:fillColor="#3f51b5"/>
    <path
        android:pathData="M24.0,24.0m-8.0,0.0a8.0,8.0,0,1,1,16.0,0.0a8.0,8.0,0,1,1,-16.0,0.0"
        android:fillColor="#FFFFFF"/>
</vector>
</vector>
+8 −0
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <gradient android:angle="-90"
        android:startColor="#FF205090"
        android:endColor="#FF001040"
        android:type="linear"
        />
</shape>
 No newline at end of file
+77 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the
 * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

package com.android.egg.octo;

import android.app.Activity;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;

import com.android.egg.R;

public class Ocquarium extends Activity {
    ImageView mImageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        final float dp = getResources().getDisplayMetrics().density;

        getWindow().setBackgroundDrawableResource(R.drawable.octo_bg);

        FrameLayout bg = new FrameLayout(this);
        setContentView(bg);
        bg.setAlpha(0f);
        bg.animate().setStartDelay(500).setDuration(5000).alpha(1f).start();

        mImageView = new ImageView(this);
        bg.addView(mImageView, new FrameLayout.LayoutParams(
                ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));

        final OctopusDrawable octo = new OctopusDrawable(getApplicationContext());
        octo.setSizePx((int) (OctopusDrawable.randfrange(40f,180f) * dp));
        mImageView.setImageDrawable(octo);
        octo.startDrift();

        mImageView.setOnTouchListener(new View.OnTouchListener() {
            boolean touching;
            @Override
            public boolean onTouch(View view, MotionEvent motionEvent) {
                switch (motionEvent.getActionMasked()) {
                    case MotionEvent.ACTION_DOWN:
                        if (octo.hitTest(motionEvent.getX(), motionEvent.getY())) {
                            touching = true;
                            octo.stopDrift();
                        }
                        break;
                    case MotionEvent.ACTION_MOVE:
                        if (touching) {
                            octo.moveTo(motionEvent.getX(), motionEvent.getY());
                        }
                        break;
                    case MotionEvent.ACTION_UP:
                    case MotionEvent.ACTION_CANCEL:
                        touching = false;
                        octo.startDrift();
                        break;
                }
                return true;
            }
        });
    }
}
Loading