Skip to content

Commit

Permalink
Merge pull request #3 from mgeier63/master
Browse files Browse the repository at this point in the history
Misc. small improvements
  • Loading branch information
oversecio authored Dec 15, 2018
2 parents 7ab0944 + 4e95075 commit b3c02e5
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 60 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
app/src/oversec
app/src/whatsapp
app/src/intern
app/src/clean

# Built application files
*.apk
Expand Down Expand Up @@ -38,6 +39,7 @@ captures/

# IntelliJ
*.iml
.idea
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
Expand Down
1 change: 0 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ tasks.whenTaskAdded { task ->
import groovy.io.FileType
def currentDir = new File('app/src')
currentDir.eachFile FileType.DIRECTORIES, {
println ">>>>>>>>>>>>>>>>>>>"+ it.name
try { apply from: "src/"+it.name+"/mixin.gradle" } catch (ex) {}
}

Expand Down
16 changes: 3 additions & 13 deletions app/src/main/java/io/oversec/one/iab/IabUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -198,20 +198,10 @@ public synchronized void checkFullVersion(FullVersionListener callback) {
}

public synchronized void checkFullVersion(final boolean loadSkuDetails, final FullVersionListener callback) {
if (BuildConfig.DEBUG) {
if (callback != null) {
invokeCallback(callback, true);

} else {
fireChange(true);
}
return;
}

if (!isIabAvailable()) {
if (!isIabAvailable() || BuildConfig.DEBUG) {
Ln.d("IAB, queryInventory impossible no IAB support!");
if (callback != null) {
invokeCallback(callback, false);
invokeCallback(callback, true);

} else {
fireChange(false);
Expand Down Expand Up @@ -350,7 +340,7 @@ private long getAge(Context ctx) {


public boolean isShowUpgradeButton(Context ctx) {
if (BuildConfig.DEBUG) {
if (!isIabAvailable()||BuildConfig.DEBUG) {
return false;
}

Expand Down
4 changes: 3 additions & 1 deletion app/src/main/java/io/oversec/one/ui/ComposeActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import android.graphics.PorterDuff;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
Expand Down Expand Up @@ -56,7 +57,8 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_compose);


//GOOGLE WTF IS WRONG WITH YOU
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
Spannable text = new SpannableString(getSupportActionBar().getTitle());
text.setSpan(new ForegroundColorSpan(Color.WHITE), 0, text.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);
Expand Down
105 changes: 63 additions & 42 deletions app/src/main/res/layout/activity_compose.xml
Original file line number Diff line number Diff line change
@@ -1,62 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:gotit="http://schemas.android.com/apk/res-auto"
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:gotit="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.ComposeActivity">

<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true">
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppTheme.PopupOverlay">

</android.support.v7.widget.Toolbar>


</android.support.design.widget.AppBarLayout>

<LinearLayout
android:orientation="vertical"
<android.support.v4.widget.NestedScrollView
android:id="@+id/nest"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
android:layout_height="wrap_content">


<EditText
<EditText
android:id="@+id/edittext"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:minHeight="128dp"
android:layout_weight="1"
android:gravity="top"
android:inputType="textMultiLine"
android:hint="@string/compose_text_hint"
/>

<LinearLayout android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="wrap_content">
<View android:layout_width="wrap_content" android:layout_height="0dp" android:layout_weight="1"/>

<io.oversec.one.crypto.ui.util.StandaloneTooltipView
android:inputType="textMultiLine"
android:minHeight="128dp" />

android:layout_width="260dp"
android:layout_height="wrap_content"
<ImageButton
android:id="@+id/fab"
android:layout_width="@dimen/fab_size_normal"
android:layout_height="@dimen/fab_size_normal"

gotit:gotit_id="@string/tooltipid_compose_encrypt_button"
gotit:help_alias="compose_encrypt_button"
gotit:msg="@string/tooltip_compose_fab"
gotit:arrowPos="20"
gotit:arrowSide="right"
/>
<ImageButton
android:id="@+id/fab"
android:layout_width="@dimen/fab_size_normal"
android:layout_height="@dimen/fab_size_normal"
android:layout_below="@id/edittext"
android:layout_alignParentRight="true"

android:layout_gravity="right"
android:layout_marginLeft="@dimen/fab_margin"
android:layout_marginRight="@dimen/fab_margin"
android:layout_marginBottom="@dimen/fab_margin"
android:background="@drawable/fab_bg"
android:src="@drawable/ic_lock_black_24dp"
tools:ignore="ContentDescription" />

android:layout_marginBottom="@dimen/fab_margin"
android:layout_marginLeft="@dimen/fab_margin"
android:layout_marginRight="@dimen/fab_margin"
android:background="@drawable/fab_bg"
android:src="@drawable/ic_lock_black_24dp" tools:ignore="ContentDescription"/>
<io.oversec.one.crypto.ui.util.StandaloneTooltipView

android:layout_width="260dp"
android:layout_height="wrap_content"
android:layout_alignTop="@id/fab"
android:layout_toLeftOf="@id/fab"
gotit:arrowPos="20"
gotit:arrowSide="right"
gotit:gotit_id="@string/tooltipid_compose_encrypt_button"
gotit:help_alias="compose_encrypt_button"
gotit:msg="@string/tooltip_compose_fab" />
</RelativeLayout>

</LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>


</ScrollView>
</android.support.design.widget.CoordinatorLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_onboarding.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ android:background="@drawable/tooltip_bg"
android:id="@+id/headline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Welcome to WhatsSecret"
android:text="@string/onboarding_title"
android:padding="6dp"
android:drawableLeft="@mipmap/ic_launcher"
android:layout_gravity="center_horizontal"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/raw/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**[Privacy Policy](https://www.oversec.io/policy.html)**

[Oversec Open-Source Crypto-Module](https://github.com/oversecio/oversec-crypto)
[Oversec Open-Source Repository](https://github.com/oversecio/oversec)

## Libraries
* [Android Support Libraries](http://developer.android.com/tools/support-library/index.html) (Apache License v2)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/raw/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 1.5.0
### 1.5.2
- major rework, open-sourced

### 1.3.15
Expand Down

0 comments on commit b3c02e5

Please sign in to comment.