mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-07-01 05:14:17 +00:00
add project adins
This commit is contained in:
parent
ad06ac5505
commit
f8f85d679d
5299 changed files with 625430 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
|||
<?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:layout_gravity="center_vertical">
|
||||
<TextView
|
||||
android:layout_width="260dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="5dp"
|
||||
android:layout_gravity="center_vertical|left"
|
||||
android:paddingLeft="15dp"
|
||||
android:background="@drawable/search_background"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
android:drawableLeft="@drawable/ic_search_white"
|
||||
android:drawablePadding="10dp"
|
||||
android:text="@string/all_form_all_task"
|
||||
android:textColor="@color/fontColorWhite"
|
||||
android:gravity="center_vertical"/>
|
||||
</LinearLayout>
|
Binary file not shown.
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bgColor">
|
||||
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/refreshTimeline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/listTimeline"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
</RelativeLayout>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:interpolator="@android:anim/linear_interpolator"
|
||||
android:fillAfter="true">
|
||||
|
||||
<translate
|
||||
android:fromXDelta="-500%"
|
||||
android:toXDelta="0%"
|
||||
android:duration="200" />
|
||||
</set>
|
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
|
@ -0,0 +1,111 @@
|
|||
package com.adins.mss.odr.news;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.adins.mss.base.GlobalData;
|
||||
import com.adins.mss.base.util.LocaleHelper;
|
||||
import com.adins.mss.dao.MobileContentH;
|
||||
import com.adins.mss.foundation.dialog.NiftyDialogBuilder;
|
||||
import com.adins.mss.odr.R;
|
||||
|
||||
import org.acra.ACRA;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class NewsChildActivity extends Activity implements OnItemClickListener{
|
||||
|
||||
private NewsListAdapter adapter;
|
||||
List<MobileContentH> objects;
|
||||
ListView listView;
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.default_listview);
|
||||
ACRA.getErrorReporter().putCustomData("LAST_CLASS_ACCESSED", getClass().getSimpleName());
|
||||
Bundle bundle = getIntent().getExtras();
|
||||
String uuidP =bundle.getString("uuid_parent");
|
||||
|
||||
listView = (ListView)findViewById(android.R.id.list);
|
||||
News news= new News(this);
|
||||
objects = news.getlistNewsChild(uuidP);
|
||||
|
||||
adapter = new NewsListAdapter(this, objects);
|
||||
LayoutInflater layoutInflater = (LayoutInflater)this.getSystemService(Context.LAYOUT_INFLATER_SERVICE );
|
||||
// View notFoundView = layoutInflater.inflate(R.layout.news_without_content_layout, null, false);
|
||||
|
||||
if(objects!=null&&objects.size()>0){
|
||||
listView.setOnItemClickListener(this);
|
||||
}else{
|
||||
List<MobileContentH> tempObjects = news.getlistNewsChildWithoutDate(uuidP);
|
||||
if(tempObjects!=null&&tempObjects.size()>0){
|
||||
NiftyDialogBuilder dialogBuilder;
|
||||
dialogBuilder = NiftyDialogBuilder.getInstance(this);
|
||||
dialogBuilder.withTitle("INFO").withIcon(android.R.drawable.ic_dialog_info).withMessage("Data has Expired").show();
|
||||
}else{
|
||||
NewsContentTask task = new NewsContentTask(this, getString(R.string.progressWait),
|
||||
getString(R.string.msgNoDetail), uuidP, true);
|
||||
task.execute();
|
||||
}
|
||||
}
|
||||
listView.setAdapter(adapter);
|
||||
}
|
||||
@Override
|
||||
protected void attachBaseContext(Context newBase) {
|
||||
Context context = newBase;
|
||||
Locale locale;
|
||||
try {
|
||||
locale = new Locale(GlobalData.getSharedGlobalData().getLocale());
|
||||
if (null == locale) {
|
||||
locale = new Locale(LocaleHelper.ENGLSIH);
|
||||
}
|
||||
context = LocaleHelper.wrap(newBase, locale);
|
||||
} catch (Exception e) {
|
||||
locale = new Locale(LocaleHelper.ENGLSIH);
|
||||
context = LocaleHelper.wrap(newBase, locale);
|
||||
} finally {
|
||||
super.attachBaseContext(context);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
// NewsContentTask task = new NewsContentTask(this, getString(R.string.progressWait), getString(R.string.msgNoDetail),
|
||||
// objects.get(position).getUuid_mobile_content_h());
|
||||
// task.execute();
|
||||
List<MobileContentH> objects2;
|
||||
News news= new News(this);
|
||||
objects2 = news.getlistNewsChild(objects.get(position).getUuid_mobile_content_h());
|
||||
if(objects2!=null&&objects2.size()>0){
|
||||
Intent intent = new Intent(this,NewsChildActivity.class);
|
||||
intent.putExtra("uuid_parent", objects.get(position).getUuid_mobile_content_h());
|
||||
listView.setEnabled(false);
|
||||
startActivity(intent);
|
||||
}else{
|
||||
List<MobileContentH> tempObjects = news.getlistNewsChildWithoutDate(objects.get(position).getUuid_mobile_content_h());
|
||||
if(tempObjects!=null&&tempObjects.size()>0){
|
||||
Intent intent = new Intent(this,NewsChildActivity.class);
|
||||
intent.putExtra("uuid_parent", objects.get(position).getUuid_mobile_content_h());
|
||||
listView.setEnabled(false);
|
||||
startActivity(intent);
|
||||
}else{
|
||||
NewsContentTask task = new NewsContentTask(this, getString(R.string.progressWait), getString(R.string.msgNoDetail),
|
||||
objects.get(position).getUuid_mobile_content_h(),false);
|
||||
task.execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
listView.setEnabled(true);
|
||||
super.onResume();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,122 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/print"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/tl_device"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentTop="true">
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tr_device_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/label_device_name"
|
||||
android:textColor="#0b5d66" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=":"
|
||||
android:textColor="#0b5d66" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_device_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:paddingLeft="25dp"
|
||||
android:text="-"
|
||||
android:textColor="#0b5d66"
|
||||
android:textStyle="bold" />
|
||||
</TableRow>
|
||||
|
||||
<TableRow
|
||||
android:id="@+id/tr_device_status"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lblStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="0.5"
|
||||
android:text="@string/lblStatusPrint"
|
||||
android:textColor="#0b5d66" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=":"
|
||||
android:textColor="#0b5d66" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/lblPrinterStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:paddingLeft="25dp"
|
||||
android:text="@string/not_connected"
|
||||
android:textColor="#0b5d66"
|
||||
android:textStyle="bold" />
|
||||
</TableRow>
|
||||
</TableLayout>
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnConnect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/tl_device"
|
||||
android:layout_alignStart="@+id/tl_device"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_below="@+id/tl_device"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:background="@drawable/button_background"
|
||||
android:text="@string/mnConnect"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
<!--<Button
|
||||
android:id="@+id/btnDisconnect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/btnConnect"
|
||||
android:layout_alignRight="@+id/btnConnect"
|
||||
android:layout_below="@+id/btnConnect"
|
||||
android:background="@drawable/button_background"
|
||||
android:text="@string/mnDisconnect"
|
||||
android:textColor="@android:color/white" />-->
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnPrint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/tl_device"
|
||||
android:layout_alignStart="@+id/tl_device"
|
||||
android:layout_alignRight="@+id/btnConnect"
|
||||
android:layout_alignEnd="@+id/btnConnect"
|
||||
android:layout_below="@+id/btnConnect"
|
||||
android:text="@string/mnPrint"
|
||||
android:background="@drawable/button_background"
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
Loading…
Add table
Add a link
Reference in a new issue