Browse Source

remove test activity for editor view

pull/45/head
Thodoris1999 6 years ago
parent
commit
d3de1b6816
  1. 2
      app/src/main/AndroidManifest.xml
  2. 53
      app/src/main/java/gr/thmmy/mthmmy/activities/TestEditView.java
  3. 2
      app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java
  4. 24
      app/src/main/res/layout/activity_test_edit_view.xml

2
app/src/main/AndroidManifest.xml

@ -144,8 +144,6 @@
<action android:name="com.google.firebase.MESSAGING_EVENT" /> <action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter> </intent-filter>
</service> </service>
<activity android:name=".activities.TestEditView"></activity>
</application> </application>
</manifest> </manifest>

53
app/src/main/java/gr/thmmy/mthmmy/activities/TestEditView.java

@ -1,53 +0,0 @@
package gr.thmmy.mthmmy.activities;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.inputmethod.InputConnection;
import gr.thmmy.mthmmy.R;
import gr.thmmy.mthmmy.utils.EditorView;
import gr.thmmy.mthmmy.utils.EmojiKeyboard;
public class TestEditView extends AppCompatActivity implements EmojiKeyboard.EmojiKeyboardOwner {
EmojiKeyboard emojiKeyboard;
EditorView editorView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test_edit_view);
editorView = findViewById(R.id.editor_view);
emojiKeyboard = findViewById(R.id.emoji_keyboard);
InputConnection ic = editorView.getInputConnection();
setEmojiKeyboardInputConnection(ic);
editorView.setEmojiKeyboardOwner(this);
}
@Override
public void setEmojiKeyboardVisible(boolean visible) {
emojiKeyboard.setVisibility(visible ? View.VISIBLE : View.GONE);
}
@Override
public boolean isEmojiKeyboardVisible() {
return emojiKeyboard.getVisibility() == View.VISIBLE;
}
@Override
public void setEmojiKeyboardInputConnection(InputConnection ic) {
emojiKeyboard.setInputConnection(ic);
}
@Override
public void onBackPressed() {
if (emojiKeyboard.getVisibility() == View.VISIBLE) {
emojiKeyboard.setVisibility(View.GONE);
editorView.updateEmojiKeyboardVisibility();
} else {
super.onBackPressed();
}
}
}

2
app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java

@ -17,7 +17,6 @@ import java.util.List;
import gr.thmmy.mthmmy.R; import gr.thmmy.mthmmy.R;
import gr.thmmy.mthmmy.activities.LoginActivity; import gr.thmmy.mthmmy.activities.LoginActivity;
import gr.thmmy.mthmmy.activities.TestEditView;
import gr.thmmy.mthmmy.activities.board.BoardActivity; import gr.thmmy.mthmmy.activities.board.BoardActivity;
import gr.thmmy.mthmmy.activities.downloads.DownloadsActivity; import gr.thmmy.mthmmy.activities.downloads.DownloadsActivity;
import gr.thmmy.mthmmy.activities.main.forum.ForumFragment; import gr.thmmy.mthmmy.activities.main.forum.ForumFragment;
@ -120,7 +119,6 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF
Toast.makeText(getBaseContext(), "Press back again to exit!" Toast.makeText(getBaseContext(), "Press back again to exit!"
, Toast.LENGTH_SHORT).show(); , Toast.LENGTH_SHORT).show();
} }
startActivity(new Intent(this, TestEditView.class));
mBackPressed = System.currentTimeMillis(); mBackPressed = System.currentTimeMillis();
} }

24
app/src/main/res/layout/activity_test_edit_view.xml

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".activities.TestEditView">
<gr.thmmy.mthmmy.utils.EditorView
android:id="@+id/editor_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
app:hint="Post message"/>
<gr.thmmy.mthmmy.utils.EmojiKeyboard
android:id="@+id/emoji_keyboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentBottom="true"
android:visibility="gone"/>
</RelativeLayout>
Loading…
Cancel
Save