Skip to content

Commit 9c7f206

Browse files
committed
activity_default_ide.xml
1 parent 46c814f commit 9c7f206

File tree

6 files changed

+211
-11
lines changed

6 files changed

+211
-11
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/java/com/duy/ccppcompiler/ide/editor/CppIdeActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected CodeFormatProvider getCodeFormatProvider() {
110110
}
111111

112112
@Override
113-
public void onEditorViewCreated(IEditorDelegate editorDelegate) {
113+
public void onEditorViewCreated(@NonNull IEditorDelegate editorDelegate) {
114114
super.onEditorViewCreated(editorDelegate);
115115

116116
Preferences setting = Preferences.getInstance(this);

lib-n-ide/src/main/java/com/duy/ide/core/IdeActivity.java

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,15 @@ public void onClick(View v, String text) {
190190
mKeyBoardListener = new KeyBoardEventListener(this);
191191
mDrawerLayout.getViewTreeObserver().addOnGlobalLayoutListener(mKeyBoardListener);
192192

193-
// initLeftNavigationView(findViewById(R.id.left_nav_view));
193+
initLeftNavigationView((NavigationView) findViewById(R.id.left_navigation_view));
194194

195195
//final, create editor
196196
mTabManager = new TabManager(this, (ViewPager) findViewById(R.id.editor_view_pager));
197197

198198
processIntent();
199199
}
200200

201+
201202
private void initToolbar() {
202203
mToolbar = findViewById(R.id.toolbar);
203204
setSupportActionBar(mToolbar);
@@ -234,6 +235,13 @@ public void onPanelSlide(View panel, float slideOffset) {
234235
populateDiagnostic(mDiagnosticPresenter);
235236
}
236237

238+
/**
239+
* Replace view for left navigation view, such as Java NIDE use this for Folder view
240+
*/
241+
protected void initLeftNavigationView(@NonNull NavigationView nav) {
242+
243+
}
244+
237245
/**
238246
* Called when create diagnostic view
239247
*/
@@ -250,7 +258,7 @@ public void onPanelSlide(View panel, float slideOffset) {
250258
*/
251259
@Override
252260
@CallSuper
253-
public void onEditorViewCreated(IEditorDelegate editorDelegate) {
261+
public void onEditorViewCreated(@NonNull IEditorDelegate editorDelegate) {
254262
editorDelegate.setCodeFormatProvider(getCodeFormatProvider());
255263
}
256264

@@ -292,7 +300,7 @@ private void setScreenOrientation() {
292300
}
293301

294302
private void initMenuView() {
295-
NavigationView rightMenu = findViewById(R.id.menuNavView);
303+
NavigationView rightMenu = findViewById(R.id.right_navigation_view);
296304
Menu menu = rightMenu.getMenu();
297305
onCreateNavigationMenu(menu);
298306
rightMenu.setNavigationItemSelectedListener(

lib-n-ide/src/main/res/layout/activity_cpp_editor.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,14 @@
127127
</android.support.design.widget.CoordinatorLayout>
128128

129129
<android.support.design.widget.NavigationView
130-
android:id="@+id/tabNavView"
130+
android:id="@id/left_navigation_view"
131131
android:layout_width="wrap_content"
132132
android:layout_height="match_parent"
133133
android:layout_gravity="start"
134134
android:fitsSystemWindows="false">
135135

136136
<LinearLayout
137+
android:id="@id/left_navigation_content"
137138
android:layout_width="match_parent"
138139
android:layout_height="match_parent"
139140
android:orientation="vertical">
@@ -170,16 +171,13 @@
170171

171172
</RelativeLayout>
172173

173-
<android.support.v7.widget.RecyclerView
174-
android:id="@+id/tabRecyclerView"
175-
android:layout_width="match_parent"
176-
android:layout_height="match_parent" />
174+
177175
</LinearLayout>
178176

179177
</android.support.design.widget.NavigationView>
180178

181179
<android.support.design.widget.NavigationView
182-
android:id="@+id/menuNavView"
180+
android:id="@+id/right_navigation_view"
183181
android:layout_width="wrap_content"
184182
android:layout_height="match_parent"
185183
android:layout_gravity="end"
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:app="http://schemas.android.com/apk/res-auto"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:id="@+id/drawer_layout"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
android:fitsSystemWindows="true">
8+
9+
<android.support.design.widget.CoordinatorLayout
10+
android:layout_width="match_parent"
11+
android:layout_height="match_parent"
12+
android:orientation="vertical">
13+
14+
<android.support.design.widget.AppBarLayout
15+
android:layout_width="match_parent"
16+
android:layout_height="wrap_content"
17+
android:animateLayoutChanges="false">
18+
19+
<android.support.v7.widget.Toolbar
20+
android:id="@id/toolbar"
21+
android:layout_width="match_parent"
22+
android:layout_height="40dp"
23+
android:theme="?actionBarTheme"
24+
app:popupTheme="?actionBarPopupTheme" />
25+
26+
<View
27+
android:layout_width="match_parent"
28+
android:layout_height="1px"
29+
android:background="?android:listDivider" />
30+
31+
<android.support.v7.widget.AppCompatTextView
32+
android:id="@+id/txt_document_info"
33+
android:layout_width="match_parent"
34+
android:layout_height="wrap_content"
35+
android:paddingBottom="2dp"
36+
android:paddingLeft="16dp"
37+
android:paddingRight="16dp"
38+
android:textColor="?toolbarTextColor"
39+
android:textSize="10sp"
40+
tools:ignore="SmallSp"
41+
tools:text="Main.java | UTF-8 Java" />
42+
43+
<com.ogaclejapan.smarttablayout.SmartTabLayout
44+
android:id="@+id/tab_layout"
45+
android:layout_width="match_parent"
46+
android:layout_height="36dp"
47+
app:stl_clickable="true"
48+
app:stl_distributeEvenly="false"
49+
app:stl_dividerThickness="1dp"
50+
app:stl_drawDecorationAfterTab="false"
51+
app:stl_indicatorAlwaysInCenter="false"
52+
app:stl_indicatorColor="?colorAccent"
53+
app:stl_indicatorCornerRadius="2dp"
54+
app:stl_indicatorGravity="bottom"
55+
app:stl_indicatorInFront="true"
56+
app:stl_indicatorInterpolation="smart"
57+
app:stl_indicatorThickness="4dp"
58+
app:stl_indicatorWidth="auto"
59+
app:stl_indicatorWithoutPadding="false"
60+
app:stl_overlineThickness="0dp" />
61+
62+
63+
</android.support.design.widget.AppBarLayout>
64+
65+
<com.sothree.slidinguppanel.SlidingUpPanelLayout
66+
android:id="@+id/diagnostic_panel"
67+
android:layout_width="match_parent"
68+
android:layout_height="match_parent"
69+
android:gravity="bottom"
70+
android:orientation="vertical"
71+
app:layout_behavior="@string/appbar_scrolling_view_behavior"
72+
app:umanoDragView="@+id/drag_view"
73+
app:umanoFadeColor="@android:color/transparent"
74+
app:umanoInitialState="collapsed"
75+
app:umanoPanelHeight="@dimen/symbol_bar_height">
76+
77+
<android.support.v4.view.ViewPager
78+
android:id="@+id/editor_view_pager"
79+
android:layout_width="match_parent"
80+
android:layout_height="match_parent" />
81+
82+
<LinearLayout
83+
android:layout_width="match_parent"
84+
android:layout_height="wrap_content"
85+
android:orientation="vertical">
86+
87+
<LinearLayout
88+
android:id="@+id/drag_view"
89+
android:layout_width="match_parent"
90+
android:layout_height="@dimen/symbol_bar_height"
91+
android:fillViewport="true"
92+
android:orientation="horizontal">
93+
94+
<com.duy.common.view.TintImageView
95+
android:id="@+id/btn_toggle_panel"
96+
android:layout_width="@dimen/symbol_bar_height"
97+
android:layout_height="@dimen/symbol_bar_height"
98+
android:scaleType="centerInside"
99+
android:textColor="?android:textColorPrimary"
100+
app:srcCompat="@drawable/ic_keyboard_arrow_up_white_24dp" />
101+
102+
<HorizontalScrollView
103+
android:layout_width="match_parent"
104+
android:layout_height="match_parent">
105+
106+
<com.jecelyin.editor.v2.widget.SymbolBarLayout
107+
android:id="@+id/symbolBarLayout"
108+
android:layout_width="wrap_content"
109+
android:layout_height="match_parent"
110+
android:background="?android:attr/windowBackground"
111+
android:visibility="visible" />
112+
</HorizontalScrollView>
113+
114+
</LinearLayout>
115+
116+
<FrameLayout
117+
android:id="@+id/container_diagnostic_list_view"
118+
android:layout_width="match_parent"
119+
android:layout_height="200dp">
120+
121+
</FrameLayout>
122+
</LinearLayout>
123+
124+
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
125+
126+
</android.support.design.widget.CoordinatorLayout>
127+
128+
<android.support.design.widget.NavigationView
129+
android:id="@id/left_navigation_view"
130+
android:layout_width="wrap_content"
131+
android:layout_height="match_parent"
132+
android:layout_gravity="start"
133+
android:fitsSystemWindows="false">
134+
135+
<LinearLayout
136+
android:id="@id/left_navigation_content"
137+
android:layout_width="match_parent"
138+
android:layout_height="match_parent"
139+
android:orientation="vertical">
140+
141+
<RelativeLayout
142+
android:layout_width="match_parent"
143+
android:layout_height="?actionBarSize"
144+
android:background="?attr/colorPrimary"
145+
android:orientation="horizontal">
146+
147+
<android.support.v7.widget.AppCompatTextView
148+
android:id="@+id/appNameTextView"
149+
android:layout_width="wrap_content"
150+
android:layout_height="wrap_content"
151+
android:layout_alignParentBottom="true"
152+
android:layout_marginBottom="15dp"
153+
android:layout_marginLeft="15dp"
154+
android:layout_marginStart="15dp"
155+
android:textColor="#fff"
156+
android:textSize="18sp" />
157+
158+
<android.support.v7.widget.AppCompatTextView
159+
android:id="@+id/versionTextView"
160+
android:layout_width="wrap_content"
161+
android:layout_height="wrap_content"
162+
android:layout_alignParentBottom="true"
163+
android:layout_marginBottom="15dp"
164+
android:layout_marginLeft="10dp"
165+
android:layout_marginStart="10dp"
166+
android:layout_toEndOf="@id/appNameTextView"
167+
android:layout_toRightOf="@id/appNameTextView"
168+
android:textColor="?android:textColorPrimary"
169+
tools:text="16.1.1" />
170+
171+
</RelativeLayout>
172+
173+
<android.support.v7.widget.RecyclerView
174+
android:id="@+id/tabRecyclerView"
175+
android:layout_width="match_parent"
176+
android:layout_height="match_parent" />
177+
</LinearLayout>
178+
179+
</android.support.design.widget.NavigationView>
180+
181+
<android.support.design.widget.NavigationView
182+
android:id="@id/right_navigation_view"
183+
android:layout_width="wrap_content"
184+
android:layout_height="match_parent"
185+
android:layout_gravity="end"
186+
android:fitsSystemWindows="false">
187+
188+
</android.support.design.widget.NavigationView>
189+
190+
191+
</android.support.v4.widget.DrawerLayout>

lib-n-ide/src/main/res/values/ids.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,7 @@
4848
<item name="txt_document_info" type="id" />
4949
<item name="editor_view" type="id" />
5050
<item name="view_pager" type="id" />
51+
<item name="left_navigation_view" type="id" />
52+
<item name="left_navigation_content" type="id" />
53+
<item name="toolbar" type="id" />
5154
</resources>

0 commit comments

Comments
 (0)