forked from GitHub/gf-core
add the relevant code from Parlira to the GFTranslator
This commit is contained in:
7
src/ui/android/res/drawable/grid_phrasebook_button.xml
Normal file
7
src/ui/android/res/drawable/grid_phrasebook_button.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<stroke android:width="1dp"
|
||||
android:color="@color/primary_color" />
|
||||
<padding android:left="5dp" android:top="5dp" android:right="5dp" android:bottom="5dp" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
BIN
src/ui/android/res/drawable/ic_volume_up_black_18dp.png
Normal file
BIN
src/ui/android/res/drawable/ic_volume_up_black_18dp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 282 B |
16
src/ui/android/res/layout/activity_navigation.xml
Normal file
16
src/ui/android/res/layout/activity_navigation.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<!-- A DrawerLayout is intended to be used as the top-level content view using match_parent for both width and height to consume the full space available. -->
|
||||
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/drawer_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".gui.activities.NavigationActivity">
|
||||
|
||||
<!-- As the main content view, the view below consumes the entire
|
||||
space available using match_parent in both dimensions. -->
|
||||
<FrameLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</android.support.v4.widget.DrawerLayout>
|
||||
13
src/ui/android/res/layout/advanced_options_button.xml
Normal file
13
src/ui/android/res/layout/advanced_options_button.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Activate Advanced Options"
|
||||
android:id="@+id/checkBox" />
|
||||
|
||||
</LinearLayout>
|
||||
47
src/ui/android/res/layout/fragment_translator.xml
Normal file
47
src/ui/android/res/layout/fragment_translator.xml
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/containerfor_translation"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:layout_marginTop="0dp">
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/containerfor_options"
|
||||
android:layout_marginLeft="0dp"
|
||||
android:layout_marginTop="0dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/dots"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_gravity="center|bottom">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/firstDot"
|
||||
android:src="@drawable/ic_dictionary" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/secondDot"
|
||||
android:src="@drawable/ic_dictionary" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
13
src/ui/android/res/layout/phrase_list_item.xml
Normal file
13
src/ui/android/res/layout/phrase_list_item.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18dp"
|
||||
android:textColor="@color/text_colour_light"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:text="New Text"
|
||||
android:id="@+id/textView3"
|
||||
android:padding="8dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android" />
|
||||
|
||||
16
src/ui/android/res/layout/small_fragment_input_holder.xml
Normal file
16
src/ui/android/res/layout/small_fragment_input_holder.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/input_holder"
|
||||
android:padding="8dp"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="New Text"
|
||||
android:textSize="25dp"
|
||||
android:id="@+id/holderOptionText" />
|
||||
|
||||
</LinearLayout>
|
||||
28
src/ui/android/res/layout/small_fragment_number.xml
Normal file
28
src/ui/android/res/layout/small_fragment_number.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical" android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="New Text"
|
||||
android:textSize="15sp"
|
||||
android:id="@+id/textView_number" />
|
||||
|
||||
<SeekBar
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:max="100"
|
||||
android:id="@+id/seekBar" />
|
||||
|
||||
<EditText
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:inputType="numberPassword"
|
||||
android:ems="10"
|
||||
android:id="@+id/editNumber" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
59
src/ui/android/res/layout/small_fragment_options.xml
Normal file
59
src/ui/android/res/layout/small_fragment_options.xml
Normal file
@@ -0,0 +1,59 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
tools:context=".gui.smallFragments.OptionsFragment"
|
||||
>
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/scrollView" >
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/child_fragment1">
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/child_fragment2">
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/child_fragment3">
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/child_fragment4">
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/child_fragment5">
|
||||
</FrameLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/child_fragment6">
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
20
src/ui/android/res/layout/small_fragment_spinner.xml
Normal file
20
src/ui/android/res/layout/small_fragment_spinner.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/spinner_input">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="New Text"
|
||||
android:textSize="15sp"
|
||||
android:id="@+id/text_view_spinner" />
|
||||
|
||||
<Spinner
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/choice_spinner" />
|
||||
|
||||
</LinearLayout>
|
||||
15
src/ui/android/res/layout/small_fragment_swipe.xml
Normal file
15
src/ui/android/res/layout/small_fragment_swipe.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<FrameLayout 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"
|
||||
tools:context=".gui.smallFragments.SwipeFragment"
|
||||
android:id="@+id/fragment_swipe">
|
||||
|
||||
|
||||
<android.support.v4.view.ViewPager
|
||||
android:id="@+id/vpPager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
</android.support.v4.view.ViewPager>
|
||||
|
||||
</FrameLayout>
|
||||
45
src/ui/android/res/layout/small_fragment_translation.xml
Normal file
45
src/ui/android/res/layout/small_fragment_translation.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/grid_phrasebook_button"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:id="@+id/fragment_translation">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="New Text"
|
||||
android:textSize="24dp"
|
||||
android:id="@+id/origin_phrase"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:maxLines="4"
|
||||
android:scrollHorizontally="false"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="New Text"
|
||||
android:textSize="24dp"
|
||||
android:id="@+id/target_phrase"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:maxLines="4"
|
||||
android:scrollHorizontally="false"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/button3"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_gravity="right"
|
||||
android:src="@drawable/ic_volume_up_black_18dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -1,6 +1,8 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:id="@+id/input_mode"
|
||||
android:title="@string/keyboard_input"/>
|
||||
<item android:id="@+id/phrasebook"
|
||||
android:title="@string/phrasebook"/>
|
||||
<item android:id="@+id/topics"
|
||||
android:title="@string/topics"/>
|
||||
<item android:id="@+id/help"
|
||||
|
||||
@@ -4,4 +4,6 @@
|
||||
<color name="candidate_recommended">#FFE35900</color>
|
||||
<color name="candidate_other">#ff808080</color>
|
||||
<color name="candidate_background">#ffffffff</color>
|
||||
</resources>
|
||||
<item name="primary_color" type="color">#009688</item>
|
||||
<item name="text_colour_light" type="color">#616161</item>
|
||||
</resources>
|
||||
|
||||
@@ -33,4 +33,6 @@
|
||||
<string name="topics">Topics</string>
|
||||
<string name="topics_open">Open topics</string>
|
||||
<string name="topics_close">Close topics</string>
|
||||
|
||||
<string name="phrasebook">Phrasebook</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user