mirror of
https://github.com/sismics/docs.git
synced 2025-12-17 11:41:41 +00:00
Android: material design, API 21
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
package com.sismics.docs;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
public class DividerItemDecoration extends RecyclerView.ItemDecoration {
|
||||
|
||||
private Drawable mDivider;
|
||||
|
||||
public DividerItemDecoration(Context context, AttributeSet attrs) {
|
||||
final TypedArray a = context.obtainStyledAttributes(attrs, new int [] { android.R.attr.listDivider });
|
||||
mDivider = a.getDrawable(0);
|
||||
a.recycle();
|
||||
}
|
||||
|
||||
public DividerItemDecoration(Drawable divider) { mDivider = divider; }
|
||||
|
||||
@Override
|
||||
public void getItemOffsets (Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
|
||||
super.getItemOffsets(outRect, view, parent, state);
|
||||
if (mDivider == null) return;
|
||||
if (parent.getChildPosition(view) < 1) return;
|
||||
|
||||
if (getOrientation(parent) == LinearLayoutManager.VERTICAL) outRect.top = mDivider.getIntrinsicHeight();
|
||||
else outRect.left = mDivider.getIntrinsicWidth();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDrawOver(Canvas c, RecyclerView parent) {
|
||||
if (mDivider == null) { super.onDrawOver(c, parent); return; }
|
||||
|
||||
if (getOrientation(parent) == LinearLayoutManager.VERTICAL) {
|
||||
final int left = parent.getPaddingLeft();
|
||||
final int right = parent.getWidth() - parent.getPaddingRight();
|
||||
final int childCount = parent.getChildCount();
|
||||
|
||||
for (int i=1; i < childCount; i++) {
|
||||
final View child = parent.getChildAt(i);
|
||||
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();
|
||||
final int size = mDivider.getIntrinsicHeight();
|
||||
final int top = child.getTop() - params.topMargin;
|
||||
final int bottom = top + size;
|
||||
mDivider.setBounds(left, top, right, bottom);
|
||||
mDivider.draw(c);
|
||||
}
|
||||
} else { //horizontal
|
||||
final int top = parent.getPaddingTop();
|
||||
final int bottom = parent.getHeight() - parent.getPaddingBottom();
|
||||
final int childCount = parent.getChildCount();
|
||||
|
||||
for (int i=1; i < childCount; i++) {
|
||||
final View child = parent.getChildAt(i);
|
||||
final RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) child.getLayoutParams();
|
||||
final int size = mDivider.getIntrinsicWidth();
|
||||
final int left = child.getLeft() - params.leftMargin;
|
||||
final int right = left + size;
|
||||
mDivider.setBounds(left, top, right, bottom);
|
||||
mDivider.draw(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int getOrientation(RecyclerView parent) {
|
||||
if (parent.getLayoutManager() instanceof LinearLayoutManager) {
|
||||
LinearLayoutManager layoutManager = (LinearLayoutManager) parent.getLayoutManager();
|
||||
return layoutManager.getOrientation();
|
||||
} else throw new IllegalStateException("DividerItemDecoration can only be used with a LinearLayoutManager.");
|
||||
}
|
||||
}
|
||||
@@ -6,11 +6,6 @@ import com.androidquery.callback.BitmapAjaxCallback;
|
||||
import com.sismics.docs.model.application.ApplicationContext;
|
||||
import com.sismics.docs.util.PreferenceUtil;
|
||||
|
||||
import org.acra.ACRA;
|
||||
import org.acra.ReportingInteractionMode;
|
||||
import org.acra.annotation.ReportsCrashes;
|
||||
import org.acra.sender.HttpSender.Method;
|
||||
import org.acra.sender.HttpSender.Type;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/**
|
||||
@@ -18,20 +13,9 @@ import org.json.JSONObject;
|
||||
*
|
||||
* @author bgamard
|
||||
*/
|
||||
@ReportsCrashes(formKey = "",
|
||||
httpMethod = Method.PUT,
|
||||
reportType = Type.JSON,
|
||||
formUri = "http://acralyzer.sismics.com/docs-report",
|
||||
formUriBasicAuthLogin = "reporter",
|
||||
formUriBasicAuthPassword = "jOS9ezJR",
|
||||
mode = ReportingInteractionMode.TOAST,
|
||||
forceCloseDialogAfterToast = true,
|
||||
resToastText = R.string.crash_toast_text)
|
||||
public class MainApplication extends Application {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
ACRA.init(this);
|
||||
|
||||
// Fetching /user/info from cache
|
||||
JSONObject json = PreferenceUtil.getCachedJson(getApplicationContext(), PreferenceUtil.PREF_CACHED_USER_INFO_JSON);
|
||||
ApplicationContext.getInstance().setUserInfo(getApplicationContext(), json);
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.sismics.docs.activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.text.Html;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.view.View;
|
||||
@@ -30,7 +30,7 @@ import org.json.JSONObject;
|
||||
*
|
||||
* @author bgamard
|
||||
*/
|
||||
public class LoginActivity extends FragmentActivity {
|
||||
public class LoginActivity extends ActionBarActivity {
|
||||
|
||||
/**
|
||||
* User interface.
|
||||
@@ -93,7 +93,7 @@ public class LoginActivity extends FragmentActivity {
|
||||
try {
|
||||
UserResource.login(getApplicationContext(), txtUsername.getText().toString(), txtPassword.getText().toString(), new JsonHttpResponseHandler() {
|
||||
@Override
|
||||
public void onSuccess(JSONObject json) {
|
||||
public void onSuccess(int statusCode, Header[] headers, JSONObject json) {
|
||||
// Empty previous user caches
|
||||
PreferenceUtil.resetUserCache(getApplicationContext());
|
||||
|
||||
@@ -109,11 +109,11 @@ public class LoginActivity extends FragmentActivity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(final int statusCode, final Header[] headers, final byte[] responseBytes, final Throwable throwable) {
|
||||
public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {
|
||||
loginForm.setVisibility(View.VISIBLE);
|
||||
progressBar.setVisibility(View.GONE);
|
||||
|
||||
if (responseBytes != null && new String(responseBytes).contains("\"ForbiddenError\"")) {
|
||||
if (responseString != null && responseString.contains("\"ForbiddenError\"")) {
|
||||
DialogUtil.showOkDialog(LoginActivity.this, R.string.login_fail_title, R.string.login_fail);
|
||||
} else {
|
||||
DialogUtil.showOkDialog(LoginActivity.this, R.string.network_error_title, R.string.network_error);
|
||||
@@ -153,7 +153,7 @@ public class LoginActivity extends FragmentActivity {
|
||||
// Trying to get user data
|
||||
UserResource.info(getApplicationContext(), new JsonHttpResponseHandler() {
|
||||
@Override
|
||||
public void onSuccess(final JSONObject json) {
|
||||
public void onSuccess(int statusCode, Header[] headers, final JSONObject json) {
|
||||
if (json.optBoolean("anonymous", true)) {
|
||||
loginForm.setVisibility(View.VISIBLE);
|
||||
return;
|
||||
@@ -169,7 +169,7 @@ public class LoginActivity extends FragmentActivity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(final int statusCode, final Header[] headers, final byte[] responseBytes, final Throwable throwable) {
|
||||
public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {
|
||||
DialogUtil.showOkDialog(LoginActivity.this, R.string.network_error_title, R.string.network_error);
|
||||
loginForm.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
@@ -3,13 +3,11 @@ package com.sismics.docs.activity;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.ActionBarDrawerToggle;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.view.GravityCompat;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.support.v7.app.ActionBarDrawerToggle;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ListView;
|
||||
|
||||
@@ -21,7 +19,7 @@ import com.sismics.docs.model.application.ApplicationContext;
|
||||
*
|
||||
* @author bgamard
|
||||
*/
|
||||
public class MainActivity extends FragmentActivity {
|
||||
public class MainActivity extends ActionBarActivity {
|
||||
|
||||
private ListView drawerList;
|
||||
private ActionBarDrawerToggle drawerToggle;
|
||||
@@ -38,7 +36,6 @@ public class MainActivity extends FragmentActivity {
|
||||
}
|
||||
|
||||
// Setup the activity
|
||||
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
|
||||
setContentView(R.layout.main_activity);
|
||||
|
||||
// Cache view references
|
||||
@@ -53,30 +50,16 @@ public class MainActivity extends FragmentActivity {
|
||||
});
|
||||
|
||||
if (drawerLayout != null) {
|
||||
// Set a custom shadow that overlays the main content when the drawer opens
|
||||
drawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START);
|
||||
|
||||
// Enable ActionBar app icon to behave as action to toggle nav drawer
|
||||
getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getActionBar().setHomeButtonEnabled(true);
|
||||
if (getSupportActionBar() != null) {
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
getSupportActionBar().setHomeButtonEnabled(true);
|
||||
}
|
||||
|
||||
// ActionBarDrawerToggle ties together the the proper interactions
|
||||
// between the sliding drawer and the action bar app icon
|
||||
drawerToggle = new ActionBarDrawerToggle(
|
||||
this, /* host Activity */
|
||||
drawerLayout, /* DrawerLayout object */
|
||||
R.drawable.ic_drawer, R.string.drawer_open, R.string.drawer_close) {
|
||||
|
||||
@Override
|
||||
public void onDrawerOpened(View drawerView) {
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDrawerClosed(View drawerView) {
|
||||
invalidateOptionsMenu();
|
||||
}
|
||||
};
|
||||
drawerToggle = new ActionBarDrawerToggle(this, drawerLayout,
|
||||
R.string.drawer_open, R.string.drawer_close);
|
||||
drawerLayout.setDrawerListener(drawerToggle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.sismics.docs.adapter;
|
||||
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.sismics.docs.R;
|
||||
|
||||
/**
|
||||
* Adapter of documents.
|
||||
*
|
||||
* @author bgamard
|
||||
*/
|
||||
public class DocListAdapter extends RecyclerView.Adapter<DocListAdapter.ViewHolder> {
|
||||
private String[] mDataset;
|
||||
|
||||
// Provide a reference to the views for each data item
|
||||
// Complex data items may need more than one view per item, and
|
||||
// you provide access to all the views for a data item in a view holder
|
||||
public static class ViewHolder extends RecyclerView.ViewHolder {
|
||||
// each data item is just a string in this case
|
||||
public TextView titleTextView;
|
||||
public TextView subtitleTextView;
|
||||
public ViewHolder(View v) {
|
||||
super(v);
|
||||
}
|
||||
}
|
||||
|
||||
// Provide a suitable constructor (depends on the kind of dataset)
|
||||
public DocListAdapter(String[] myDataset) {
|
||||
mDataset = myDataset;
|
||||
}
|
||||
|
||||
// Create new views (invoked by the layout manager)
|
||||
@Override
|
||||
public DocListAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
// create a new view
|
||||
View v = LayoutInflater.from(parent.getContext()).
|
||||
inflate(R.layout.doc_list_item, parent, false);
|
||||
|
||||
// set the view's size, margins, paddings and layout parameters
|
||||
return new ViewHolder(v);
|
||||
}
|
||||
|
||||
// Replace the contents of a view (invoked by the layout manager)
|
||||
@Override
|
||||
public void onBindViewHolder(ViewHolder holder, int position) {
|
||||
// - get element from your dataset at this position
|
||||
// - replace the contents of the view with that element
|
||||
// holder.mTextView.setText(mDataset[position]);
|
||||
}
|
||||
|
||||
// Return the size of your dataset (invoked by the layout manager)
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mDataset.length;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.sismics.docs.fragment;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.sismics.docs.DividerItemDecoration;
|
||||
import com.sismics.docs.R;
|
||||
import com.sismics.docs.adapter.DocListAdapter;
|
||||
import com.sismics.docs.listener.RecyclerItemClickListener;
|
||||
|
||||
/**
|
||||
* @author bgamard.
|
||||
*/
|
||||
public class DocListFragment extends Fragment {
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.doc_list_fragment, container, false);
|
||||
|
||||
RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.docList);
|
||||
recyclerView.setHasFixedSize(true);
|
||||
recyclerView.setLongClickable(true);
|
||||
|
||||
LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity());
|
||||
recyclerView.setLayoutManager(layoutManager);
|
||||
|
||||
RecyclerView.Adapter adapter = new DocListAdapter(new String[] { "Doc 1", "Doc 2", "Doc 3"});
|
||||
recyclerView.setAdapter(adapter);
|
||||
|
||||
recyclerView.addItemDecoration(new DividerItemDecoration(getResources().getDrawable(R.drawable.abc_list_divider_mtrl_alpha)));
|
||||
|
||||
recyclerView.addOnItemTouchListener(new RecyclerItemClickListener(getActivity(), new RecyclerItemClickListener.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(View view, int position) {
|
||||
Toast.makeText(getActivity(), position + " clicked", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}));
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.sismics.docs.listener;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.view.GestureDetector;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
|
||||
public class RecyclerItemClickListener implements RecyclerView.OnItemTouchListener {
|
||||
private OnItemClickListener mListener;
|
||||
|
||||
public interface OnItemClickListener {
|
||||
public void onItemClick(View view, int position);
|
||||
}
|
||||
|
||||
GestureDetector mGestureDetector;
|
||||
|
||||
public RecyclerItemClickListener(Context context, OnItemClickListener listener) {
|
||||
mListener = listener;
|
||||
mGestureDetector = new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() {
|
||||
@Override public boolean onSingleTapUp(MotionEvent e) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) {
|
||||
View childView = view.findChildViewUnder(e.getX(), e.getY());
|
||||
if (childView != null && mListener != null && mGestureDetector.onTouchEvent(e)) {
|
||||
mListener.onItemClick(childView, view.getChildPosition(childView));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override public void onTouchEvent(RecyclerView view, MotionEvent motionEvent) { }
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import com.sismics.docs.listener.CallbackListener;
|
||||
import com.sismics.docs.resource.UserResource;
|
||||
import com.sismics.docs.util.PreferenceUtil;
|
||||
|
||||
import org.apache.http.Header;
|
||||
import org.json.JSONObject;
|
||||
|
||||
/**
|
||||
@@ -47,7 +48,7 @@ public class ApplicationContext {
|
||||
/**
|
||||
* Returns true if current user is logged in.
|
||||
*
|
||||
* @return
|
||||
* @return True if the current user is logged in
|
||||
*/
|
||||
public boolean isLoggedIn() {
|
||||
return userInfo != null && !userInfo.optBoolean("anonymous");
|
||||
@@ -56,7 +57,7 @@ public class ApplicationContext {
|
||||
/**
|
||||
* Getter of userInfo
|
||||
*
|
||||
* @return
|
||||
* @return userInfo
|
||||
*/
|
||||
public JSONObject getUserInfo() {
|
||||
return userInfo;
|
||||
@@ -65,7 +66,7 @@ public class ApplicationContext {
|
||||
/**
|
||||
* Setter of userInfo
|
||||
*
|
||||
* @param json
|
||||
* @param json userInfo
|
||||
*/
|
||||
public void setUserInfo(Context context, JSONObject json) {
|
||||
this.userInfo = json;
|
||||
@@ -75,13 +76,13 @@ public class ApplicationContext {
|
||||
/**
|
||||
* Asynchronously get user info.
|
||||
*
|
||||
* @param activity
|
||||
* @param callbackListener
|
||||
* @param activity Activity
|
||||
* @param callbackListener CallbackListener
|
||||
*/
|
||||
public void fetchUserInfo(final Activity activity, final CallbackListener callbackListener) {
|
||||
UserResource.info(activity.getApplicationContext(), new JsonHttpResponseHandler() {
|
||||
@Override
|
||||
public void onSuccess(final JSONObject json) {
|
||||
public void onSuccess(int statusCode, Header[] headers, final JSONObject json) {
|
||||
// Save data in application context
|
||||
if (!json.optBoolean("anonymous", true)) {
|
||||
setUserInfo(activity.getApplicationContext(), json);
|
||||
|
||||
@@ -65,6 +65,7 @@ public class BaseResource {
|
||||
|
||||
/**
|
||||
* Resource initialization.
|
||||
*
|
||||
* @param context Context
|
||||
*/
|
||||
protected static void init(Context context) {
|
||||
@@ -122,6 +123,7 @@ public class BaseResource {
|
||||
|
||||
/**
|
||||
* Returns cleaned API URL.
|
||||
*
|
||||
* @param context Context
|
||||
* @return Cleaned API URL
|
||||
*/
|
||||
|
||||
@@ -14,6 +14,7 @@ public class UserResource extends BaseResource {
|
||||
|
||||
/**
|
||||
* POST /user/login.
|
||||
*
|
||||
* @param context Context
|
||||
* @param username Username
|
||||
* @param password Password
|
||||
@@ -31,6 +32,7 @@ public class UserResource extends BaseResource {
|
||||
|
||||
/**
|
||||
* GET /user.
|
||||
*
|
||||
* @param context Context
|
||||
* @param responseHandler Callback
|
||||
*/
|
||||
@@ -43,6 +45,7 @@ public class UserResource extends BaseResource {
|
||||
|
||||
/**
|
||||
* POST /user/logout.
|
||||
*
|
||||
* @param context Context
|
||||
* @param responseHandler Callback
|
||||
*/
|
||||
|
||||
@@ -73,7 +73,7 @@ public class PreferenceUtil {
|
||||
*/
|
||||
public static void setCachedJson(Context context, String key, JSONObject json) {
|
||||
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
sharedPreferences.edit().putString(key, json != null ? json.toString() : null).commit();
|
||||
sharedPreferences.edit().putString(key, json != null ? json.toString() : null).apply();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,7 +98,7 @@ public class PreferenceUtil {
|
||||
*/
|
||||
public static void setServerUrl(Context context, String serverUrl) {
|
||||
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
sharedPreferences.edit().putString(PREF_SERVER_URL, serverUrl).commit();
|
||||
sharedPreferences.edit().putString(PREF_SERVER_URL, serverUrl).apply();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -108,8 +108,7 @@ public class PreferenceUtil {
|
||||
public static void resetUserCache(Context context) {
|
||||
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
Editor editor = sharedPreferences.edit();
|
||||
editor.putString(PREF_CACHED_USER_INFO_JSON, null);
|
||||
editor.commit();
|
||||
editor.putString(PREF_CACHED_USER_INFO_JSON, null).apply();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 171 B |
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 182 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.v7.widget.RecyclerView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/docList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scrollbars="vertical">
|
||||
|
||||
</android.support.v7.widget.RecyclerView>
|
||||
26
docs-android/app/src/main/res/layout/doc_list_item.xml
Normal file
26
docs-android/app/src/main/res/layout/doc_list_item.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:text="Facture Amazon"
|
||||
android:textColor="#212121"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_marginTop="4dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:text="Appartement, Caluire"
|
||||
android:textColor="#777777"
|
||||
android:textSize="16sp"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -6,10 +6,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/content_frame"
|
||||
<fragment
|
||||
android:id="@+id/main_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
class="com.sismics.docs.fragment.DocListFragment"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/left_drawer"
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="android:Theme.Holo.Light">
|
||||
<!-- Customize your theme here. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<item name="colorPrimary">#263238</item>
|
||||
<item name="colorPrimaryDark">#21272b</item>
|
||||
<item name="colorAccent">#009688</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user