[android-developers] Digest for android-developers@googlegroups.com - 4 updates in 2 topics

Comments: (0)
Justin Anderson <magouyaware@gmail.com>: Jul 31 01:14PM

Say what?
 
Pratama Nur Wijaya <set.mnemonix@gmail.com>: Jul 31 12:34AM -0700

Hi everyone,
 
i want to make custom tab like these (see image)
http://www.awesomescreenshot.com/image/444876/fd1fdc0ed49b53f846b6b2282868235a
 
its look like instagram login page,
 
i have try using Design Support Lib TabLayout
but i dont have an idea how to custom tablayout indicator like that
 
 
any suggestion ?
Thanks before
Justin Anderson <magouyaware@gmail.com>: Jul 31 11:25AM

1) Create a png of a triangle.
2) Create a state list drawable where the selected state uses that image
and the unelected state doesn't (You may want to get more involved and add
pissed states).
3) Create a custom layout to inflate for the tab that has a text view and
set the bottom drawable of that text view to use your state list drawable
created in step 2
4) When you create your tabs, inflate the layout created in step 3 and set
it as the custom view of your tab
 
DISCLAIMERS:
There may be a better way to accomplish this, but this is what I thought of
initially. I have done stuff like this in the past but it's been a while do
there may be done additional tweaking you need to do. If I remember right I
used PagerTab Strip.
 
Hour that at least gets you in the right direction.
 
Thanks,
Justin
 
On Fri, Jul 31, 2015, 3:38 AM Pratama Nur Wijaya <set.mnemonix@gmail.com>
wrote:
 
Pratama Nur Wijaya <set.mnemonix@gmail.com>: Jul 31 06:13AM -0700

Thank you so much.. i will try it..
 
Thanks
 
On Friday, 31 July 2015 18:35:10 UTC+7, MagouyaWare wrote:
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.

[android-developers] Digest for android-developers@googlegroups.com - 3 updates in 3 topics

Comments: (0)
shiva pendem <pendem.shiva89@gmail.com>: Jul 31 01:56AM +0530

Hello,
 
I need a android application where it will show two routes in first screen
let say the route is from A to B and the second one is from C to D. and
below that i need a button to which asks for show on map, on clicking the
button it should show the two route maps in the new screen, here i will be
sending 4 points that is 4 latitudes and 4 longitudes to next screen.
 
Can any one guide me how can i do this. my main moto or requirement is to
show two routes for 4 different points as explained.
 
Thanks,
Pendem Shiva Shankar,
Mob:+91-9533024675.
tar9918 <txie2004@gmail.com>: Jul 30 11:51AM -0700

This error only occurred on Android 5, mostly Samsung devices. URI scheme
is https. com.b.a. in the 2nd sample is Picasso 2.2.
 
 
java.lang.AssertionError
 
at
com.android.okhttp.OkHttpClient.getDefaultSSLSocketFactory(OkHttpClient.java:532)
 
at com.android.okhttp.OkHttpClient.copyWithDefaults(OkHttpClient.java:494)
 
at com.android.okhttp.OkHttpClient.open(OkHttpClient.java:467)
 
at com.android.okhttp.OkHttpClient.open(OkHttpClient.java:462)
 
at com.android.okhttp.HttpHandler.openConnection(HttpHandler.java:33)
 
at java.net.URL.openConnection(URL.java:479)
 
at com.android.volley.toolbox.k.a(HurlStack.java:102)
 
at com.android.volley.toolbox.a.a(BasicNetwork.java:96)
at com.android.volley.l.run(NetworkDispatcher.java:112)
 
Caused by: java.lang.AssertionError
 
at
com.android.okhttp.OkHttpClient.getDefaultSSLSocketFactory(OkHttpClient.java:532)
 
at
com.android.okhttp.OkHttpClient.copyWithDefaults(OkHttpClient.java:494)
 
at com.android.okhttp.OkHttpClient.open(OkHttpClient.java:467)
 
at com.android.okhttp.OkHttpClient.open(OkHttpClient.java:462)
 
at com.android.okhttp.HttpHandler.openConnection(HttpHandler.java:33)
 
at java.net.URL.openConnection(URL.java:479)
 
at com.b.a.ay.a(UrlConnectionDownloader.java:58)
 
at com.b.a.ac.a(NetworkBitmapHunter.java:46)
 
at com.b.a.d.b(BitmapHunter.java:123)
 
at com.b.a.ar.b(RequestCreator.java:225)
 
at com.example.app.bq.a(UserManagerFragment.java:447)
 
at com.example.app.bq.doInBackground(UserManagerFragment.java:414)
 
at android.os.AsyncTask$2.call(AsyncTask.java:297)
 
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
 
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
 
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
 
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
 
Thanks in advance.
Arshad Fendi <arshad.fendi@gmail.com>: Jul 30 06:26AM -0700

Either these questions are hard to answer or that I have asked them in the
wrong forum.
 
On Thursday, 23 July 2015 10:43:34 UTC+2, Arshad Fendi wrote:
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.

[android-developers] Digest for android-developers@googlegroups.com - 5 updates in 5 topics

Comments: (0)
Jonathan Fajardo Roa <jfajardor9210@gmail.com>: Jul 29 06:55PM -0700

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException:
org.gradle.process.internal.ExecException: Process 'command
'/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java''
finished with non-zero exit value 2
Simon Giddings <mr.s.giddings@gmail.com>: Jul 29 08:44AM -0700

If anyone is needing to do the same thing, here is my working solution.
 
Note that I am targeting API 14 and above.
 
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" >
<item name="android:actionMenuTextAppearance">
@style/myActionBarMenuText</item>
</style>

<!-- Override actionbar menu text appearance -->
<style name="myActionBarMenuText" parent=
"android:TextAppearance.Holo.Widget.ActionBar.Menu">
<item name="android:textAllCaps">false</item>
<!-- was 12sp, which is too small for me in mixed case -->
<item name="android:textSize">16sp</item>
</style>
 
 
I hope this will be useful for someone ...
gvi70000 <gvi70000@gmail.com>: Jul 29 12:04AM -0700

Solved by using this tutorial
https://www.bignerdranch.com/blog/customizing-android-listview-rows-subclassing/
 
On Thursday, July 23, 2015 at 9:09:07 PM UTC+2, gvi70000 wrote:
gvi70000 <gvi70000@gmail.com>: Jul 28 11:51PM -0700

Hello all,
 
In my application i have a SlidingTabLayout, each tab containing a
listview. when i go through the tabs several times the items are added in
the listview each time. how can i prevent this behaviour?
 
the second question
 
On each tab i want to add a second fragment that will hold some controls,
each fragment has to be linked with a list item from the list view, when i
switch the tab the first list item has to be selected to display the
corresponding fragment. How can i achieve this behavior?
 
my main activity
public class MainActivity extends AppCompatActivity {
Toolbar toolbar;
ViewPager viewPager;
ViewPagerAdapter viewPagerAdapter;
SlidingTabLayout slidingTabLayout;
CharSequence Titles[] = {"Basic", "Sensors", "USB"};
int Numboftabs = 3;
 
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Creating The Toolbar and setting it as the Toolbar for the
activity
toolbar = (Toolbar) findViewById(R.id.tool_bar);
setSupportActionBar(toolbar);
// Creating The ViewPagerAdapter and Passing Fragment Manager,
Titles for the Tabs and Number Of Tabs.
viewPagerAdapter = new
ViewPagerAdapter(getSupportFragmentManager(), Titles);
// Assigning ViewPager View and setting the adapter
viewPager = (ViewPager) findViewById(R.id.pager);
viewPager.setAdapter(viewPagerAdapter);
// Assiging the Sliding Tab Layout View
slidingTabLayout = (SlidingTabLayout) findViewById(R.id.tabs);
slidingTabLayout.setDistributeEvenly(true); // To make the Tabs
Fixed set this true, This makes the tabs Space Evenly in Available width
// Setting Custom Color for the Scroll bar indicator of the Tab View
slidingTabLayout.setCustomTabColorizer(new
SlidingTabLayout.TabColorizer() {
@Override
public int getIndicatorColor(int position) {
return getResources().getColor(R.color.tabsScrollColor);
}
});
// Setting the ViewPager For the SlidingTabsLayout
slidingTabLayout.setViewPager(viewPager);
}
 
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is
present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
 
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
 
my view pager adapter
public class ViewPagerAdapter extends FragmentPagerAdapter {
 
CharSequence Titles[]; // This will Store the Titles of the Tabs which
are Going to be passed when ViewPagerAdapter is created
int NumbOfTabs; // Store the number of tabs, this will also be passed
when the ViewPagerAdapter is created
FragmentManager fragmentManager;
private static final int tabIcons[] = {R.drawable.hand,
R.drawable.sensors, R.drawable.fastobjects, R.drawable.gears,
R.drawable.usb};
// Build a Constructor and assign the passed Values to appropriate
values in the class
public ViewPagerAdapter(FragmentManager fm, CharSequence mTitles[]) {
super(fm);
this.fragmentManager = fm;
this.Titles = mTitles;
this.NumbOfTabs = mTitles.length;
}
//This method return the fragment for the every position in the View
Pager
@Override
public Fragment getItem(int position) {
Fragment fragment =
fragmentManager.findFragmentByTag("android:switcher:" + R.id.pager + ":" +
position);
if (fragment == null) {
Bundle arguments = new Bundle();
arguments.putInt("position", position);
arguments.putString("frag","android:switcher:" + R.id.pager +
":" + position);
fragment = new Tab_Modes();
fragment.setArguments(arguments);
return fragment;
}
else
return null;
 
}
// This method return the titles for the Tabs in the Tab Strip
@Override
public CharSequence getPageTitle(int position) {
return Titles[position];
}
// This method return the Number of tabs for the tabs Strip
@Override
public int getCount() {
return NumbOfTabs;
}
}
 
 
and my listview creator
 
public class Tab_Modes extends ListFragment {
private ArrayList<NameImg> items = new ArrayList<NameImg>();
private int crtMode;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View v = super.onCreateView(inflater, container,
savedInstanceState);
Bundle arguments = getArguments();
crtMode = arguments.getInt("position");
Toast.makeText(getActivity(), "Crt Frag :" +
arguments.getString("frag"), Toast.LENGTH_LONG).show();
switch (crtMode) {
case 0:
items.add(new NameImg("Manual", "Simple camera Control",
R.drawable.hand));
items.add(new NameImg("Bulb", "Long Exposure",
R.drawable.bulb));
items.add(new NameImg("Time Lapse", "Frame by Frame Movie",
R.drawable.timelapse));
items.add(new NameImg("HDR", "High Dinamic Range",
R.drawable.hdr));
items.add(new NameImg("IR", "Infra RED Control",
R.drawable.ir));
break;
case 1:
items.add(new NameImg("Triggered", "Trigger camera ",
R.drawable.triggrered));
items.add(new NameImg("Dark Room", "Long Exposure",
R.drawable.darkroom));
items.add(new NameImg("Lightning", "Frame by Frame Movie",
R.drawable.lightning));
break;
case 3:
items.add(new NameImg("1", "USB1", R.drawable.usb));
items.add(new NameImg("2", "USB2", R.drawable.waterdrops));
break;
}
setListAdapter(new ModesItemAdapter(getActivity(), items));
//ListView myLV = null;
//myLV = (ListView) myLV.findViewById(R.id.customListView);
//myLV.setItemChecked(0, true);
return v;
}
 
@Override
public void onListItemClick(ListView l, View v, int position, long
id) {
super.onListItemClick(l, v, position, id);
//getListView().setSelector(android.R.color.holo_blue_bright);
//Toast.makeText(getActivity(), "selected item :" + position +
" ID :" + id, Toast.LENGTH_LONG).show();
FragmentManager fm = getFragmentManager();
ModeControls myControls;
myControls = (ModeControls) fm.findFragmentByTag(position +
"ModesContent" );
if (myControls == null) {//if the fragment dosen't exists we
create it
Bundle arguments = new Bundle();
arguments.putString("myTxt", "selected item :" + position +
" ID :" + id);
FragmentTransaction ft = fm.beginTransaction();
myControls = new ModeControls();
myControls.setArguments(arguments);
ft.add(R.id.main_activity, myControls).commit();
}
}
}
 
and my modes adapter - for my data structure
 
public class ModesItemAdapter extends ArrayAdapter<NameImg> {
 
public ModesItemAdapter(Context c, List<NameImg> items) {
super(c, 0, items);
}
 
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ItemView itemView = (ItemView)convertView;
if (null == itemView)
itemView = ItemView.inflate(parent);
itemView.setItem(getItem(position));
return itemView;
}
}
Terry <terboel@gmail.com>: Jul 28 11:32PM -0700

We have just received an email from Google, with info about their new Ads
Policy.
 
I am afraid that I do not understand much of it, and I know that trying to
ask Google is a waste of time.
So I am trying to ask here instead. I am also sure that other developers
have the same questions.
 
We have a few apps with normal AdMob Banner Ads.
 
- Do our Ads use AdSense?
- Do our Ads use DoubleClick?
- Do our Ads use Cookies?
- (Are we supposed to know these things?)
- Do *we *have to do anything to comply with this new policy?
- (Why cannot Google be clearer about this and spell out what we have to do
- instead of using their usual vague formulations?)
 
Any help is appreciated.
 
Terry
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.

[android-developers] Digest for android-developers@googlegroups.com - 2 updates in 2 topics

Comments: (0)
Simon Giddings <mr.s.giddings@gmail.com>: Jul 28 09:35AM -0700

I have developed an application which contains this app theme style :
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" />
 
I have tried various means to change the actionbar text to be mixed case
instead of all uppercase.
To illustrate, here is a screen shot -
 
<https://lh3.googleusercontent.com/-fL-5_3uD_z0/VbeuwHo1THI/AAAAAAAAArM/4ZcuCqB2spU/s1600/actionbar-uppercase-text.jpg>
 
The styles I have tried thus far have produced anything but the desired
effect.
 
How do I restyle just the letter case of these items ?
Tomas Prochazka <tomas.prochazka@gmail.com>: Jul 28 07:22AM -0700

Can you somebody explain me why *play-services-location* has depency on
*play-services-map*?
It doesn't make sense. If you want only get position you don't need whole
map rendering core, it something like 2000 methods in the map package.
In reverse way it make sense. Map must have dependency on location, but why
this?
 

 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.

[android-developers] Digest for android-developers@googlegroups.com - 1 update in 1 topic

Comments: (0)
Sheng-Dean <littledot5566@gmail.com>: Jul 26 02:52AM -0700

I often find myself duplicating the exact same set of test classes such as
mocks or helpers for both Android Tests `/androidTest` and Unit Tests
`/test` when writing tests for an application module.
 
For example, I have some static functions that help me set up mocks quickly
in `/test/MockUtils.java` However, I cannot reuse this helper class in any
of my AndroidTests because they do not share the same class path -
`/androidTest` vs `/test`.
 
I've thought of creating a new module that only contains test resources.
However, this idea won't fly because the Android Gradle plugin refuses to
depend on an app module.
 
project testCommon resolves to an APK archive which is not supported as
a compilation dependency.
 
Is there any other way to create test classes that could be reused in both
Android Tests and Unit Tests?
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.

[android-developers] Digest for android-developers@googlegroups.com - 2 updates in 1 topic

Comments: (0)
Mathieu De Brito <mathieu.debrito@gmail.com>: Jul 25 10:10AM +0200

Well, I think it's because you use celebrity pictures... You may not have
thy right To use them..
Le 25 juil. 2015 9:59 AM, "Pratik Butani" <pratik13butani@gmail.com> a
écrit :
 
Mathieu De Brito <mathieu.debrito@gmail.com>: Jul 25 11:33AM +0200

I guess, but I have no idea what's in Google's mind :p
 
It seems that your app appear similar to something else ?
That would lead to the impersonification issue your facing
 
--
Mathieu de Brito
www.mathieudebrito.fr <http://mathieudebrito.fr>
Fr : +33 6 87 36 74 78
 
On Sat, Jul 25, 2015 at 11:17 AM, Pratik Butani <pratik13butani@gmail.com>
wrote:
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.

[android-developers] Digest for android-developers@googlegroups.com - 2 updates in 2 topics

Comments: (0)
Ankur Avlani <ankuravlani@gmail.com>: Jul 24 11:07AM -0700

Hi All,
 
I am trying to get RAW YV12 frames (from onPreviewFrame) and convert the
same the H.264, using MediaCodec class. So far i have not been able to
convert the H.264 successfully. The reason being not sure how to extract
the NAL (SPS and PPS ) info and add it to the Encoder. My sample code for
deque is as below.
 
 
final int TIMEOUT_USEC = 100;
byte idrFrameType = 0x65;
if (VERBOSE) Log.d(TAG, "drainEncoder(" + endOfStream + ")");
ByteBuffer[] outputBuffers = encoder.getOutputBuffers();
int outputBufferIndex = encoder.dequeueOutputBuffer(bufferInfo,0);
while (outputBufferIndex >= 0) {
ByteBuffer outputBuffer = outputBuffers[outputBufferIndex];
byte[] outData = new byte[bufferInfo.size];
outputBuffer.get(outData);
try {
stream.write(outData);
} catch (IOException e) {
e.printStackTrace();
}
Log.d("AvcEncoder", outData.length + " bytes written");
 
encoder.releaseOutputBuffer(outputBufferIndex, false);
outputBufferIndex = encoder.dequeueOutputBuffer(bufferInfo, 0);
}
 
 
 
I have even tried the INFO_OUTPUT_FORMAT_CHANGED but that didnt help
either. Currently i am writing the data to a file, but the big
picture is to stream to a server. When i try to play the save file
with the default android player it never plays.
 
 
Thanks,
 
Ankur.
Mathieu De Brito <mathieu.debrito@gmail.com>: Jul 24 02:25PM +0200

Hi,
 
Yes, I got it solved : My issue was to use AppBrain library.
AppBrain sends some private information to their server.
 
I would suggest you take a look at all your libraries privacy policies to
know what they are doing with private information...
 
I removed AppBrain and all got fine again.
 
 
 
--
Mathieu de Brito
www.mathieudebrito.fr <http://mathieudebrito.fr>
Fr : +33 6 87 36 74 78
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.

[android-developers] Digest for android-developers@googlegroups.com - 9 updates in 2 topics

Comments: (0)
gvi70000 <gvi70000@gmail.com>: Jul 23 03:42AM -0700

I would like to have your guidance to solve a problem that i have with my
first android app (SlidingTabLayout) I have the following
ViewPagerAdapter.java
 
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
 
/**
* Created by John on 6/12/2015.
*/
public class ViewPagerAdapter extends FragmentStatePagerAdapter {
 
CharSequence Titles[]; // This will Store the Titles of the Tabs which are Going to be passed when ViewPagerAdapter is created
int NumbOfTabs; // Store the number of tabs, this will also be passed when the ViewPagerAdapter is created
 
 
// Build a Constructor and assign the passed Values to appropriate values in the class
public ViewPagerAdapter(FragmentManager fm, CharSequence mTitles[], int mNumbOfTabsumb) {
super(fm);
 
this.Titles = mTitles;
this.NumbOfTabs = mNumbOfTabsumb;
 
}
 
//This method return the fragment for the every position in the View Pager
@Override
public Fragment getItem(int position) {
return Tab_Modes.init(position);
}
 
// This method return the titles for the Tabs in the Tab Strip
 
@Override
public CharSequence getPageTitle(int position) {
return Titles[position];
}
 
// This method return the Number of tabs for the tabs Strip
 
@Override
public int getCount() {
return NumbOfTabs;
}
}
 
 
The custom data structure class
 
/**
* Created by John on 7/22/2015.
*/
public class NameImg {
public String itemName;
public String itemDesc;
public int itemImg;
 
public NameImg() {
super();
}
 
public NameImg(String itemName, String itemDesc, int itemImg) {
super();
this.itemName = itemName;
this.itemDesc = itemDesc;
this.itemImg = itemImg;
}
 
public String getName() {
return this.itemName;
}
 
public void setName(String itemName) {
this.itemName = itemName;
}
 
public String getDesc() {
return this.itemDesc;
}
 
public void setDesc(String itemDesc) {
this.itemDesc = itemDesc;
}
 
public int getImg() {
return this.itemImg;
}
 
public void setImg(int itemImg) {
this.itemImg = itemImg;
}
 
}
 
 
and the tab
 
/**
* Created by John on 6/12/2015.
*/
public class Tab_Modes extends Fragment {
int tab_idx;
private ListView myLV;
 
static Tab_Modes init(int val) {
Tab_Modes myTab = new Tab_Modes();
// Supply val input as an argument.
Bundle args = new Bundle();
args.putInt("val", val);
myTab.setArguments(args);
return myTab;
}
 
/**
* Retrieving this instance's number from its arguments.
*/
 
public void onCreate(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// super.onCreate(savedInstanceState);
tab_idx = getArguments() != null ? getArguments().getInt("val") : 1;
 
NameImg usb[] = new NameImg[]
{
new NameImg("1", "USB1", R.drawable.hand),
new NameImg("2", "USB2", R.drawable.bulb),
new NameImg("3", "USB3", R.drawable.bullet)
};
NameImg[][] list_NameImg = new NameImg[][]{basic, spi, i2c, usb};
ModesLvAdapter adapter = new ModesLvAdapter(this, R.layout.my_list, list_NameImg[tab_idx][]);
myLV = (ListView) myLV.findViewById(R.id.customListView);
View v = inflater.inflate(R.layout.my_list, null);
myLV.setAdapter(adapter);
}
}
 
 
The activity_main.xml
 
LinearLayout 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"
android:orientation="vertical"
tools:context=".MainActivity">
 
<include
android:id="@+id/tool_bar"
layout="@layout/tool_bar"
android:layout_height="wrap_content"
android:layout_width="match_parent"
/>
 
<com.grozeaion.www.gvicameraremotecontrol.SlidingTabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="2dp"
android:background="@color/ColorPrimary"/>
 
<android.support.v4.view.ViewPager
android:id="@+id/pager"
 
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_weight="1"
></android.support.v4.view.ViewPager>
 
</LinearLayout>
 
 
tab_bodes.xml
 
<?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="match_parent">
 
 
<ListView
android:id="@+id/customListView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
</ListView>
</LinearLayout>
 
 
 
and my_list.xml
 
<?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="match_parent"
android:orientation="horizontal" >
 
<ImageView
android:id="@+id/item_icon"
android:layout_width="60dp"
android:layout_height="60dp"
android:padding="5dp" />
 
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
 
<TextView
android:id="@+id/item_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Medium Text"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:padding="2dp"
android:textColor="#33CC33" />
 
<TextView android:id="@+id/item_desc"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:paddingLeft="8dip"
android:paddingBottom="6dip"
android:textSize="15dip"
android:layout_below="@id/item_name"/>
</LinearLayout>
</LinearLayout>
 
 
i dont know what i am doing wrong when i try to call the adapter
 
ModesLvAdapter adapter = new ModesLvAdapter(this, R.layout.my_list, list_NameImg[tab_idx][]);
 
 
Any help is much appreciated.
gvi70000 <gvi70000@gmail.com>: Jul 23 03:53AM -0700

Here is how the UI should look like
 
 
On Thursday, July 23, 2015 at 12:42:29 PM UTC+2, gvi70000 wrote:
Justin Anderson <magouyaware@gmail.com>: Jul 23 01:06PM

1) What is the error you are getting?
2) What is ModesLvAdapter? You didn't provide that class. You basically
gave us everything about your project except the ONE thing that has to do
with your question.
 
gvi70000 <gvi70000@gmail.com>: Jul 23 07:49AM -0700

Here it is...
in Tab_modes i get Error:(65, 99) error: illegal start of expression t line
 
ModesLvAdapter adapter = new ModesLvAdapter(this, R.layout.my_list, list_NameImg[tab_idx][]);
 
 
 
 
import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
 
/**
* Created by John on 6/12/2015.
*/
//http://www.ezzylearning.com/tutorial/customizing-android-listview-items-with-custom-arrayadapter
public class ModesLvAdapter extends ArrayAdapter<NameImg> {
 
Context context;
int layoutResourceId;
NameImg data[] = null;
 
public ModesLvAdapter(Context context, int layoutResourceId, NameImg[] data) {
super(context, layoutResourceId, data);
this.context = context;
this.data = data;
}
 
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View row = convertView;
NameImgHolder holder = null;
if (row == null) {
LayoutInflater inflater = ((Activity) context).getLayoutInflater();
row = inflater.inflate(layoutResourceId, parent, false);
 
holder = new NameImgHolder();
 
holder.itemName = (TextView) row.findViewById(R.id.item_name);
holder.itemDesc = (TextView) row.findViewById(R.id.item_desc);
holder.itemImg = (ImageView) row.findViewById(R.id.item_icon);
row.setTag(holder);
} else {
holder = (NameImgHolder) row.getTag();
}
 
NameImg nameImg = data[position];
holder.itemName.setText(nameImg.itemName);
holder.itemDesc.setText(nameImg.itemDesc);
holder.itemImg.setImageResource(nameImg.itemImg);
return row;
}
 
static class NameImgHolder {
TextView itemName;
TextView itemDesc;
ImageView itemImg;
}
}
 
 
 
 
On Thursday, July 23, 2015 at 3:14:30 PM UTC+2, MagouyaWare wrote:
gvi70000 <gvi70000@gmail.com>: Jul 23 09:16AM -0700

I have tried the following
 
<https://lh3.googleusercontent.com/-UwZUAdWZliQ/VbETW8LzhcI/AAAAAAAAIfk/KfACIlRyDZc/s1600/Untitled.png>
 
//NameImg[][] list_NameImg = new NameImg[][]{basic, sensors, fastobjects, pantilt, usb};
ArrayList<NameImg[]> list_NameImg = new ArrayList<NameImg[]>();
list_NameImg.add(basic);
list_NameImg.add(sensors);
list_NameImg.add(fastobjects);
list_NameImg.add(pantilt);
list_NameImg.add(usb);
ModesLvAdapter adapter = new ModesLvAdapter(this, R.layout.my_list, list_NameImg.get(tab_idx));
 
 
but now i get
 
 
 
On Thursday, July 23, 2015 at 3:14:30 PM UTC+2, MagouyaWare wrote:
Justin Anderson <magouyaware@gmail.com>: Jul 23 04:34PM

A fragment is not a Context. Pass in "getActivity()" instead of "this"
 
Justin Anderson <magouyaware@gmail.com>: Jul 23 06:24PM

Sorry, I don't do personal consulting like that for free. My consulting
rates are $120/hour.
 
I'm happy to help here on this forum, but I spend time on here in my free
time so I'm not going to go pouring through your project to try to solve
your problem.
 
Try debugging and stepping through the code to see if you can figure out
what is going on, or at least try to narrow it down to where you think the
cause of the problem is and post another, more specific, question.
 
Thanks,
Justin
 
gvi70000 <gvi70000@gmail.com>: Jul 23 12:09PM -0700

Hi,
I have tried getActivity (), now the code is error free but i have no
listview displayed in the tabs.
 
 
ArrayList<NameImg[]> list_NameImg = new ArrayList<NameImg[]>();
list_NameImg.add(basic);
list_NameImg.add(sensors);
list_NameImg.add(fastobjects);
list_NameImg.add(pantilt);
list_NameImg.add(usb);
 
ModesLvAdapter adapter = new ModesLvAdapter(getActivity (), R.layout.my_list_item, list_NameImg.get(tab_idx));
myLV = (ListView) myLV.findViewById(R.id.customListView);
View v = inflater.inflate(R.layout.modes_lv, null);
myLV.setAdapter(adapter);
 
 
 
 
On Thursday, July 23, 2015 at 8:07:38 PM UTC+2, MagouyaWare wrote:
Arshad Fendi <arshad.fendi@gmail.com>: Jul 23 01:43AM -0700

Hello everyone
 
We all know those horrible emails that informs us that one of our apps has
been suspended and that it "counts as strikes against the good standing of
your Google Play Developer account".
https://support.google.com/googleplay/android-developer/answer/2477981
 
Two questions I have that are no where to find on Googles support pages or
clear answers on the forums.
 
1: How many strikes is enough to terminate the developer account?
Please don't say three directly based on experience, but if you do have it
written some where then I'll be gladly to read it. I have read about people
getting up to 5 apps suspended and still can publish, while others only got
1-2 apps suspended that lead to their account termination hence the
question.
 
YouTube is very clear with strikes, and have this on their support page:
"If you receive three copyright strikes, your account will be terminated.
All the videos uploaded to your account will be removed. Users with
terminated accounts aren't able to create new accounts".
 
2: Will Google Play strike expire?
If the above statement about the 5 apps suspended but not the account, does
that means the strikes expires?
 
As it says on YouTube support page:
"A copyright strike will expire in six months as long as you complete
Copyright School and receive no additional copyright strikes during that
time".
 
YouTube support page.
https://support.google.com/youtube/answer/2814000
 
Thanks.
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.

[android-developers] Digest for android-developers@googlegroups.com - 2 updates in 1 topic

Comments: (0)
Jon Colverson <jjc1138@gmail.com>: Jul 21 12:12PM -0700

Hello.
 
I'm getting ready to release a game that's compatible with both touchscreen
devices and Android TV devices. On Android TV, the gameplay isn't suitable
for control with just a dpad, so I'd like to add <uses-feature
android:name="android.hardware.GAMEPAD" /> to my manifest so that buyers
can see that up front and (presumably) will be stopped from buying it if
they don't have the appropriate hardware.
 
But the problem is that the game also has touchscreen controls for phones
and tablets, so on those devices the gamepad isn't required. What I'd
really like to be able to do would be to say that *either* a gamepad or a
touchscreen are required, but there doesn't seem to be a syntax for that.
 
I thought that using multiple APKs might do the trick, and I set up one
with the Android TV LEANBACK_LAUNCHER intent filter and with gamepads set
to required, and another without the Android TV intent filter and with
gamepads set to optional. Unfortunately, though, when I uploaded them to my
draft entry on Google Play, both APKs showed compatibility with the same
number of devices, so it seems that the filtering doesn't currently work to
separate an Android TV build from a build for other devices.
 
Is there any other way of achieving this, other than just being clear what
the requirements are in the Play listing and hoping people read it? :)
Jon Colverson <jjc1138@gmail.com>: Jul 21 04:31PM -0700

I believe I've found a way of doing this via a Stack Overflow question from
someone who wanted to restrict their app to only running on Android TV:
http://stackoverflow.com/questions/25152048/restrict-android-application-to-android-tv
 
The fix was to include:
<uses-feature android:name="android.software.leanback"
android:required="true" />
 
in the manifest of the Android TV version (and to set its versionCode
higher than the other build). With that the Google Play Developer Console
shows the TV build only being applicable to ~11 devices or so, which seems
right. The TV devices are still eligible for the non-TV build too, but
because the versionCode of the TV build is higher I believe that will make
them download that one. I haven't published yet, so I can't say for sure if
this will work properly, but everything looks good in the Developer Console.
 
On Tuesday, 21 July 2015 20:12:38 UTC+1, Jon Colverson wrote:
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.

[android-developers] Digest for android-developers@googlegroups.com - 3 updates in 2 topics

Comments: (0)
Igor Ganapolsky <eazyigz@gmail.com>: Jul 17 08:27AM -0700

Any update on this issue? I there a workaround at all? I am experiencing
severe DEX limitations in my project because of this.
 
On Tuesday, March 25, 2014 at 1:56:16 PM UTC-4, Jeff Campbell wrote:
Justin Anderson <magouyaware@gmail.com>: Jul 17 03:35PM

Read through this article, in particular the section on only including
portions of Google Play Services in your app:
https://developers.google.com/android/guides/setup
 
Gary Schmidt <test.mock5@gmail.com>: Jul 17 12:12PM +0530

No
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.